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. | |
bool | IsAncestor (Object parent, Object child) |
Returns true if the given parent is an ancestor of child. | |
bool | Contains (Object cell) |
Returns true if the model contains the given cell. | |
Object | GetParent (Object child) |
Returns the parent of the given cell. | |
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. | |
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. | |
int | GetChildCount (Object cell) |
Returns the number of children in the given cell. | |
Object | GetChildAt (Object parent, int index) |
Returns the child of the given parent at the given index. | |
Object | GetTerminal (Object edge, bool source) |
Returns the source or target terminal of the given edge depending on the value of the boolean parameter. | |
Object | SetTerminal (Object edge, Object terminal, bool source) |
Sets the source or target terminal of the given edge using. | |
int | GetEdgeCount (Object cell) |
Returns the number of distinct edges connected to the given cell. | |
Object | GetEdgeAt (Object cell, int index) |
Returns the edge of cell at the given index. | |
bool | IsVertex (Object cell) |
Returns true if the given cell is a vertex. | |
bool | IsEdge (Object cell) |
Returns true if the given cell is an edge. | |
bool | IsConnectable (Object cell) |
Returns true if the given cell is connectable. | |
Object | GetValue (Object cell) |
Returns the user object of the given cell. | |
Object | SetValue (Object cell, Object value) |
Sets the user object of then given cell. | |
mxGeometry | GetGeometry (Object cell) |
Returns the geometry of the given cell. | |
mxGeometry | SetGeometry (Object cell, mxGeometry geometry) |
Sets the geometry of the given cell. | |
string | GetStyle (Object cell) |
Returns the style of the given cell. | |
string | SetStyle (Object cell, string style) |
Sets the style of the given cell. | |
bool | IsCollapsed (Object cell) |
Returns true if the given cell is collapsed. | |
bool | SetCollapsed (Object cell, bool collapsed) |
Sets the collapsed state of the given cell. | |
bool | IsVisible (Object cell) |
Returns true if the given cell is visible. | |
bool | SetVisible (Object cell, bool visible) |
Sets the visible state of the given cell. | |
void | BeginUpdate () |
Increments the updateLevel by one. The event notification is queued until updateLevel reaches 0 by use of endUpdate. | |
void | EndUpdate () |
Decrements the updateLevel by one and fires a notification event if the updateLevel reaches 0. | |
Properties | |
Object | Root [get, set] |
Holds the root cell. | |
Events | |
mxGraphModelChangeEventHandler | GraphModelChange |
Called when the graph model has changed. |
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.
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.
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.
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.
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.
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.
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.
Object com::mxgraph::mxIGraphModel::Root [get, set] |
Holds the root cell.
Implemented in com::mxgraph::mxGraphModel.
mxGraphModelChangeEventHandler com::mxgraph::mxIGraphModel::GraphModelChange |
Called when the graph model has changed.
Implemented in com::mxgraph::mxGraphModel.