站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

TopComponent.Registry (NetBeans Windows API) - NetBeans API Javadoc 5.0.0

 

org.openide.windows
Interface TopComponent.Registry

Enclosing interface:
TopComponent

public static interface TopComponent.Registry

Registry of all top components. There is one instance that can be obtained via TopComponent.getRegistry() and it permits listening to the currently selected element, and to the activated nodes assigned to it.


Field Summary
static String PROP_ACTIVATED
          Name of property for the selected top component.
static String PROP_ACTIVATED_NODES
          Name of property for lastly activated nodes nodes.
static String PROP_CURRENT_NODES
          Name of property for currently selected nodes.
static String PROP_OPENED
          Name of property for the set of opened components.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a property change listener.
 TopComponent getActivated()
          Get the currently selected element.
 Node[] getActivatedNodes()
          Getter for the lastly activated nodes.
 Node[] getCurrentNodes()
          Getter for the currently selected nodes.
 Set getOpened()
          Get reference to a set of all opened componets in the system.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a property change listener.
 

Field Detail

PROP_OPENED

public static final String PROP_OPENED
Name of property for the set of opened components.

See Also:
Constant Field Values

PROP_ACTIVATED

public static final String PROP_ACTIVATED
Name of property for the selected top component.

See Also:
Constant Field Values

PROP_CURRENT_NODES

public static final String PROP_CURRENT_NODES
Name of property for currently selected nodes.

See Also:
Constant Field Values

PROP_ACTIVATED_NODES

public static final String PROP_ACTIVATED_NODES
Name of property for lastly activated nodes nodes.

See Also:
Constant Field Values
Method Detail

getOpened

public Set getOpened()
Get reference to a set of all opened componets in the system.

Returns:
live read-only set of TopComponents

getActivated

public TopComponent getActivated()
Get the currently selected element.

Returns:
the selected top component, or null if there is none

getCurrentNodes

public Node[] getCurrentNodes()
Getter for the currently selected nodes.

Returns:
array of nodes or null if no component activated or it returns null from getActivatedNodes ().

getActivatedNodes

public Node[] getActivatedNodes()
Getter for the lastly activated nodes. Comparing to previous method it always remembers the selected nodes of the last component that had ones.

Returns:
array of nodes (not null)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener.

Parameters:
l - the listener to add

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener.

Parameters:
l - the listener to remove

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.