Bug 216581

Summary: Widget should implement Lookup.Provider
Product: platform Reporter: bcallebaut <bcallebaut>
Component: GraphAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P4 CC: apireviews
Version: 7.1.2Keywords: API, API_REVIEW_FAST
Target Milestone: 7.3   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:
Attachments: Proposed Patch

Description bcallebaut 2012-08-09 10:54:23 UTC
The Widget class has a getLookup() method but not implements Lookup.Provider.
This should be added even if the lookup is not used anywhere.

Related discussion can be found at bug 209609

A uses I see for lookup is the same kind of uses as for a Node.
1) With a constructor where you can pass the lookup, you can for example provide actions, border, layout.

2) An action can use the layout to find out if a given functionality is supported by the widget (rotating it,...)


Only thing to be changed in Widget.java is 

public class Widget implements Accessible {
by
public class Widget implements Accessible, Lookup.Provider {

I can supply a patch if needed.
Comment 1 Jaroslav Havlin 2012-08-30 09:01:47 UTC
Created attachment 123721 [details]
Proposed Patch

Patch with change suggested by bcallebaut. Thank you!
Comment 2 Jaroslav Havlin 2012-08-30 09:04:12 UTC
Please review. Thanks.
Comment 3 bcallebaut 2012-11-26 14:33:19 UTC
(In reply to comment #2)
> Please review. Thanks.
For me it is fine
Comment 4 Jaroslav Havlin 2012-11-27 15:30:17 UTC
If there are no objections, I'll integrate on Thursday.
Comment 5 Jaroslav Havlin 2012-11-29 16:18:08 UTC
Integrated as http://hg.netbeans.org/core-main/rev/8607c24263cb
Comment 6 Quality Engineering 2012-12-02 03:05:52 UTC
Integrated into 'main-golden', will be available in build *201212020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8607c24263cb
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #216581: Widget should implement Lookup.Provider
Comment 7 businesswifi 2012-12-09 06:17:23 UTC
SPAM - Removed by Administrator
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