This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209609

Summary: Widget class lookup
Product: platform Reporter: sevarac
Component: GraphAssignee: issues@platform <issues>
Status: RESOLVED WONTFIX    
Severity: normal CC: jglick
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.