org.bdgp.cv.datamodel
Interface MutableTreeModel

All Superinterfaces:
javax.swing.tree.TreeModel
All Known Subinterfaces:
MutableDAGModel

public interface MutableTreeModel
extends javax.swing.tree.TreeModel


Method Summary
 javax.swing.tree.TreePath add(javax.swing.tree.TreePath target)
          Creates a new node and adds it as a child of the node given by target.
 javax.swing.tree.TreePath addChild(javax.swing.tree.TreePath target, java.lang.Object child)
          Adds a node to the tree at target.
 void delete(javax.swing.tree.TreePath[] sources)
          Deletes the specified nodes from the tree.
 java.lang.Object merge(javax.swing.tree.TreePath master, javax.swing.tree.TreePath slave)
          Merges two nodes in the Tree.
 javax.swing.tree.TreePath[] move(javax.swing.tree.TreePath[] sources, javax.swing.tree.TreePath dest)
          Adds the specified nodes as children of dest, and removes them from their current location.
 java.lang.Object[] split(javax.swing.tree.TreePath target)
          Splits a node in the tree.
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Method Detail

merge

public java.lang.Object merge(javax.swing.tree.TreePath master,
                              javax.swing.tree.TreePath slave)
Merges two nodes in the Tree. The resulting merged node is returned.

split

public java.lang.Object[] split(javax.swing.tree.TreePath target)
Splits a node in the tree. The resulting nodes are returned. Note that if the target has multiple parents, the node will be split in EVERY location in the tree, not just the location given by target.

add

public javax.swing.tree.TreePath add(javax.swing.tree.TreePath target)
Creates a new node and adds it as a child of the node given by target. The path to the new node is returned.

addChild

public javax.swing.tree.TreePath addChild(javax.swing.tree.TreePath target,
                                          java.lang.Object child)
Adds a node to the tree at target. The path to the added node is returned.

delete

public void delete(javax.swing.tree.TreePath[] sources)
Deletes the specified nodes from the tree. If a node has multiple parents, the node will only be deleted from the locations specified in sources. The node will remain in any location that is not named in the sources array.

move

public javax.swing.tree.TreePath[] move(javax.swing.tree.TreePath[] sources,
                                        javax.swing.tree.TreePath dest)
Adds the specified nodes as children of dest, and removes them from their current location. The new location of the nodes is returned.