mxGraph
|
Defines the requirements for a graph model to be used with mxGraph. More...
Public Member Functions | |
Object[] | CloneCells (Object[] cells, bool includeChildren) |
Returns an array of clones for the given array of cells. Depending on the value of includeChildren, a deep clone is created for each cell. Connections are restored based if the corresponding cell is contained in the passed in array. More... | |
bool | IsAncestor (Object parent, Object child) |
Returns true if the given parent is an ancestor of child. More... | |
bool | Contains (Object cell) |
Returns true if the model contains the given cell. More... | |
Object | GetParent (Object child) |
Returns the parent of the given cell. More... | |
Object | Add (Object parent, Object child, int index) |
Adds the specified child to the parent at the given index. If no index is specified then the child is appended to the parent's array of children. More... | |
Object | Remove (Object parent) |
Removes the specified cell from the model. This operation will remove the cell and all of its children from the model. More... | |
int | GetChildCount (Object cell) |
Returns the number of children in the given cell. More... | |
Object | GetChildAt (Object parent, int index) |
Returns the child of the given parent at the given index. More... | |
Object | GetTerminal (Object edge, bool source) |
Returns the source or target terminal of the given edge depending on the value of the boolean parameter. More... | |
Object | SetTerminal (Object edge, Object terminal, bool source) |
Sets the source or target terminal of the given edge using. More... | |
int | GetEdgeCount (Object cell) |
Returns the number of distinct edges connected to the given cell. More... | |
Object | GetEdgeAt (Object cell, int index) |
Returns the edge of cell at the given index. More... | |
bool | IsVertex (Object cell) |
Returns true if the given cell is a vertex. More... | |
bool | IsEdge (Object cell) |
Returns true if the given cell is an edge. More... | |
bool | IsConnectable (Object cell) |
Returns true if the given cell is connectable. More... | |
Object | GetValue (Object cell) |
Returns the user object of the given cell. More... | |
Object | SetValue (Object cell, Object value) |
Sets the user object of then given cell. More... | |
mxGeometry | GetGeometry (Object cell) |
Returns the geometry of the given cell. More... | |
mxGeometry | SetGeometry (Object cell, mxGeometry geometry) |
Sets the geometry of the given cell. More... | |
string | GetStyle (Object cell) |
Returns the style of the given cell. More... | |
string | SetStyle (Object cell, string style) |
Sets the style of the given cell. More... | |
bool | IsCollapsed (Object cell) |
Returns true if the given cell is collapsed. More... | |
bool | SetCollapsed (Object cell, bool collapsed) |
Sets the collapsed state of the given cell. More... | |
bool | IsVisible (Object cell) |
Returns true if the given cell is visible. More... | |
bool | SetVisible (Object cell, bool visible) |
Sets the visible state of the given cell. More... | |
void | BeginUpdate () |
Increments the updateLevel by one. The event notification is queued until updateLevel reaches 0 by use of endUpdate. More... | |
void | EndUpdate () |
Decrements the updateLevel by one and fires a notification event if the updateLevel reaches 0. More... | |
Properties | |
Object | Root [get, set] |
Holds the root cell. More... | |
Events | |
mxGraphModelChangeEventHandler | GraphModelChange |
Called when the graph model has changed. More... | |
Defines the requirements for a graph model to be used with mxGraph.
Object com.mxgraph.mxIGraphModel.Add | ( | Object | parent, |
Object | child, | ||
int | index | ||
) |
Adds the specified child to the parent at the given index. If no index is specified then the child is appended to the parent's array of children.
parent | Cell that specifies the parent to contain the child. |
child | Cell that specifies the child to be inserted. |
index | Integer that specifies the index of the child. |
Implemented in com.mxgraph.mxGraphModel.
void com.mxgraph.mxIGraphModel.BeginUpdate | ( | ) |
Increments the updateLevel by one. The event notification is queued until updateLevel reaches 0 by use of endUpdate.
Implemented in com.mxgraph.mxGraphModel.
Object [] com.mxgraph.mxIGraphModel.CloneCells | ( | Object[] | cells, |
bool | includeChildren | ||
) |
Returns an array of clones for the given array of cells. Depending on the value of includeChildren, a deep clone is created for each cell. Connections are restored based if the corresponding cell is contained in the passed in array.
cells | Array of cells to be cloned. |
includeChildren | Boolean indicating if the cells should be cloned with all descendants. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.Contains | ( | Object | cell | ) |
Returns true if the model contains the given cell.
cell | Cell to be checked. |
Implemented in com.mxgraph.mxGraphModel.
void com.mxgraph.mxIGraphModel.EndUpdate | ( | ) |
Decrements the updateLevel by one and fires a notification event if the updateLevel reaches 0.
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.GetChildAt | ( | Object | parent, |
int | index | ||
) |
Returns the child of the given parent at the given index.
parent | Cell that represents the parent. |
index | Integer that specifies the index of the child to be returned. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxGraphView.GetBoundingBox(), com.mxgraph.mxGraphView.RemoveState(), com.mxgraph.mxGraphView.ValidateCell(), and com.mxgraph.mxGraphView.ValidateCellState().
int com.mxgraph.mxIGraphModel.GetChildCount | ( | Object | cell | ) |
Returns the number of children in the given cell.
cell | Cell whose number of children should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.GetEdgeAt | ( | Object | cell, |
int | index | ||
) |
Returns the edge of cell at the given index.
cell | Cell that specifies the vertex. |
index | Integer that specifies the index of the edge to return. |
Implemented in com.mxgraph.mxGraphModel.
int com.mxgraph.mxIGraphModel.GetEdgeCount | ( | Object | cell | ) |
Returns the number of distinct edges connected to the given cell.
cell | Cell that represents the vertex. |
Implemented in com.mxgraph.mxGraphModel.
mxGeometry com.mxgraph.mxIGraphModel.GetGeometry | ( | Object | cell | ) |
Returns the geometry of the given cell.
cell | Cell whose geometry should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.GetParent | ( | Object | child | ) |
Returns the parent of the given cell.
child | Cell whose parent should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxGraphView.GetVisibleTerminal(), com.mxgraph.mxGraphView.UpdateCellState(), and com.mxgraph.mxGraphView.ValidateCellState().
string com.mxgraph.mxIGraphModel.GetStyle | ( | Object | cell | ) |
Returns the style of the given cell.
cell | Cell whose style should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxUtils.SetCellStyleFlags(), and com.mxgraph.mxUtils.SetCellStyles().
Object com.mxgraph.mxIGraphModel.GetTerminal | ( | Object | edge, |
bool | source | ||
) |
Returns the source or target terminal of the given edge depending on the value of the boolean parameter.
edge | Cell that specifies the edge. |
source | Boolean indicating which end of the edge should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxGraphModel.GetDirectedEdgeCount(), and com.mxgraph.mxGraphModel.GetEdgesBetween().
Object com.mxgraph.mxIGraphModel.GetValue | ( | Object | cell | ) |
Returns the user object of the given cell.
cell | Cell whose user object should be returned. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.IsAncestor | ( | Object | parent, |
Object | child | ||
) |
Returns true if the given parent is an ancestor of child.
parent | Cell that specifies the parent. |
child | Cell that specifies the child. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.IsCollapsed | ( | Object | cell | ) |
Returns true if the given cell is collapsed.
cell | Cell whose collapsed state should be returned. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.IsConnectable | ( | Object | cell | ) |
Returns true if the given cell is connectable.
cell | Cell whose connectable state should be returned. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.IsEdge | ( | Object | cell | ) |
Returns true if the given cell is an edge.
cell | Cell that represents the possible edge. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxGraphModel.getChildCells(), com.mxgraph.mxGraphView.UpdateCellState(), and com.mxgraph.mxGraphView.ValidateCellState().
bool com.mxgraph.mxIGraphModel.IsVertex | ( | Object | cell | ) |
Returns true if the given cell is a vertex.
cell | Cell that represents the possible vertex. |
Implemented in com.mxgraph.mxGraphModel.
Referenced by com.mxgraph.mxGraphView.GetBounds(), com.mxgraph.mxGraphModel.getChildCells(), and com.mxgraph.mxGraphView.UpdateCellState().
bool com.mxgraph.mxIGraphModel.IsVisible | ( | Object | cell | ) |
Returns true if the given cell is visible.
cell | Cell whose visible state should be returned. |
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.Remove | ( | Object | parent | ) |
Removes the specified cell from the model. This operation will remove the cell and all of its children from the model.
parent | Cell that should be removed. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.SetCollapsed | ( | Object | cell, |
bool | collapsed | ||
) |
Sets the collapsed state of the given cell.
cell | Cell whose collapsed state should be changed. |
collapsed | Boolean that specifies the new collpased state. |
Implemented in com.mxgraph.mxGraphModel.
mxGeometry com.mxgraph.mxIGraphModel.SetGeometry | ( | Object | cell, |
mxGeometry | geometry | ||
) |
Sets the geometry of the given cell.
cell | Cell whose geometry should be changed. |
geometry | Object that defines the new geometry. |
Implemented in com.mxgraph.mxGraphModel.
string com.mxgraph.mxIGraphModel.SetStyle | ( | Object | cell, |
string | style | ||
) |
Sets the style of the given cell.
cell | Cell whose style should be changed. |
style | String of the form stylename[;key=value] to specify the new cell style. |
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.SetTerminal | ( | Object | edge, |
Object | terminal, | ||
bool | source | ||
) |
Sets the source or target terminal of the given edge using.
edge | Cell that specifies the edge. |
terminal | Cell that specifies the new terminal. |
source | Boolean indicating if the terminal is the new source or target terminal of the edge. |
Implemented in com.mxgraph.mxGraphModel.
Object com.mxgraph.mxIGraphModel.SetValue | ( | Object | cell, |
Object | value | ||
) |
Sets the user object of then given cell.
cell | Cell whose user object should be changed. |
value | Object that defines the new user object. |
Implemented in com.mxgraph.mxGraphModel.
bool com.mxgraph.mxIGraphModel.SetVisible | ( | Object | cell, |
bool | visible | ||
) |
Sets the visible state of the given cell.
cell | Cell whose visible state should be changed. |
visible | Boolean that specifies the new visible state. |
Implemented in com.mxgraph.mxGraphModel.
|
getset |
Holds the root cell.
mxGraphModelChangeEventHandler com.mxgraph.mxIGraphModel.GraphModelChange |
Called when the graph model has changed.