|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.tree.DefaultMutableTreeNode
|
+--org.jgraph.graph.DefaultGraphCell
The default implementation for the GraphCell interface.
| Field Summary | |
protected AttributeMap |
attributes
Hashtable for properties. |
static Rectangle |
defaultBounds
|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
DefaultGraphCell()
Creates an empty cell. |
|
DefaultGraphCell(Object userObject)
Creates a graph cell and initializes it with the specified user object. |
|
DefaultGraphCell(Object userObject,
boolean allowsChildren)
Creates a graph cell and initializes it with the specified user object. |
|
DefaultGraphCell(Object userObject,
MutableTreeNode[] children)
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. |
|
| Method Summary | |
AttributeMap |
changeAttributes(AttributeMap change)
Apply change to the cell and sync userObject. |
Object |
clone()
Create a clone of the cell. |
protected Object |
cloneUserObject()
Create a clone of the user object. |
AttributeMap |
getAttributes()
Returns the properies of the cell. |
List |
getChildren()
Provides access to the children list to change ordering. |
void |
setAttributes(AttributeMap attributes)
Sets the attributes. |
void |
setUserObject(Object obj)
Override parent method to synchronize value property and userObject. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Rectangle defaultBounds
protected AttributeMap attributes
| Constructor Detail |
public DefaultGraphCell()
public DefaultGraphCell(Object userObject)
userObject - an Object provided by the user that constitutes
the cell's data
public DefaultGraphCell(Object userObject,
MutableTreeNode[] children)
userObject - reference to the user objectchildren - array of children
public DefaultGraphCell(Object userObject,
boolean allowsChildren)
userObject - an Object provided by the user that constitutes
the cell's data| Method Detail |
public void setUserObject(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 MutableTreeNodesetUserObject in class DefaultMutableTreeNodepublic List getChildren()
Collections.EMPTY_LIST
if the list of childrenpoints to null.
public AttributeMap getAttributes()
getAttributes in interface GraphCellpublic AttributeMap changeAttributes(AttributeMap change)
change to the cell and sync userObject.
changeAttributes in interface GraphCellpublic void setAttributes(AttributeMap attributes)
setAttributes in interface GraphCellattributes - The attributes to setpublic Object clone()
clone in class DefaultMutableTreeNodeprotected Object cloneUserObject()
|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||