Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.
mxCell | Cells are the elements of the graph model. |
Variables | |
id | Holds the Id. |
value | Holds the user object. |
geometry | Holds the mxGeometry. |
style | Holds the style as a string of the form [(stylename|key=value);]. |
vertex | Specifies whether the cell is a vertex. |
edge | Specifies whether the cell is an edge. |
connectable | Specifies whether the cell is connectable. |
visible | Specifies whether the cell is visible. |
collapsed | Specifies whether the cell is collapsed. |
parent | Reference to the parent cell. |
source | Reference to the source terminal. |
target | Reference to the target terminal. |
children | Holds the child cells. |
edges | Holds the edges. |
Functions | |
mxCell | Constructs a new cell to be used in a graph model. |
getId | Returns the Id of the cell as a string. |
setId | Sets the Id of the cell to the given string. |
getValue | Returns the user object of the cell. |
setValue | Sets the user object of the cell. |
getGeometry | Returns the mxGeometry that describes the geometry. |
setGeometry | Sets the mxGeometry to be used as the geometry. |
getStyle | Returns a string that describes the style. |
setStyle | Sets the string to be used as the style. |
isVertex | Returns true if the cell is a vertex. |
setVertex | Specifies if the cell is a vertex. |
isEdge | Returns true if the cell is an edge. |
setEdge | Specifies if the cell is an edge. |
isConnectable | Returns true if the cell is connectable. |
setConnectable | Sets the connectable state. |
isVisible | Returns true if the cell is visibile. |
setVisible | Specifies if the cell is visible. |
isCollapsed | Returns true if the cell is collapsed. |
setCollapsed | Sets the collapsed state. |
getParent | Returns the cell’s parent. |
setParent | Sets the parent cell. |
getTerminal | Returns the source or target terminal. |
setTerminal | Sets the source or target terminal and returns the new terminal. |
getChildCount | Returns the number of child cells. |
getIndex | Returns the index of the specified child in the child array. |
getChildAt | Returns the child at the specified index. |
insert | Inserts the specified child into the child array at the specified index and updates the parent reference of the child. |
remove | Removes the child at the specified index from the child array and returns the child that was removed. |
removeFromParent | Removes the cell from its parent. |
getEdgeCount | Returns the number of edges in the edge array. |
getEdgeIndex | Returns the index of the specified edge in edges. |
getEdgeAt | Returns the edge at the specified index in edges. |
insertEdge | Inserts the specified edge into the edge array and returns the edge. |
removeEdge | Removes the specified edge from the edge array and returns the edge. |
removeFromTerminal | Removes the edge from its source or target terminal. |
getAttribute | Returns the specified attribute from the user object if it is an XML node. |
setAttribute | Sets the specified attribute on the user object if it is an XML node. |
copy | Returns a clone of the cell. |
copyValue | Returns a clone of the cell’s user object. |
var $geometry
Holds the mxGeometry. Default is null.
function mxCell( $value = null, $geometry = null, $style = null )
Constructs a new cell to be used in a graph model. This method invokes <onInit> upon completion.
value | Optional object that represents the cell value. |
geometry | Optional mxGeometry that specifies the geometry. |
style | Optional formatted string that defines the style. |
function getValue()
Returns the user object of the cell. The user object is stored in value.
function setValue( $value )
Sets the user object of the cell. The user object is stored in value.
function getGeometry()
Returns the mxGeometry that describes the geometry.
function setGeometry( $geometry )
Sets the mxGeometry to be used as the geometry.
function getStyle()
Returns a string that describes the style.
function setStyle( $style )
Sets the string to be used as the style.
function setParent( $parent )
Sets the parent cell.
parent | mxCell that represents the new parent. |
function setTerminal( $terminal, $source )
Sets the source or target terminal and returns the new terminal.
terminal | mxCell that represents the new source or target terminal. |
source | Boolean that specifies if the source or target terminal should be set. |
function insert( $child, $index = null )
Inserts the specified child into the child array at the specified index and updates the parent reference of the child. If not childIndex is specified then the child is appended to the child array. Returns the inserted child.
child | mxCell to be inserted or appended to the child array. |
index | Optional integer that specifies the index at which the child should be inserted into the child array. |
function getEdgeAt( $index )
Returns the edge at the specified index in edges.
index | Integer that specifies the index of the edge to be returned. |
function insertEdge( $edge, $outgoing )
Inserts the specified edge into the edge array and returns the edge. Will update the respective terminal reference of the edge.
edge | mxCell to be inserted into the edge array. |
outgoing | Boolean that specifies if the edge is outgoing. |
function removeEdge( $edge, $outgoing )
Removes the specified edge from the edge array and returns the edge. Will remove the respective terminal reference from the edge.
edge | mxCell to be removed from the edge array. |
outgoing | Boolean that specifies if the edge is outgoing. |
Holds the Id.
var $id
Holds the user object.
var $value
Holds the mxGeometry.
var $geometry
Holds the style as a string of the form [(stylename|key=value);].
var $style
Specifies whether the cell is a vertex.
var $vertex
Specifies whether the cell is an edge.
var $edge
Specifies whether the cell is connectable.
var $connectable
Specifies whether the cell is visible.
var $visible
Specifies whether the cell is collapsed.
var $collapsed
Reference to the parent cell.
var $parent
Reference to the source terminal.
var $source
Reference to the target terminal.
var $target
Holds the child cells.
var $children
Holds the edges.
var $edges
Constructs a new cell to be used in a graph model.
function mxCell( $value = null, $geometry = null, $style = null )
Returns the Id of the cell as a string.
function getId()
Sets the Id of the cell to the given string.
function setId( $id )
Returns the user object of the cell.
function getValue()
Sets the user object of the cell.
function setValue( $value )
Returns the mxGeometry that describes the geometry.
function getGeometry()
Sets the mxGeometry to be used as the geometry.
function setGeometry( $geometry )
Returns a string that describes the style.
function getStyle()
Sets the string to be used as the style.
function setStyle( $style )
Returns true if the cell is a vertex.
function isVertex()
Specifies if the cell is a vertex.
function setVertex( $vertex )
Returns true if the cell is an edge.
function isEdge()
Specifies if the cell is an edge.
function setEdge( $edge )
Returns true if the cell is connectable.
function isConnectable()
Sets the connectable state.
function setConnectable( $connectable )
Returns true if the cell is visibile.
function isVisible()
Specifies if the cell is visible.
function setVisible( $visible )
Returns true if the cell is collapsed.
function isCollapsed()
Sets the collapsed state.
function setCollapsed( $collapsed )
Returns the cell’s parent.
function getParent()
Sets the parent cell.
function setParent( $parent )
Returns the source or target terminal.
function getTerminal( $source )
Sets the source or target terminal and returns the new terminal.
function setTerminal( $terminal, $source )
Returns the number of child cells.
function getChildCount()
Returns the index of the specified child in the child array.
function getIndex( $child )
Returns the child at the specified index.
function getChildAt( $index )
Inserts the specified child into the child array at the specified index and updates the parent reference of the child.
function insert( $child, $index = null )
Removes the child at the specified index from the child array and returns the child that was removed.
function remove( $index )
Removes the cell from its parent.
function removeFromParent()
Returns the number of edges in the edge array.
function getEdgeCount()
Returns the index of the specified edge in edges.
function getEdgeIndex( $edge )
Returns the edge at the specified index in edges.
function getEdgeAt( $index )
Inserts the specified edge into the edge array and returns the edge.
function insertEdge( $edge, $outgoing )
Removes the specified edge from the edge array and returns the edge.
function removeEdge( $edge, $outgoing )
Removes the edge from its source or target terminal.
function removeFromTerminal( $source )
Returns the specified attribute from the user object if it is an XML node.
function getAttribute( $key, $defaultValue = null )
Sets the specified attribute on the user object if it is an XML node.
function setAttribute( $key, $value )
Returns a clone of the cell.
function copy()
Returns a clone of the cell’s user object.
function copyValue()