org.bdgp.cv.datamodel
Class DefaultMutableDAGNode
java.lang.Object
|
+--org.bdgp.cv.datamodel.DefaultMutableDAGNode
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, Comparable, ComparisonConstants, DAGNode, MutableDAGNode, javax.swing.tree.MutableTreeNode, javax.swing.undo.StateEditable, javax.swing.tree.TreeNode
- public class DefaultMutableDAGNode
- extends java.lang.Object
- implements MutableDAGNode
Field Summary |
protected java.lang.Object |
data
|
Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
protected java.lang.Object data
DefaultMutableDAGNode
public DefaultMutableDAGNode(java.lang.Object value)
getDAGChildAt
public DAGNode getDAGChildAt(int childIndex)
- Description copied from interface:
DAGNode
- Returns the child
TreeNode
at index
childIndex
as a DAGNode.
- Specified by:
getDAGChildAt
in interface DAGNode
getChildAt
public javax.swing.tree.TreeNode getChildAt(int childIndex)
- Specified by:
getChildAt
in interface javax.swing.tree.TreeNode
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interface javax.swing.tree.TreeNode
clone
public java.lang.Object clone()
- Specified by:
clone
in interface DAGNode
- Overrides:
clone
in class java.lang.Object
children
public java.util.Enumeration children()
- Specified by:
children
in interface javax.swing.tree.TreeNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interface javax.swing.tree.TreeNode
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndex
in interface javax.swing.tree.TreeNode
getParent
public javax.swing.tree.TreeNode getParent()
- Specified by:
getParent
in interface javax.swing.tree.TreeNode
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interface javax.swing.tree.TreeNode
parents
public java.util.Enumeration parents()
- Description copied from interface:
DAGNode
- Returns the parents of the reciever as an Enumeration.
- Specified by:
parents
in interface DAGNode
getParentAt
public DAGNode getParentAt(int parentIndex)
- Description copied from interface:
DAGNode
- Returns the parent
DAGNode
at index
parentIndex
.
- Specified by:
getParentAt
in interface DAGNode
getParentCount
public int getParentCount()
- Description copied from interface:
DAGNode
- Returns the number of parent
DAGNode
s the receiver
contains.
- Specified by:
getParentCount
in interface DAGNode
insert
public void insert(javax.swing.tree.MutableTreeNode child,
int index)
- Specified by:
insert
in interface javax.swing.tree.MutableTreeNode
remove
public void remove(int index)
- Specified by:
remove
in interface javax.swing.tree.MutableTreeNode
remove
public void remove(javax.swing.tree.MutableTreeNode node)
- Specified by:
remove
in interface javax.swing.tree.MutableTreeNode
insertParent
public void insertParent(MutableDAGNode parent,
int index)
- Description copied from interface:
MutableDAGNode
- Adds
parent
to the receiver at index
.
- Specified by:
insertParent
in interface MutableDAGNode
removeParent
public void removeParent(int index)
- Description copied from interface:
MutableDAGNode
- Removes the parent at
index
from the receiver.
- Specified by:
removeParent
in interface MutableDAGNode
removeParent
public void removeParent(MutableDAGNode parent)
- Description copied from interface:
MutableDAGNode
- Removes
parent node
from the receiver.
- Specified by:
removeParent
in interface MutableDAGNode
removeFromParent
public void removeFromParent()
- Specified by:
removeFromParent
in interface javax.swing.tree.MutableTreeNode
removeAllParents
public void removeAllParents()
- Description copied from interface:
MutableDAGNode
- Removes all parents from the receiver
- Specified by:
removeAllParents
in interface MutableDAGNode
removeAllChildren
public void removeAllChildren()
- Description copied from interface:
MutableDAGNode
- Removes all children from the receiver, and deletes receiver
from the child nodes' parent lists
- Specified by:
removeAllChildren
in interface MutableDAGNode
setParent
public void setParent(javax.swing.tree.MutableTreeNode newParent)
- Specified by:
setParent
in interface javax.swing.tree.MutableTreeNode
setUserObject
public void setUserObject(java.lang.Object object)
- Specified by:
setUserObject
in interface javax.swing.tree.MutableTreeNode
getUserObject
public java.lang.Object getUserObject()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
storeState
public void storeState(java.util.Hashtable state)
- Specified by:
storeState
in interface javax.swing.undo.StateEditable
restoreState
public void restoreState(java.util.Hashtable state)
- Specified by:
restoreState
in interface javax.swing.undo.StateEditable
compareTo
public int compareTo(java.lang.Object in)
- Specified by:
compareTo
in interface Comparable