public class DefaultGraphCell extends javax.swing.tree.DefaultMutableTreeNode implements GraphCell, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected AttributeMap |
attributes
Hashtable for properties.
|
| Constructor and Description |
|---|
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,
AttributeMap storageMap)
Constructs a cell that holds a reference to the specified user object
and contains the specified array of children and sets default values
for the bounds attribute.
|
DefaultGraphCell(java.lang.Object userObject,
AttributeMap storageMap,
javax.swing.tree.MutableTreeNode[] children)
Creates a graph cell and initializes it with the specified user object.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
addPort()
Utility method to create a port for this cell.
|
java.lang.Object |
addPort(java.awt.geom.Point2D offset)
Utility method to create a port for this cell.
|
java.lang.Object |
addPort(java.awt.geom.Point2D offset,
java.lang.Object userObject)
Utility method to create a port for this cell.
|
java.util.Map |
changeAttributes(java.util.Map change)
Deprecated.
Use getAttributes().applyMap
|
java.lang.Object |
clone()
Create a clone of the cell.
|
AttributeMap |
getAttributes()
Returns the properies of the cell.
|
java.util.List |
getChildren()
Provides access to the children list to change ordering.
|
void |
setAttributes(AttributeMap attributes)
Sets the attributes.
|
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, setUserObject, toStringprotected AttributeMap attributes
public DefaultGraphCell()
public DefaultGraphCell(java.lang.Object userObject)
userObject - an Object provided by the user that constitutes
the cell's datapublic DefaultGraphCell(java.lang.Object userObject,
AttributeMap storageMap)
userObject - reference to the user objectstorageMap - the storage attribute map for this cellpublic DefaultGraphCell(java.lang.Object userObject,
AttributeMap storageMap,
javax.swing.tree.MutableTreeNode[] children)
userObject - an Object provided by the user that constitutes
the cell's datastorageMap - the storage attribute map for this cellchildren - array of childrenpublic java.util.List getChildren()
Collections.EMPTY_LIST
if the list of childrenpoints to null.public AttributeMap getAttributes()
getAttributes in interface GraphCellpublic java.util.Map changeAttributes(java.util.Map change)
attributes of the cell.changeAttributes in interface GraphCellpublic void setAttributes(AttributeMap attributes)
setAttributes in interface GraphCellattributes - The attributes to setpublic java.lang.Object addPort()
public java.lang.Object addPort(java.awt.geom.Point2D offset)
offset - the offset of the port within the cellpublic java.lang.Object addPort(java.awt.geom.Point2D offset,
java.lang.Object userObject)
offset - the offset of the port within the celluserObject - the user object of the port cellpublic java.lang.Object clone()
clone in class javax.swing.tree.DefaultMutableTreeNodeCopyright (C) 2001-2008 Gaudenz Alder. All rights reserved.