|
JGraph X 2.1.0.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.model.mxCell
public class mxCell
Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.
| Field Summary | |
|---|---|
protected List<Object> |
children
Holds the child cells and connected edges. |
protected boolean |
collapsed
Specifies whether the cell is a vertex or edge and whether it is connectable, visible and collapsed. |
protected boolean |
connectable
Specifies whether the cell is a vertex or edge and whether it is connectable, visible and collapsed. |
protected boolean |
edge
Specifies whether the cell is a vertex or edge and whether it is connectable, visible and collapsed. |
protected List<Object> |
edges
Holds the child cells and connected edges. |
protected mxGeometry |
geometry
Holds the geometry. |
protected String |
id
Holds the Id. |
protected mxICell |
parent
Reference to the parent cell and source and target terminals for edges. |
protected mxICell |
source
Reference to the parent cell and source and target terminals for edges. |
protected String |
style
Holds the style as a string of the form stylename[;key=value]. |
protected mxICell |
target
Reference to the parent cell and source and target terminals for edges. |
protected Object |
value
Holds the user object. |
protected boolean |
vertex
Specifies whether the cell is a vertex or edge and whether it is connectable, visible and collapsed. |
protected boolean |
visible
Specifies whether the cell is a vertex or edge and whether it is connectable, visible and collapsed. |
| Constructor Summary | |
|---|---|
mxCell()
Constructs a new cell with an empty user object. |
|
mxCell(Object value)
Constructs a new cell for the given user object. |
|
mxCell(Object value,
mxGeometry geometry,
String style)
Constructs a new cell for the given parameters. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a clone of the cell. |
protected Object |
cloneValue()
Returns a clone of the user object. |
String |
getAttribute(String name)
Returns the specified attribute from the user object if it is an XML node. |
String |
getAttribute(String name,
String defaultValue)
Returns the specified attribute from the user object if it is an XML node. |
mxICell |
getChildAt(int index)
Returns the child at the specified index. |
int |
getChildCount()
Returns the number of child cells. |
mxICell |
getEdgeAt(int index)
Returns the edge at the specified index in the edge array. |
int |
getEdgeCount()
Returns the number of edges in the edge array. |
int |
getEdgeIndex(mxICell edge)
Returns the index of the specified edge in the edge array. |
mxGeometry |
getGeometry()
Returns the object that describes the geometry. |
String |
getId()
Returns the Id of the cell as a string. |
int |
getIndex(mxICell child)
Returns the index of the specified child in the child array. |
mxICell |
getParent()
Returns the cell's parent. |
mxICell |
getSource()
Returns the source terminal. |
String |
getStyle()
Returns the string that describes the style. |
mxICell |
getTarget()
Returns the target terminal. |
mxICell |
getTerminal(boolean source)
Returns the source or target terminal. |
Object |
getValue()
Returns the user object of the cell. |
mxICell |
insert(mxICell child)
Appends the specified child into the child array and updates the parent reference of the child. |
mxICell |
insert(mxICell child,
int index)
Inserts the specified child into the child array at the specified index and updates the parent reference of the child. |
mxICell |
insertEdge(mxICell edge,
boolean isOutgoing)
Inserts the specified edge into the edge array and returns the edge. |
boolean |
isCollapsed()
Returns true if the cell is collapsed. |
boolean |
isConnectable()
Returns true if the cell is connectable. |
boolean |
isEdge()
Returns true if the cell is an edge. |
boolean |
isVertex()
Returns true if the cell is a vertex. |
boolean |
isVisible()
Returns true if the cell is visibile. |
mxICell |
remove(int index)
Removes the child at the specified index from the child array and returns the child that was removed. |
mxICell |
remove(mxICell child)
Removes the given child from the child array and returns it. |
mxICell |
removeEdge(mxICell edge,
boolean isOutgoing)
Removes the specified edge from the edge array and returns the edge. |
void |
removeFromParent()
Removes the cell from its parent. |
void |
removeFromTerminal(boolean isSource)
Removes the edge from its source or target terminal. |
void |
setAttribute(String name,
String value)
Sets the specified attribute on the user object if it is an XML node. |
void |
setCollapsed(boolean collapsed)
Sets the collapsed state. |
void |
setConnectable(boolean connectable)
|
void |
setEdge(boolean edge)
|
void |
setGeometry(mxGeometry geometry)
Sets the object to be used as the geometry. |
void |
setId(String id)
Sets the Id of the cell to the given string. |
void |
setParent(mxICell parent)
Sets the parent cell. |
void |
setSource(mxICell source)
Sets the source terminal. |
void |
setStyle(String style)
Sets the string to be used as the style. |
void |
setTarget(mxICell target)
Sets the target terminal. |
mxICell |
setTerminal(mxICell terminal,
boolean isSource)
Sets the source or target terminal and returns the new terminal. |
void |
setValue(Object value)
Sets the user object of the cell. |
void |
setVertex(boolean vertex)
|
void |
setVisible(boolean visible)
Specifies if the cell is visible. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String id
protected Object value
protected mxGeometry geometry
protected String style
protected boolean vertex
protected boolean edge
protected boolean connectable
protected boolean visible
protected boolean collapsed
protected mxICell parent
protected mxICell source
protected mxICell target
protected List<Object> children
protected List<Object> edges
| Constructor Detail |
|---|
public mxCell()
public mxCell(Object value)
value - Object that represents the value of the cell.
public mxCell(Object value,
mxGeometry geometry,
String style)
value - Object that represents the value of the cell.geometry - Specifies the geometry of the cell.style - Specifies the style as a formatted string.| Method Detail |
|---|
public String getId()
mxICell
getId in interface mxICellpublic void setId(String id)
mxICell
setId in interface mxICellid - String that represents the new Id.public Object getValue()
mxICell
getValue in interface mxICellpublic void setValue(Object value)
mxICell
setValue in interface mxICellvalue - Object that represents the new value.public mxGeometry getGeometry()
mxICell
getGeometry in interface mxICellpublic void setGeometry(mxGeometry geometry)
mxICell
setGeometry in interface mxICellpublic String getStyle()
mxICell
getStyle in interface mxICellpublic void setStyle(String style)
mxICell
setStyle in interface mxICellpublic boolean isVertex()
mxICell
isVertex in interface mxICellpublic void setVertex(boolean vertex)
public boolean isEdge()
mxICell
isEdge in interface mxICellpublic void setEdge(boolean edge)
public boolean isConnectable()
mxICell
isConnectable in interface mxICellpublic void setConnectable(boolean connectable)
public boolean isVisible()
mxICell
isVisible in interface mxICellpublic void setVisible(boolean visible)
mxICell
setVisible in interface mxICellvisible - Boolean that specifies the new visible state.public boolean isCollapsed()
mxICell
isCollapsed in interface mxICellpublic void setCollapsed(boolean collapsed)
mxICell
setCollapsed in interface mxICellcollapsed - Boolean that specifies the new collapsed state.public mxICell getParent()
mxICell
getParent in interface mxICellpublic void setParent(mxICell parent)
mxICell
setParent in interface mxICellparent - Cell that represents the new parent.public mxICell getSource()
public void setSource(mxICell source)
source - Cell that represents the new source terminal.public mxICell getTarget()
public void setTarget(mxICell target)
target - Cell that represents the new target terminal.public mxICell getTerminal(boolean source)
mxICell
getTerminal in interface mxICellsource - Boolean that specifies if the source terminal should be
returned.
public mxICell setTerminal(mxICell terminal,
boolean isSource)
mxICell
setTerminal in interface mxICellterminal - Cell that represents the new source or target terminal.isSource - Boolean that specifies if the source or target terminal
should be set.
public int getChildCount()
mxICell
getChildCount in interface mxICellpublic int getIndex(mxICell child)
mxICell
getIndex in interface mxICellchild - Child whose index should be returned.
public mxICell getChildAt(int index)
mxICell
getChildAt in interface mxICellindex - Integer that specifies the child to be returned.
public mxICell insert(mxICell child)
mxICell
insert in interface mxICellchild - Cell to be appended to the child array.
public mxICell insert(mxICell child,
int index)
mxICell
insert in interface mxICellchild - Cell to be inserted into the child array.index - Integer that specifies the index at which the child should
be inserted into the child array.
public mxICell remove(int index)
mxICell
remove in interface mxICellindex - Integer that specifies the index of the child to be
removed.
public mxICell remove(mxICell child)
mxICell
remove in interface mxICellchild - Cell that represents the child to be removed.
public void removeFromParent()
mxICell
removeFromParent in interface mxICellpublic int getEdgeCount()
mxICell
getEdgeCount in interface mxICellpublic int getEdgeIndex(mxICell edge)
mxICell
getEdgeIndex in interface mxICelledge - Cell whose index should be returned.
public mxICell getEdgeAt(int index)
mxICell
getEdgeAt in interface mxICellindex - Integer that specifies the index of the edge to be
returned.
public mxICell insertEdge(mxICell edge,
boolean isOutgoing)
mxICell
insertEdge in interface mxICelledge - Cell to be inserted into the edge array.isOutgoing - Boolean that specifies if the edge is outgoing.
public mxICell removeEdge(mxICell edge,
boolean isOutgoing)
mxICell
removeEdge in interface mxICelledge - Cell to be removed from the edge array.isOutgoing - Boolean that specifies if the edge is outgoing.
public void removeFromTerminal(boolean isSource)
mxICell
removeFromTerminal in interface mxICellisSource - Boolean that specifies if the edge should be removed
from its source or target terminal.public String getAttribute(String name)
name - Name of the attribute whose value should be returned.
public String getAttribute(String name,
String defaultValue)
name - Name of the attribute whose value should be returned.defaultValue - Default value to use if the attribute has no value.
public void setAttribute(String name,
String value)
name - Name of the attribute whose value should be set.value - New value of the attribute.
public Object clone()
throws CloneNotSupportedException
clone in interface mxICellclone in class ObjectCloneNotSupportedExceptionprotected Object cloneValue()
|
JGraph X 2.1.0.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||