netbeans:NetBeans Selection Management Tutorial II—Using Nodes

  This tutorial focuses _disibledevent="NetBeans Selection Management Tutorial II—Using Nodes" />

  Review of Concepts  To review a few of the concepts you've covered here:

  A Lookup is like a Map where the keys are es and the values are instances of those es. It's also useful to think of a Lookup as a place that objects swim o and out of, and you can subscribe to be notied of the arrival and departure of specic types of object.

  Utilities.actionsGlobalContext is a Lookup which proxies the Lookup of whichever TopComponent currently has keyboard focus, and fires changes when focus moves to a dferent component.

  Nodes are presentation objects that can be displayed in a tree, list or other component from the Explorer API. Each Node has its own Lookup.

  Just as Utilities.actionsGlobalContext proxies the Lookup of TopComponents (so you can just ask that lookup for a result and listen for changes in it, rather than having to track focus changes yourself), so also the Lookup created by ExplorerUtils.createLookup(ExplorerManager, ActionMap) will create a Lookup which automatically proxies the Lookup of whatever Node(s) are selected in an Explorer component.

Tags:  netbeanside6.5 netbeanside netbeans6.5 netbeans

延伸阅读

最新评论

发表评论