-
Notifications
You must be signed in to change notification settings - Fork 1
DevFaqWindowsTopComponentLookup
The windowing system is what manages global selection. In olden times, selection meant the activated Node.
In modern NetBeans, the global selection is really whatever objects are in the focused TopComponent’s Lookup. It so happens that most standard TopComponents display `Node`s - so for most `TopComponent`s, the component’s `Lookup
is just proxying the Lookup
of the selected Node.
Rather than thinking of the selection as some specific object or Node, it is more useful to think of it as a grab bag of stuff provided by whatever component happens to have focus. If you use Utilities.actionsGlobalContext()
, you do not have to track all the different grab-bags of stuff provided by different components - you can get one grab bag of stuff which whose content will simply change (notifying you in the process) when focus moves to a different component.
So the TopComponent’s `Lookup
is a way to provide your particular grab bag of stuff - it can be the lookup of a Node
if you want, or it can be/contain whatever else or in addition you’d like to put there.
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqWindowsTopComponentLookup , that was last modified by NetBeans user Admin on 2009-11-06T16:06:27Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-01-26, and needs to be reviewed.
Apache NetBeans is an effort undergoing incubation at The Apache Software Foundation (ASF).
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
This wiki is an experiment pending Apache NetBeans Community approval.