com::mxgraph::mxIGraphModel Interface Reference

Defines the requirements for a graph model to be used with mxGraph. More...

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

List of all members.

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.

Detailed Description

Defines the requirements for a graph model to be used with mxGraph.


Member Function Documentation

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.

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.

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.

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.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::Contains ( Object  cell  ) 

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.

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.

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.

Implemented in com::mxgraph::mxGraphModel.

int com::mxgraph::mxIGraphModel::GetChildCount ( Object  cell  ) 

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.

Implemented in com::mxgraph::mxGraphModel.

Object com::mxgraph::mxIGraphModel::GetEdgeAt ( Object  cell,
int  index 
)

Returns the edge of cell at the given index.

Parameters:
cell Cell that specifies the vertex.
index Integer that specifies the index of the edge to return.
Returns:
Returns the edge at the given index.

Implemented in com::mxgraph::mxGraphModel.

int com::mxgraph::mxIGraphModel::GetEdgeCount ( Object  cell  ) 

Returns the number of distinct edges connected to the given cell.

Parameters:
cell Cell that represents the vertex.
Returns:
Returns the number of edges connected to cell.

Implemented in com::mxgraph::mxGraphModel.

mxGeometry com::mxgraph::mxIGraphModel::GetGeometry ( Object  cell  ) 

Returns the geometry of the given cell.

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

Implemented in com::mxgraph::mxGraphModel.

Object com::mxgraph::mxIGraphModel::GetParent ( Object  child  ) 

Returns the parent of the given cell.

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

Implemented in com::mxgraph::mxGraphModel.

string com::mxgraph::mxIGraphModel::GetStyle ( Object  cell  ) 

Returns the style of the given cell.

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

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.

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.

Implemented in com::mxgraph::mxGraphModel.

Object com::mxgraph::mxIGraphModel::GetValue ( Object  cell  ) 

Returns the user object of the given cell.

Parameters:
cell Cell whose user object should be returned.
Returns:
Returns the user object of the given cell.

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.

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

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::IsCollapsed ( Object  cell  ) 

Returns true if the given cell is collapsed.

Parameters:
cell Cell whose collapsed state should be returned.
Returns:
Returns the collapsed state of the given cell.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::IsConnectable ( Object  cell  ) 

Returns true if the given cell is connectable.

Parameters:
cell Cell whose connectable state should be returned.
Returns:
Returns the connectable state of the given cell.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::IsEdge ( Object  cell  ) 

Returns true if the given cell is an edge.

Parameters:
cell Cell that represents the possible edge.
Returns:
Returns true if the given cell is an edge.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::IsVertex ( Object  cell  ) 

Returns true if the given cell is a vertex.

Parameters:
cell Cell that represents the possible vertex.
Returns:
Returns true if the given cell is a vertex.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::IsVisible ( Object  cell  ) 

Returns true if the given cell is visible.

Parameters:
cell Cell whose visible state should be returned.
Returns:
Returns the visible state of the given cell.

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.

Parameters:
parent Cell that should be removed.
Returns:
Returns the removed cell.

Implemented in com::mxgraph::mxGraphModel.

bool com::mxgraph::mxIGraphModel::SetCollapsed ( Object  cell,
bool  collapsed 
)

Sets the collapsed state of the given cell.

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

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

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

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.

Implemented in com::mxgraph::mxGraphModel.

Object com::mxgraph::mxIGraphModel::SetValue ( Object  cell,
Object  value 
)

Sets the user object of then given cell.

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

Parameters:
cell Cell whose visible state should be changed.
visible Boolean that specifies the new visible state.

Implemented in com::mxgraph::mxGraphModel.


Property Documentation

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

Holds the root cell.

Implemented in com::mxgraph::mxGraphModel.


Event Documentation

mxGraphModelChangeEventHandler com::mxgraph::mxIGraphModel::GraphModelChange

Called when the graph model has changed.

Implemented in com::mxgraph::mxGraphModel.


The documentation for this interface was generated from the following file:
Generated on Tue May 29 15:26:01 2012 for mxGraph by  doxygen 1.6.3