|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.jgraph.graph.DefaultGraphCell
The default implementation for the GraphCell interface.
| Nested Class Summary | |
static interface |
DefaultGraphCell.ValueChangeHandler
|
| Field Summary | |
protected java.util.Map |
attributes
Hashtable for properties. |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
DefaultGraphCell()
Creates an empty cell. |
|
DefaultGraphCell(java.lang.Object userObject)
Creates a graph cell and initializes it with the specified user object. |
|
DefaultGraphCell(java.lang.Object userObject,
boolean allowsChildren)
Creates a graph cell and initializes it with the specified user object. |
|
DefaultGraphCell(java.lang.Object userObject,
javax.swing.tree.MutableTreeNode[] children)
Constructs a cell that holds a reference to the specified user object and contains the specified array of children. |
|
| Method Summary | |
java.lang.Object |
clone()
Create a clone of the cell. |
protected java.lang.Object |
cloneUserObject()
Create a clone of the user object. |
java.util.Map |
getAttributes()
Returns the properies of the cell. |
java.util.List |
getChildren()
Provides access to the children list to change ordering. |
void |
setAttributes(java.util.Map change)
Apply change to the cell and sync userObject. |
void |
setUserObject(java.lang.Object obj)
Override parent method to synchronize value property and userObject. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Map attributes
| Constructor Detail |
public DefaultGraphCell()
public DefaultGraphCell(java.lang.Object userObject)
userObject - an Object provided by the user that constitutes
the cell's data
public DefaultGraphCell(java.lang.Object userObject,
javax.swing.tree.MutableTreeNode[] children)
userObject - reference to the user objectchildren - array of children
public DefaultGraphCell(java.lang.Object userObject,
boolean allowsChildren)
userObject - an Object provided by the user that constitutes
the cell's data| Method Detail |
public void setUserObject(java.lang.Object obj)
GraphConstants.getValue(c.getAttributes()) == c.getUserObject()
Note: A cell's userObject can be set using GraphModel.edit() with a propertyMap that carries a value entry for that cell.
setUserObject in interface javax.swing.tree.MutableTreeNodepublic java.util.List getChildren()
Collections.EMPTY_LIST
if the list of children points to null.
public java.util.Map getAttributes()
getAttributes in interface GraphCellpublic void setAttributes(java.util.Map change)
change to the cell and sync userObject.
setAttributes in interface GraphCellpublic java.lang.Object clone()
protected java.lang.Object cloneUserObject()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||