dsto.dfc.swing.commands
Class CommandViewTreeModel
java.lang.Object
dsto.dfc.swing.tree.BasicTreeModelEventSource
dsto.dfc.swing.tree.AbstractDfcTreeModel
dsto.dfc.swing.commands.CommandViewTreeModel
- All Implemented Interfaces:
- CommandViewNodeListener, DfcTreeModel, Disposable, Serializable, EventListener, TreeModel
public class CommandViewTreeModel
- extends AbstractDfcTreeModel
- implements DfcTreeModel, CommandViewNodeListener
- See Also:
- Serialized Form
Methods inherited from class dsto.dfc.swing.tree.AbstractDfcTreeModel |
addEntry, canAddEntry, canCopyEntry, canMoveEntry, canPasteEntry, canRemoveEntry, copyEntry, getPathForEntry, isAncestor, isMutable, moveEntry, pasteEntry, removeEntry |
Methods inherited from class dsto.dfc.swing.tree.BasicTreeModelEventSource |
addTreeModelListener, dispose, fireTreeNodeChanged, fireTreeNodeInserted, fireTreeNodeRemoved, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeStructureChanged, getTreeModelListenerCount, removeTreeModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface dsto.dfc.swing.tree.DfcTreeModel |
addEntry, canAddEntry, canCopyEntry, canMoveEntry, canPasteEntry, canRemoveEntry, copyEntry, getPathForEntry, isMutable, moveEntry, pasteEntry, removeEntry |
CommandViewTreeModel
public CommandViewTreeModel(CommandViewNode root)
getRoot
public Object getRoot()
- Specified by:
getRoot
in interface TreeModel
- Specified by:
getRoot
in class AbstractDfcTreeModel
getChild
public Object getChild(Object parent,
int index)
- Specified by:
getChild
in interface TreeModel
- Specified by:
getChild
in class AbstractDfcTreeModel
getChildCount
public int getChildCount(Object parent)
- Specified by:
getChildCount
in interface TreeModel
- Specified by:
getChildCount
in class AbstractDfcTreeModel
isLeaf
public boolean isLeaf(Object entry)
- Specified by:
isLeaf
in interface TreeModel
- Specified by:
isLeaf
in class AbstractDfcTreeModel
getIndexOfChild
public int getIndexOfChild(Object parent,
Object child)
- Specified by:
getIndexOfChild
in interface TreeModel
- Specified by:
getIndexOfChild
in class AbstractDfcTreeModel
valueForPathChanged
public void valueForPathChanged(TreePath path,
Object newValue)
- Specified by:
valueForPathChanged
in interface TreeModel
- Overrides:
valueForPathChanged
in class AbstractDfcTreeModel
getParent
public Object getParent(Object entry)
- Description copied from interface:
DfcTreeModel
- Get the parent for a given entry, or null if the entry is the
root.
- Specified by:
getParent
in interface DfcTreeModel
- Specified by:
getParent
in class AbstractDfcTreeModel
registerListener
protected void registerListener(CommandViewNode node)
unregisterListener
protected void unregisterListener(CommandViewNode node)
childAdded
public void childAdded(CommandViewNodeEvent e)
- Description copied from interface:
CommandViewNodeListener
- Fired when a child is added to the node.
- Specified by:
childAdded
in interface CommandViewNodeListener
- Parameters:
e
- The event. e e.getNode () == new node, e.getOldIndex ()
== -1, e.getNewIndex () == index of new node.
childRemoved
public void childRemoved(CommandViewNodeEvent e)
- Description copied from interface:
CommandViewNodeListener
- Fired when a child is removed from the node.
- Specified by:
childRemoved
in interface CommandViewNodeListener
- Parameters:
e
- The event. e.getNode () == removed node, e.getOldIndex
() == old index of node, e.getNewIndex () == -1.
childMoved
public void childMoved(CommandViewNodeEvent e)
- Description copied from interface:
CommandViewNodeListener
- Fired when a child is moved within the node.
- Specified by:
childMoved
in interface CommandViewNodeListener
- Parameters:
e
- The event. e.getNode () == moved node, e.getOldIndex ()
== old index of node, e.getNewIndex () == new index.
commandChanged
public void commandChanged(CommandViewNodeEvent e)
- Description copied from interface:
CommandViewNodeListener
- Fired when a child is moved within the node.
- Specified by:
commandChanged
in interface CommandViewNodeListener
- Parameters:
e
- The event. e.getSourceNode () == node that changed,
e.getNode () == null, e.getOldCommand () == old command (may be
null), e.getNewCommand () == new command.
Copyright © 2008 Commonwealth of Australia