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 122255

Summary: Add Widget-picking methods
Product: platform Reporter: David Kaspar <dkaspar>
Component: GraphAssignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker CC: tspiva
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description David Kaspar 2007-11-19 09:26:45 UTC
It would be good to have
Scene.pick(Point sceneLocation):List<Widget>
method which returns a list of widget that lays at specified scene location.
The method above is inspecting all Widgets on scene based on their boundaries.

There may be a faster implemetation with method:
Scene.pick(Point sceneLocation,ScenePickTask task):boolean
method which returns a boolean state. ScenePickTask interface is having a method which is invoked for each picked widget:
widgetPicked(Widget widget, Point localLocation):ConnectorState
The method should return ConnectorState.ACCEPT, ConnectorState.REJECT or ConnectorState.REJECT_AND_STOP which similar
meaning as it is used in ConnectProvider interface.
Comment 1 Trey Spiva 2007-11-21 20:46:38 UTC
I was thinking why limit this method to the scene.  Why not add the method to the Widget class.  That way you can start the search from any widget.
Comment 2 David Kaspar 2007-11-22 07:47:33 UTC
I totally agree. There is not be any obstacle for having it on Widget.