Bug 209609 - Widget class lookup
Widget class lookup
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Graph
7.2
All All
: P3 (vote)
: TBD
Assigned To: issues@platform
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-15 09:07 UTC by sevarac
Modified: 2012-03-26 19:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sevarac 2012-03-15 09:07:17 UTC
In Widget class getLookup method returns empty lookup, and there is no way to set it, or put something in that lookup.

Is there a use case where this is desired behaviour, and instance of Widget class is used?

In most examples I saw using IconWidget or LabelWidget (Widget subclasses), or extending Widget class, adding Lookup field and overriding getLookup method so that it returns that field.
It would make more sense to have constructor which accepts lookup param like in Node class http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#Node%28org.openide.nodes.Children,%20org.openide.util.Lookup%29

Please let me know what you thnk about this. Thanks.
Zoran
Comment 1 Jesse Glick 2012-03-26 19:35:18 UTC
1. The method is not final, so particular widgets can already supply a different lookup. There is no need for a new constructor that I can see.

2. doc-files/documentation.html says that getLookup is not used at the moment anyway. I am not aware of any calls to, or overrides of, this method.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo