Class NodeSelector<T extends Node>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.marginallyclever.ro3.apps.nodeselector.NodeSelector<T>
Type Parameters:
T - the type of Node to select
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class NodeSelector<T extends Node> extends JPanel

NodeSelector is a component that allows the user to select a Node. Internally it stores a reference to the selected node.

NodeSelector looks like a button. It displays the name of the selected Node. If no node is selected, it displays "...". When the user clicks on the button, a popup menu appears with a JTree of all available nodes.

When the user selects a node, the button's text is updated to show the name of the selected node. Also, a PropertyChangeEvent is fired. The propertyName will be "subject" and the values will be of type T.

NodeSelector also provides a find button. The find action changes the global selection, which updates any other systems listening to the selection.

See Also: