public abstract class PdoTreeExtensionToggleNode extends Object
PdoTree to add a popup-menu-item
for toggling the display of subtrees.| Constructor and Description |
|---|
PdoTreeExtensionToggleNode(int toggleNodeId)
Creates a toggle node.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChildIndex()
Gets the index of this toggle-node withing the childs of the popup node.
|
abstract JMenuItem |
getMenuItem(boolean toggleNodeDisplayed)
Gets a JMenuItem for the popup-Menu.
|
JMenuItem |
getMenuItem(PdoTree tree,
DefaultMutableTreeNode popupNode,
TreePath popupPath)
Creates a JMenuItem for the popup-Menu.
|
DefaultMutableTreeNode |
getPopupNode()
Gets the popup node this toggle node is associated to.
|
int |
getToggleNodeId()
Gets the toggle node id.
|
abstract PdoTreeToggleNodeObject |
getToggleNodeObject(Object popupObject)
Creates an PdoTreeToggleNodeObject to be inserted into the tree.
|
PdoTree |
getTree()
Gets the tree this toggle node is associated to.
|
void |
hideToggleNode()
Removes the togglenode from the tree.
|
void |
insertObjects(List list)
Sets the list of objects into this toggle node and
inserts the toggle node into the tree (invokes
showToggleNode(). |
DefaultMutableTreeNode |
showToggleNode()
Inserts the toggle-node as the first childnode.
|
public PdoTreeExtensionToggleNode(int toggleNodeId)
Each of toggle node must get its own unique identifier to determine whether it is already displayed in the tree or not.
toggleNodeId - is some unique(!) idpublic int getToggleNodeId()
public PdoTree getTree()
public DefaultMutableTreeNode getPopupNode()
public int getChildIndex()
public abstract PdoTreeToggleNodeObject getToggleNodeObject(Object popupObject)
popupObject - is the object of the popupNode (usually an PersistentDomainObject, but not necessarily and may be null)public abstract JMenuItem getMenuItem(boolean toggleNodeDisplayed)
toggleNodeDisplayed - is true if the toggle-node is displayed in the tree, false if notpublic JMenuItem getMenuItem(PdoTree tree, DefaultMutableTreeNode popupNode, TreePath popupPath)
tree - the treepopupNode - is the node the popupMenu is displayed forpopupPath - is the treepath for the popupNodepublic void insertObjects(List list)
showToggleNode().list - the list of objectspublic DefaultMutableTreeNode showToggleNode()
public void hideToggleNode()
Tentackle - a domain driven enterprise framework