mxGraph
Public Member Functions | Properties | Events
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:
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.

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

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 [get, set]

Holds the root cell.

Implemented in com.mxgraph.mxGraphModel.


Event Documentation

Called when the graph model has changed.

Implemented in com.mxgraph.mxGraphModel.


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