|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.jgraph.graph.DefaultGraphCell
public class DefaultGraphCell
The default implementation for the GraphCell interface.
Field Summary | |
---|---|
protected AttributeMap |
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,
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. |
Method Summary | |
---|---|
void |
addPort()
Utility method to create a port for this cell. |
void |
addPort(java.awt.geom.Point2D offset)
Utility method to create a port for this cell. |
void |
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. |
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, setUserObject, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected AttributeMap attributes
Constructor Detail |
---|
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 childrenMethod Detail |
---|
public java.util.List getChildren()
Collections.EMPTY_LIST
if the list of childrenpoints to null
.
public AttributeMap getAttributes()
getAttributes
in interface GraphCell
public java.util.Map changeAttributes(java.util.Map change)
attributes
of the cell.
changeAttributes
in interface GraphCell
public void setAttributes(AttributeMap attributes)
setAttributes
in interface GraphCell
attributes
- The attributes to setpublic void addPort()
public void addPort(java.awt.geom.Point2D offset)
offset
- the offset of the port within the cellpublic void 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.DefaultMutableTreeNode
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |