mxGraph
Public Member Functions | Properties | Events | List of all members
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

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

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
parentCell that specifies the parent to contain the child.
childCell that specifies the child to be inserted.
indexInteger 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.

Referenced by com.mxgraph.mxFastOrganicLayout.execute(), com.mxgraph.mxUtils.SetCellStyleFlags(), com.mxgraph.mxUtils.SetCellStyles(), and com.mxgraph.mxGraphModel.SetTerminals().

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
cellsArray of cells to be cloned.
includeChildrenBoolean 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
cellCell 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.

Referenced by com.mxgraph.mxFastOrganicLayout.execute(), com.mxgraph.mxUtils.SetCellStyleFlags(), com.mxgraph.mxUtils.SetCellStyles(), and com.mxgraph.mxGraphModel.SetTerminals().

Object com.mxgraph.mxIGraphModel.GetChildAt ( Object  parent,
int  index 
)

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

Parameters
parentCell that represents the parent.
indexInteger that specifies the index of the child to be returned.
Returns
Returns the child at index in parent.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxFastOrganicLayout.execute(), com.mxgraph.mxGraphView.GetBoundingBox(), com.mxgraph.mxGraphModel.getChildCells(), 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.

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

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxFastOrganicLayout.execute(), com.mxgraph.mxGraphView.GetBoundingBox(), com.mxgraph.mxGraphModel.getChildCells(), com.mxgraph.mxGraphView.RemoveState(), com.mxgraph.mxGraphView.ValidateCell(), and com.mxgraph.mxGraphView.ValidateCellState().

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

Returns the edge of cell at the given index.

Parameters
cellCell that specifies the vertex.
indexInteger that specifies the index of the edge to return.
Returns
Returns the edge at the given index.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphModel.GetDirectedEdgeCount(), com.mxgraph.mxGraphModel.GetEdges(), and com.mxgraph.mxGraphModel.GetEdgesBetween().

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

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

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

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphModel.GetDirectedEdgeCount(), com.mxgraph.mxGraphModel.GetEdges(), and com.mxgraph.mxGraphModel.GetEdgesBetween().

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

Returns the geometry of the given cell.

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

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxFastOrganicLayout.execute().

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

Returns the parent of the given cell.

Parameters
childCell whose parent should be returned.
Returns
Returns the parent of the given cell.

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.

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

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.

Parameters
edgeCell that specifies the edge.
sourceBoolean indicating which end of the edge should be returned.
Returns
Returns the source or target of the given edge.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphModel.GetDirectedEdgeCount(), com.mxgraph.mxGraphModel.GetEdges(), com.mxgraph.mxGraphModel.GetEdgesBetween(), com.mxgraph.mxGraphModel.GetOpposites(), and com.mxgraph.mxGraphView.GetVisibleTerminal().

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

Returns the user object of the given cell.

Parameters
cellCell 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
parentCell that specifies the parent.
childCell 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
cellCell 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
cellCell 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
cellCell that represents the possible edge.
Returns
Returns true if the given cell is an edge.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphView.GetBounds(), 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.

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

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphView.GetBounds(), com.mxgraph.mxGraphModel.getChildCells(), com.mxgraph.mxGraphView.UpdateCellState(), and com.mxgraph.mxGraphView.ValidateCellState().

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

Returns true if the given cell is visible.

Parameters
cellCell 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
parentCell 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
cellCell whose collapsed state should be changed.
collapsedBoolean 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
cellCell whose geometry should be changed.
geometryObject that defines the new geometry.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxFastOrganicLayout.execute().

string com.mxgraph.mxIGraphModel.SetStyle ( Object  cell,
string  style 
)

Sets the style of the given cell.

Parameters
cellCell whose style should be changed.
styleString of the form stylename[;key=value] to specify the new cell style.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxUtils.SetCellStyleFlags(), and com.mxgraph.mxUtils.SetCellStyles().

Object com.mxgraph.mxIGraphModel.SetTerminal ( Object  edge,
Object  terminal,
bool  source 
)

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

Parameters
edgeCell that specifies the edge.
terminalCell that specifies the new terminal.
sourceBoolean indicating if the terminal is the new source or target terminal of the edge.

Implemented in com.mxgraph.mxGraphModel.

Referenced by com.mxgraph.mxGraphModel.SetTerminals().

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

Sets the user object of then given cell.

Parameters
cellCell whose user object should be changed.
valueObject 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
cellCell whose visible state should be changed.
visibleBoolean that specifies the new visible state.

Implemented in com.mxgraph.mxGraphModel.

Property Documentation

Object com.mxgraph.mxIGraphModel.Root
getset

Event Documentation

mxGraphModelChangeEventHandler com.mxgraph.mxIGraphModel.GraphModelChange

Called when the graph model has changed.


The documentation for this interface was generated from the following file: