com::mxgraph::mxGraphModel Class Reference

Implements a graph model. The graph model acts as a wrapper around the cells which are in charge of storing the actual graph datastructure. The model acts as a transactional wrapper with event notification for all changes, whereas the cells contain the atomic operations for updating the actual datastructure. More...

Inheritance diagram for com::mxgraph::mxGraphModel:
com::mxgraph::mxIGraphModel

List of all members.

Public Member Functions

 mxGraphModel ()
 Constructs a new empty graph model.
 mxGraphModel (Object root)
 Constructs a new graph model. If no root is specified then a new root mxCell with a default layer is created.
void Clear ()
 Sets a new root using createRoot.
Object CreateRoot ()
 Creates a new root cell with a default layer (child 0).
Object GetCell (string id)
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.
string CreateId (Object cell)
 Creates a new Id for the given cell and increments the global counter for creating new Ids.
Object Remove (Object cell)
 see com.mxgraph.mxIGraphModel.Remove(Object)
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 isSource)
 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 isSource)
 Sets the source or target terminal of the given edge using.
void UpdateEdgeParents (Object cell)
 Updates the parents of the edges connected to the given cell and all its descendants so that each edge is contained in the nearest common ancestor.
void UpdateEdgeParents (Object cell, Object root)
 Updates the parents of the edges connected to the given cell and all its descendants so that the edge is contained in the nearest-common-ancestor.
void UpdateEdgeParent (Object edge, Object root)
 Inner helper method to update the parent of the specified edge to the nearest-common-ancestor of its two terminals.
mxPoint GetOrigin (Object cell)
 Returns the absolute, cummulated origin for the children inside the given parent.
Object GetNearestCommonAncestor (Object cell1, Object cell2)
 Returns the nearest common ancestor for the specified cells.
int GetEdgeCount (Object cell)
 see com.mxgraph.mxIGraphModel.GetEdgeCount(Object)
Object GetEdgeAt (Object parent, int index)
 see com.mxgraph.mxIGraphModel.GetEdgeAt(Object, int)
bool IsVertex (Object cell)
 see com.mxgraph.mxIGraphModel.IsVertex(Object)
bool IsEdge (Object cell)
 see com.mxgraph.mxIGraphModel.IsEdge(Object)
bool IsConnectable (Object cell)
 see com.mxgraph.mxIGraphModel.IsConnectable(Object)
Object GetValue (Object cell)
 see com.mxgraph.mxIGraphModel.GetValue(Object)
Object SetValue (Object cell, Object value)
 see com.mxgraph.mxIGraphModel.SetValue(Object, Object)
mxGeometry GetGeometry (Object cell)
 see com.mxgraph.mxIGraphModel.GetGeometry(Object)
mxGeometry SetGeometry (Object cell, mxGeometry geometry)
 see com.mxgraph.mxIGraphModel.SetGeometry(Object, mxGeometry)
string GetStyle (Object cell)
 see com.mxgraph.mxIGraphModel.GetStyle(Object)
string SetStyle (Object cell, string style)
 see com.mxgraph.mxIGraphModel.SetStyle(Object, string)
bool IsVisible (Object cell)
 see com.mxgraph.mxIGraphModel.IsVisible(Object)
bool SetVisible (Object cell, bool visible)
 see com.mxgraph.mxIGraphModel.SetVisible(Object, bool)
bool IsCollapsed (Object cell)
 see com.mxgraph.mxIGraphModel.IsCollapsed(Object)
bool SetCollapsed (Object cell, bool collapsed)
 see com.mxgraph.mxIGraphModel.SetCollapsed(Object, bool)
void BeginUpdate ()
 see com.mxgraph.mxIGraphModel.BeginUpdate()
void EndUpdate ()
 see com.mxgraph.mxIGraphModel.EndUpdate()
void MergeChildren (mxICell from, mxICell to, bool cloneAllEdges)
 Merges the children of the given cell into the given target cell inside this model. All cells are cloned unless there is a corresponding cell in the model with the same id, in which case the source cell is ignored and all edges are connected to the corresponding cell in this model. Edges are considered to have no identity and are always cloned unless the cloneAllEdges flag is set to false, in which case edges with the same id in the target model are reconnected to reflect the terminals of the source edges.

Static Public Member Functions

static int GetDirectedEdgeCount (mxIGraphModel model, Object cell, bool outgoing)
 Returns the number of incoming or outgoing edges.
static int GetDirectedEdgeCount (mxIGraphModel model, Object cell, bool outgoing, Object ignoredEdge)
 Returns the number of incoming or outgoing edges, ignoring the given edge.
static Object[] GetEdges (mxIGraphModel model, Object cell)
 Returns all edges connected to this cell including loops.
static Object[] GetConnections (mxIGraphModel model, Object cell)
 Returns all edges connected to this cell without loops.
static Object[] GetIncomingEdges (mxIGraphModel model, Object cell)
 Returns the incoming edges of the given cell without loops.
static Object[] GetOutgoingEdges (mxIGraphModel model, Object cell)
 Returns the outgoing edges of the given cell without loops.
static Object[] GetEdges (mxIGraphModel model, Object cell, bool incoming, bool outgoing, bool includeLoops)
 Returns all distinct edges connected to this 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.
static Object[] GetEdgesBetween (mxIGraphModel model, Object source, Object target)
 Returns all edges between the given source and target mxCells. If the optional boolean directed argument is false, then a matching edge is returned regardless of its direction.
static Object[] GetEdgesBetween (mxIGraphModel model, Object source, Object target, bool directed)
 Returns all edges between the given source and target mxCells. If the optional boolean directed argument is false, then a matching edge is returned regardless of its direction.
static Object[] GetOpposites (mxIGraphModel model, Object[] edges, Object terminal, bool sources, bool targets)
 Returns all opposite vertices wrt terminal for the given edges, only$ returning sources and/or targets as specified. The result is returned as an array of mxCells.
static void SetTerminals (mxIGraphModel model, Object edge, Object source, Object target)
 Sets the source and target of the given edge in a single atomic change.
static Object[] getChildVertices (mxIGraphModel model, Object parent)
 Returns the child vertices of the given parent.
static Object[] getChildEdges (mxIGraphModel model, Object parent)
 Returns the child edges of the given parent.
static Object[] getChildCells (mxIGraphModel model, Object parent, bool vertices, bool edges)
 Returns the children of the given cell that are vertices and/or edges depending on the arguments.

Protected Member Functions

Object CloneCell (Object cell, Hashtable mapping, bool includeChildren)
 Inner helper method for cloning cells recursively.
void RestoreClone (Object clone, Object cell, Hashtable mapping)
 Inner helper method for restoring the connections in a network of cloned cells.
void CellAdded (Object cell)
 Invoked after a cell has been added to a parent. This recursively creates an Id for the new cell and/or resolves Id collisions.
void CellRemoved (Object cell)
 Invoked after a cell has been removed from the model. This recursively removes the cell from its terminals and removes the mapping from the Id to the cell.
void MergeChildrenImpl (mxICell from, mxICell to, bool cloneAllEdges, Dictionary< Object, Object > mapping)
 Clones the children of the source cell into the given target cell in this model and adds an entry to the mapping that maps from the source cell to the target cell with the same id or the clone of the source cell that was inserted into this model.

Protected Attributes

mxICell root
 Holds the root cell, which in turn contains the cells that represent the layers of the diagram as child cells. That is, the actual element of the diagram are supposed to live in the third generation of cells and below.
Dictionary< Object, Object > cells
 Maps from Ids to cells.
bool createIds = true
 Specifies if edges should automatically be moved into the nearest common ancestor of their terminals. Default is true.
bool maintainEdgeParent = true
 Specifies if the parent of edges should be automatically change to point to the nearest common ancestor of its terminals. Default is true.
int nextId = 0
 Specifies the next Id to be created. Initial value is 0.
int updateLevel = 0
 Counter for the depth of nested transactions. Each call to beginUpdate increments this counter and each call to endUpdate decrements it. When the counter reaches 0, the transaction is closed and the respective events are fired. Initial value is 0.

Properties

bool IsMaintainEdgeParent [get, set]
 Sets of returns if edges should automatically be moved into the nearest common ancestor of their terminals.
bool IsCreateIds [get, set]
 Sets or returns if the model automatically creates Ids and resolves Id collisions.
Object Root [get, set]
 Holds the root cell.

Events

mxGraphModelChangeEventHandler GraphModelChange
 Fires when the graph model has changed.

Detailed Description

Implements a graph model. The graph model acts as a wrapper around the cells which are in charge of storing the actual graph datastructure. The model acts as a transactional wrapper with event notification for all changes, whereas the cells contain the atomic operations for updating the actual datastructure.


Constructor & Destructor Documentation

com::mxgraph::mxGraphModel::mxGraphModel (  )  [inline]

Constructs a new empty graph model.

com::mxgraph::mxGraphModel::mxGraphModel ( Object  root  )  [inline]

Constructs a new graph model. If no root is specified then a new root mxCell with a default layer is created.

Parameters:
root Cell that represents the root cell.

Member Function Documentation

Object com::mxgraph::mxGraphModel::Add ( Object  parent,
Object  child,
int  index 
) [inline]

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.

Parameters:
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.
Returns:
Returns the inserted child.

Implements com::mxgraph::mxIGraphModel.

void com::mxgraph::mxGraphModel::BeginUpdate (  )  [inline]
void com::mxgraph::mxGraphModel::CellAdded ( Object  cell  )  [inline, protected]

Invoked after a cell has been added to a parent. This recursively creates an Id for the new cell and/or resolves Id collisions.

Parameters:
cell Cell that has been added.
void com::mxgraph::mxGraphModel::CellRemoved ( Object  cell  )  [inline, protected]

Invoked after a cell has been removed from the model. This recursively removes the cell from its terminals and removes the mapping from the Id to the cell.

Parameters:
cell Cell that has been removed.
void com::mxgraph::mxGraphModel::Clear (  )  [inline]

Sets a new root using createRoot.

Object com::mxgraph::mxGraphModel::CloneCell ( Object  cell,
Hashtable  mapping,
bool  includeChildren 
) [inline, protected]

Inner helper method for cloning cells recursively.

Object [] com::mxgraph::mxGraphModel::CloneCells ( Object[]  cells,
bool  includeChildren 
) [inline]

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.

Parameters:
cells Array of cells to be cloned.
includeChildren Boolean indicating if the cells should be cloned with all descendants.
Returns:
Returns a cloned array of cells.

Implements com::mxgraph::mxIGraphModel.

bool com::mxgraph::mxGraphModel::Contains ( Object  cell  )  [inline]

Returns true if the model contains the given cell.

Parameters:
cell Cell to be checked.
Returns:
Returns true if the cell is in the model.

Implements com::mxgraph::mxIGraphModel.

string com::mxgraph::mxGraphModel::CreateId ( Object  cell  )  [inline]

Creates a new Id for the given cell and increments the global counter for creating new Ids.

Parameters:
cell Cell for which a new Id should be created.
Returns:
Returns a new Id for the given cell.
Object com::mxgraph::mxGraphModel::CreateRoot (  )  [inline]

Creates a new root cell with a default layer (child 0).

void com::mxgraph::mxGraphModel::EndUpdate (  )  [inline]
Object com::mxgraph::mxGraphModel::GetCell ( string  id  )  [inline]
Parameters:
id 
Returns:
Object com::mxgraph::mxGraphModel::GetChildAt ( Object  parent,
int  index 
) [inline]

Returns the child of the given parent at the given index.

Parameters:
parent Cell that represents the parent.
index Integer that specifies the index of the child to be returned.
Returns:
Returns the child at index in parent.

Implements com::mxgraph::mxIGraphModel.

static Object [] com::mxgraph::mxGraphModel::getChildCells ( mxIGraphModel  model,
Object  parent,
bool  vertices,
bool  edges 
) [inline, static]

Returns the children of the given cell that are vertices and/or edges depending on the arguments.

Parameters:
model Model that contains the hierarchical information.
parent Cell whose child vertices or edges should be returned.
vertices Boolean indicating if child vertices should be returned.
edges Boolean indicating if child edges should be returned.
Returns:
Returns the child vertices and/or edges of the given parent.
int com::mxgraph::mxGraphModel::GetChildCount ( Object  cell  )  [inline]

Returns the number of children in the given cell.

Parameters:
cell Cell whose number of children should be returned.
Returns:
Returns the number of children in the given cell.

Implements com::mxgraph::mxIGraphModel.

static Object [] com::mxgraph::mxGraphModel::getChildEdges ( mxIGraphModel  model,
Object  parent 
) [inline, static]

Returns the child edges of the given parent.

Parameters:
model Model that contains the hierarchical information.
parent Cell whose child edges should be returned.
Returns:
Returns the child edges of the given parent.
static Object [] com::mxgraph::mxGraphModel::getChildVertices ( mxIGraphModel  model,
Object  parent 
) [inline, static]

Returns the child vertices of the given parent.

Parameters:
model Model that contains the hierarchical information.
parent Cell whose child vertices should be returned.
Returns:
Returns the child vertices of the given parent.
static Object [] com::mxgraph::mxGraphModel::GetConnections ( mxIGraphModel  model,
Object  cell 
) [inline, static]

Returns all edges connected to this cell without loops.

Parameters:
model Model that contains the connection information
cell Cell whose connections should be returned
Returns:
Returns the array of connected edges for the given cell
static int com::mxgraph::mxGraphModel::GetDirectedEdgeCount ( mxIGraphModel  model,
Object  cell,
bool  outgoing,
Object  ignoredEdge 
) [inline, static]

Returns the number of incoming or outgoing edges, ignoring the given edge.

Parameters:
model Graph model that contains the connection data.
cell Cell whose edges should be counted.
outgoing Boolean that specifies if the number of outgoing or incoming edges should be returned.
ignoredEdge Object that represents an edge to be ignored.
Returns:
Returns the number of incoming or outgoing edges.
static int com::mxgraph::mxGraphModel::GetDirectedEdgeCount ( mxIGraphModel  model,
Object  cell,
bool  outgoing 
) [inline, static]

Returns the number of incoming or outgoing edges.

Parameters:
model Graph model that contains the connection data.
cell Cell whose edges should be counted.
outgoing Boolean that specifies if the number of outgoing or incoming edges should be returned.
Returns:
Returns the number of incoming or outgoing edges.
Object com::mxgraph::mxGraphModel::GetEdgeAt ( Object  parent,
int  index 
) [inline]
int com::mxgraph::mxGraphModel::GetEdgeCount ( Object  cell  )  [inline]
static Object [] com::mxgraph::mxGraphModel::GetEdges ( mxIGraphModel  model,
Object  cell,
bool  incoming,
bool  outgoing,
bool  includeLoops 
) [inline, static]

Returns all distinct edges connected to this 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.

Parameters:
model Model that contains the connection information
cell Cell whose connections should be returned
incoming Specifies if incoming edges should be returned
outgoing Specifies if outgoing edges should be returned
includeLoops Specifies if loops should be returned
Returns:
Returns the array of connected edges for the given cell
static Object [] com::mxgraph::mxGraphModel::GetEdges ( mxIGraphModel  model,
Object  cell 
) [inline, static]

Returns all edges connected to this cell including loops.

Parameters:
model Model that contains the connection information
cell Cell whose connections should be returned
Returns:
static Object [] com::mxgraph::mxGraphModel::GetEdgesBetween ( mxIGraphModel  model,
Object  source,
Object  target,
bool  directed 
) [inline, static]

Returns all edges between the given source and target mxCells. If the optional boolean directed argument is false, then a matching edge is returned regardless of its direction.

Parameters:
model The graph model that contains the graph.
source mxCell that defines the source terminal of the edge to be returned.
target mxCell that defines the target terminal of the edge to be returned.
directed Optional boolean that specifies if the direction of the edge should be taken into account. Default is true.
Returns:
static Object [] com::mxgraph::mxGraphModel::GetEdgesBetween ( mxIGraphModel  model,
Object  source,
Object  target 
) [inline, static]

Returns all edges between the given source and target mxCells. If the optional boolean directed argument is false, then a matching edge is returned regardless of its direction.

Parameters:
model 
source 
target 
Returns:
mxGeometry com::mxgraph::mxGraphModel::GetGeometry ( Object  cell  )  [inline]
static Object [] com::mxgraph::mxGraphModel::GetIncomingEdges ( mxIGraphModel  model,
Object  cell 
) [inline, static]

Returns the incoming edges of the given cell without loops.

Parameters:
model Graphmodel that contains the edges
cell Cell whose incoming edges should be returned
Returns:
Returns the incoming edges for the given cell
Object com::mxgraph::mxGraphModel::GetNearestCommonAncestor ( Object  cell1,
Object  cell2 
) [inline]

Returns the nearest common ancestor for the specified cells.

Parameters:
cell1 Cell that specifies the first cell in the tree.
cell2 Cell that specifies the second cell in the tree.
Returns:
Returns the nearest common ancestor of the given cells.
static Object [] com::mxgraph::mxGraphModel::GetOpposites ( mxIGraphModel  model,
Object[]  edges,
Object  terminal,
bool  sources,
bool  targets 
) [inline, static]

Returns all opposite vertices wrt terminal for the given edges, only$ returning sources and/or targets as specified. The result is returned as an array of mxCells.

Parameters:
model Model that contains the graph.
edges Array of edges to be examined.
terminal Cell that specifies the known end of the edges.
sources Boolean that specifies if source terminals should be contained in the result. Default is true.
targets Boolean that specifies if target terminals should be contained in the result. Default is true.
Returns:
Returns the array of opposite terminals for the given edges.
mxPoint com::mxgraph::mxGraphModel::GetOrigin ( Object  cell  )  [inline]

Returns the absolute, cummulated origin for the children inside the given parent.

static Object [] com::mxgraph::mxGraphModel::GetOutgoingEdges ( mxIGraphModel  model,
Object  cell 
) [inline, static]

Returns the outgoing edges of the given cell without loops.

Parameters:
model Graphmodel that contains the edges
cell Cell whose outgoing edges should be returned
Returns:
Returns the outgoing edges for the given cell
Object com::mxgraph::mxGraphModel::GetParent ( Object  child  )  [inline]

Returns the parent of the given cell.

Parameters:
child Cell whose parent should be returned.
Returns:
Returns the parent of the given cell.

Implements com::mxgraph::mxIGraphModel.

string com::mxgraph::mxGraphModel::GetStyle ( Object  cell  )  [inline]
Object com::mxgraph::mxGraphModel::GetTerminal ( Object  edge,
bool  source 
) [inline]

Returns the source or target terminal of the given edge depending on the value of the boolean parameter.

Parameters:
edge Cell that specifies the edge.
source Boolean indicating which end of the edge should be returned.
Returns:
Returns the source or target of the given edge.

Implements com::mxgraph::mxIGraphModel.

Object com::mxgraph::mxGraphModel::GetValue ( Object  cell  )  [inline]
bool com::mxgraph::mxGraphModel::IsAncestor ( Object  parent,
Object  child 
) [inline]

Returns true if the given parent is an ancestor of child.

Parameters:
parent Cell that specifies the parent.
child Cell that specifies the child.
Returns:
Returns true if child is an ancestor of parent.

Implements com::mxgraph::mxIGraphModel.

bool com::mxgraph::mxGraphModel::IsCollapsed ( Object  cell  )  [inline]
bool com::mxgraph::mxGraphModel::IsConnectable ( Object  cell  )  [inline]
bool com::mxgraph::mxGraphModel::IsEdge ( Object  cell  )  [inline]
bool com::mxgraph::mxGraphModel::IsVertex ( Object  cell  )  [inline]
bool com::mxgraph::mxGraphModel::IsVisible ( Object  cell  )  [inline]
void com::mxgraph::mxGraphModel::MergeChildren ( mxICell  from,
mxICell  to,
bool  cloneAllEdges 
) [inline]

Merges the children of the given cell into the given target cell inside this model. All cells are cloned unless there is a corresponding cell in the model with the same id, in which case the source cell is ignored and all edges are connected to the corresponding cell in this model. Edges are considered to have no identity and are always cloned unless the cloneAllEdges flag is set to false, in which case edges with the same id in the target model are reconnected to reflect the terminals of the source edges.

Parameters:
from 
to 
cloneAllEdges 
void com::mxgraph::mxGraphModel::MergeChildrenImpl ( mxICell  from,
mxICell  to,
bool  cloneAllEdges,
Dictionary< Object, Object >  mapping 
) [inline, protected]

Clones the children of the source cell into the given target cell in this model and adds an entry to the mapping that maps from the source cell to the target cell with the same id or the clone of the source cell that was inserted into this model.

Parameters:
from 
to 
cloneAllEdges 
mapping 
Object com::mxgraph::mxGraphModel::Remove ( Object  cell  )  [inline]

see com.mxgraph.mxIGraphModel.Remove(Object)

Parameters:
cell 
Returns:

Implements com::mxgraph::mxIGraphModel.

void com::mxgraph::mxGraphModel::RestoreClone ( Object  clone,
Object  cell,
Hashtable  mapping 
) [inline, protected]

Inner helper method for restoring the connections in a network of cloned cells.

bool com::mxgraph::mxGraphModel::SetCollapsed ( Object  cell,
bool  collapsed 
) [inline]
mxGeometry com::mxgraph::mxGraphModel::SetGeometry ( Object  cell,
mxGeometry  geometry 
) [inline]
string com::mxgraph::mxGraphModel::SetStyle ( Object  cell,
string  style 
) [inline]
Object com::mxgraph::mxGraphModel::SetTerminal ( Object  edge,
Object  terminal,
bool  source 
) [inline]

Sets the source or target terminal of the given edge using.

Parameters:
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.

Implements com::mxgraph::mxIGraphModel.

static void com::mxgraph::mxGraphModel::SetTerminals ( mxIGraphModel  model,
Object  edge,
Object  source,
Object  target 
) [inline, static]

Sets the source and target of the given edge in a single atomic change.

Parameters:
model Model that contains the graph.
edge Cell that specifies the edge.
source Cell that specifies the new source terminal.
target Cell that specifies the new target terminal.
Object com::mxgraph::mxGraphModel::SetValue ( Object  cell,
Object  value 
) [inline]
bool com::mxgraph::mxGraphModel::SetVisible ( Object  cell,
bool  visible 
) [inline]
void com::mxgraph::mxGraphModel::UpdateEdgeParent ( Object  edge,
Object  root 
) [inline]

Inner helper method to update the parent of the specified edge to the nearest-common-ancestor of its two terminals.

Parameters:
edge Specifies the edge to be updated.
root Current root of the model.
void com::mxgraph::mxGraphModel::UpdateEdgeParents ( Object  cell,
Object  root 
) [inline]

Updates the parents of the edges connected to the given cell and all its descendants so that the edge is contained in the nearest-common-ancestor.

Parameters:
cell Cell whose edges should be checked and updated.
root Root of the cell hierarchy that contains all cells.
void com::mxgraph::mxGraphModel::UpdateEdgeParents ( Object  cell  )  [inline]

Updates the parents of the edges connected to the given cell and all its descendants so that each edge is contained in the nearest common ancestor.

Parameters:
cell Cell whose edges should be checked and updated.

Member Data Documentation

Dictionary<Object, Object> com::mxgraph::mxGraphModel::cells [protected]

Maps from Ids to cells.

bool com::mxgraph::mxGraphModel::createIds = true [protected]

Specifies if edges should automatically be moved into the nearest common ancestor of their terminals. Default is true.

Specifies if the parent of edges should be automatically change to point to the nearest common ancestor of its terminals. Default is true.

Specifies the next Id to be created. Initial value is 0.

Holds the root cell, which in turn contains the cells that represent the layers of the diagram as child cells. That is, the actual element of the diagram are supposed to live in the third generation of cells and below.

Counter for the depth of nested transactions. Each call to beginUpdate increments this counter and each call to endUpdate decrements it. When the counter reaches 0, the transaction is closed and the respective events are fired. Initial value is 0.


Property Documentation

bool com::mxgraph::mxGraphModel::IsCreateIds [get, set]

Sets or returns if the model automatically creates Ids and resolves Id collisions.

bool com::mxgraph::mxGraphModel::IsMaintainEdgeParent [get, set]

Sets of returns if edges should automatically be moved into the nearest common ancestor of their terminals.

Object com::mxgraph::mxGraphModel::Root [get, set]

Holds the root cell.

Implements com::mxgraph::mxIGraphModel.


Event Documentation

mxGraphModelChangeEventHandler com::mxgraph::mxGraphModel::GraphModelChange

Fires when the graph model has changed.

Implements com::mxgraph::mxIGraphModel.


The documentation for this class was generated from the following file:
Generated on Fri May 25 10:15:54 2012 for mxGraph by  doxygen 1.6.3