Holds the child cells.
Specifies whether the cell is collapsed. Default is false.
Specifies whether the cell is connectable. Default is true.
Specifies whether the cell is an edge. Default is false.
Holds the edges.
Holds the Geometry. Default is null.
Holds the Id. Default is null.
List of members that should not be cloned inside
Reference to the parent cell.
Reference to the source terminal.
Holds the style as a string of the form [(stylename|key=value);]. Default is null.
Reference to the target terminal.
Holds the user object. Default is null.
Specifies whether the cell is a vertex. Default is false.
Specifies whether the cell is visible. Default is true.
Returns a clone of the cell.
Uses cloneValue to clone the user object.
All fields in mxTransient are ignored during the cloning.
Visits all cells recursively and applies the specified filter function to each cell. If the function returns true then the cell is added to the resulting array. The parent and result paramters are optional. If parent is not specified then the recursion starts at root.
Example: The following example extracts all vertices from a given model:
var filter(cell)
{
return model.isVertex(cell);
}
var vertices = model.filterDescendants(filter);
JavaScript function that takes an Cell as an argument and returns a boolean.
Returns the children of the given cell that are vertices and/or edges depending on the arguments.
Boolean indicating if child vertices should be returned. Default is false.
Boolean indicating if child edges should be returned. Default is false.
Use this method to get the style object to later update it and propagate changes to the view.
See GraphDataModel.setStyle for more details.
Returns the number of incoming or outgoing edges, ignoring the given edge.
Boolean that specifies if the number of outgoing or incoming edges should be returned.
that represents an edge to be ignored.
Returns the index of the specified edge in
Returns all distinct edges connected to this cell as a new array of Cell. If at least one of incoming or outgoing is true, then loops are ignored, otherwise if both are false, then all edges connected to the given cell are returned including loops.
Optional boolean that specifies if incoming edges should be returned. Default is true.
Optional boolean that specifies if outgoing edges should be returned. Default is true.
Optional boolean that specifies if loops should be returned. Default is true.
Returns the index of the specified child in the child array.
Child whose index should be returned.
Returns a string that describes the style.
IMPORTANT: if you want to get the style object to later update it and propagate changes to the view, use getClonedStyle instead.
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.
Optional
index: numberInserts the specified edge into the edge array and returns the edge. Will update the respective terminal reference of the edge.
Boolean that specifies if the edge is outgoing.
Returns true if the given parent is an ancestor of the given child. Note returns true if child == parent.
that specifies the child.
Sets the parent cell.
Sets the string to be used as the style.
Sets the source or target terminal and returns the new terminal.
Cell that represents the new source or target terminal.
boolean that specifies if the source or target terminal should be set.
Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.
Custom attributes
For custom attributes we recommend using an XML node as the value of a cell. The following code can be used to create a cell with an XML node as the value:
For the label to work, graph.convertValueToString and graph.cellLabelChanged should be overridden as follows:
Cell