mxGraph
Public Member Functions | Protected Attributes | Properties | List of all members
com.mxgraph.mxCell Class Reference

Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph. More...

Inheritance diagram for com.mxgraph.mxCell:
com.mxgraph.mxICell

Public Member Functions

 mxCell ()
 Constructs a new empty cell. More...
 
 mxCell (Object value)
 Constructs a new cell for the given value. More...
 
 mxCell (Object value, mxGeometry geometry, string style)
 Constructs a new cell for the given value, geometry and style. More...
 
mxICell GetTerminal (bool source)
 Returns the source or target terminal of the cell. More...
 
mxICell SetTerminal (mxICell terminal, bool isSource)
 Sets the source or target terminal. More...
 
int ChildCount ()
 Returns the number of child cells. More...
 
int GetIndex (mxICell child)
 Returns the index of the specified child in the child array. More...
 
mxICell GetChildAt (int index)
 Returns the child at the specified index. More...
 
mxICell Insert (mxICell child)
 Appends the specified child into the child array and updates the parent reference of the child. More...
 
mxICell Insert (mxICell child, int index)
 Inserts the specified child into the child array at the specified index and updates the parent reference of the child. More...
 
mxICell Remove (int index)
 Removes the child at the specified index from the child array and returns the child that was removed. Will remove the parent reference of the child. More...
 
mxICell Remove (mxICell child)
 Removes the given child from the child array. Will remove the parent reference of the child. More...
 
void RemoveFromParent ()
 Removes the cell from its parent. More...
 
int EdgeCount ()
 Returns the number of edges in the edge array. More...
 
int GetEdgeIndex (mxICell edge)
 Returns the index of the specified edge in the edge array. More...
 
mxICell GetEdgeAt (int index)
 Returns the edge at the specified index in the edge array. More...
 
mxICell InsertEdge (mxICell edge, bool isOutgoing)
 Inserts the specified edge into the edge array and returns the edge. Will update the respective terminal reference of the edge. More...
 
mxICell RemoveEdge (mxICell edge, bool isOutgoing)
 Removes the specified edge from the edge array and returns the edge. Will remove the respective terminal reference from the edge. More...
 
void RemoveFromTerminal (bool isSource)
 Removes the edge from its source or target terminal. More...
 
String GetAttribute (String name)
 Returns the specified attribute from the user object if it is an XML More...
 
String GetAttribute (String name, String defaultValue)
 Returns the specified attribute from the user object if it is an XML More...
 
void SetAttribute (String name, String value)
 
Object Clone ()
 Returns a clone of this cell. More...
 

Protected Attributes

string id
 Holds the Id. Default is null. More...
 
Object value
 Holds the user object. Default is null. More...
 
mxGeometry geometry
 Holds the geometry. Default is null. More...
 
string style
 Holds the geometry. Default is null. More...
 
bool vertex = false
 Specifies whether the cell is a vertex. Default value is false. More...
 
bool edge = false
 Specifies whether the cell is an edge. Default value is false. More...
 
bool connectable = true
 Specifies whether the cell connectable. Default value is true. More...
 
bool visible = true
 Specifies whether the cell is visible. Default value is true. More...
 
bool collapsed = false
 Specifies whether the cell is collapsed. Default value is false. More...
 
mxICell parent
 Reference to the parent cell. More...
 
mxICell source
 Reference to the source terminal of an edge. More...
 
mxICell target
 Reference to the target terminal of an edge. More...
 
List< mxICellchildren
 Holds the child cells. More...
 
List< mxICelledges
 Holds the connected edges. More...
 

Properties

string Id [get, set]
 
Object Value [get, set]
 
mxGeometry Geometry [get, set]
 
string Style [get, set]
 
bool Vertex [get, set]
 
bool Edge [get, set]
 
bool Connectable [get, set]
 
bool Visible [get, set]
 
bool Collapsed [get, set]
 
mxICell Parent [get, set]
 
mxICell Source [get, set]
 Sets or returns the source terminal of the cell. More...
 
mxICell Target [get, set]
 Sets or returns the target terminal of the cell. More...
 
- Properties inherited from com.mxgraph.mxICell
string Id [get, set]
 Sets or returns the Id of the cell. More...
 
Object Value [get, set]
 Sets or returns the user object of the cell. More...
 
mxGeometry Geometry [get, set]
 Sets or returns the geometry of the cell. More...
 
string Style [get, set]
 Sets or returns the string that describes the style. More...
 
bool Vertex [get]
 Returns true if the cell is a vertex. More...
 
bool Edge [get]
 Returns true if the cell is an edge. More...
 
bool Connectable [get]
 Returns true if the cell is connectable. More...
 
bool Visible [get, set]
 Sets or returns the visible state of the cell. More...
 
bool Collapsed [get, set]
 Sets or returns the collapsed state of the cell. More...
 
mxICell Parent [get, set]
 Sets or returns the parent of the cell. More...
 

Detailed Description

Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.

Constructor & Destructor Documentation

com.mxgraph.mxCell.mxCell ( )
inline

Constructs a new empty cell.

com.mxgraph.mxCell.mxCell ( Object  value)
inline

Constructs a new cell for the given value.

Parameters
valueValue that represents the user object.
com.mxgraph.mxCell.mxCell ( Object  value,
mxGeometry  geometry,
string  style 
)
inline

Constructs a new cell for the given value, geometry and style.

Parameters
valueValue that represents the user object.
geometryGeometry of the cell to be created.
styleStyle of the cell to be created.

Member Function Documentation

int com.mxgraph.mxCell.ChildCount ( )
inline

Returns the number of child cells.

Returns
Returns the number of child cells.

Implements com.mxgraph.mxICell.

Object com.mxgraph.mxCell.Clone ( )
inline

Returns a clone of this cell.

Returns
Returns a clone of this cell.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxGeometry.Clone().

int com.mxgraph.mxCell.EdgeCount ( )
inline

Returns the number of edges in the edge array.

Returns
Returns the number of edges.

Implements com.mxgraph.mxICell.

String com.mxgraph.mxCell.GetAttribute ( String  name)
inline

Returns the specified attribute from the user object if it is an XML

node.

Parameters
nameName of the attribute whose value should be returned.
Returns
Returns the value of the given attribute or null.
String com.mxgraph.mxCell.GetAttribute ( String  name,
String  defaultValue 
)
inline

Returns the specified attribute from the user object if it is an XML

node.

Parameters
nameName of the attribute whose value should be returned.
defaultValueDefault value to use if the attribute has no value.
Returns
Returns the value of the given attribute or defaultValue.
mxICell com.mxgraph.mxCell.GetChildAt ( int  index)
inline

Returns the child at the specified index.

Parameters
indexInteger that specifies the child to be returned.
Returns
Returns the child at the specified index.

Implements com.mxgraph.mxICell.

mxICell com.mxgraph.mxCell.GetEdgeAt ( int  index)
inline

Returns the edge at the specified index in the edge array.

Parameters
indexInteger that specifies the index of the edge to be returned.
Returns
Returns the edge at the specified index.

Implements com.mxgraph.mxICell.

int com.mxgraph.mxCell.GetEdgeIndex ( mxICell  edge)
inline

Returns the index of the specified edge in the edge array.

Parameters
edgeCell whose index should be returned.
Returns
Returns the index of the given edge.

Implements com.mxgraph.mxICell.

int com.mxgraph.mxCell.GetIndex ( mxICell  child)
inline

Returns the index of the specified child in the child array.

Parameters
childChild whose index should be returned.
Returns
Returns the index of the specified child.

Implements com.mxgraph.mxICell.

mxICell com.mxgraph.mxCell.GetTerminal ( bool  source)
inline

Returns the source or target terminal of the cell.

Parameters
sourceBoolean that specifies if the source terminal should be returned.
Returns
Returns the source or target terminal.

Implements com.mxgraph.mxICell.

mxICell com.mxgraph.mxCell.Insert ( mxICell  child)
inline

Appends the specified child into the child array and updates the parent reference of the child.

Parameters
childCell to be appended to the child array.
Returns
Returns the appended child.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.Parent.

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

mxICell com.mxgraph.mxCell.Insert ( mxICell  child,
int  index 
)
inline

Inserts the specified child into the child array at the specified index and updates the parent reference of the child.

Parameters
childCell to be inserted into the child array.
indexInteger that specifies the index at which the child should be inserted into the child array.
Returns
Returns the inserted child.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.Insert(), com.mxgraph.mxICell.Parent, and com.mxgraph.mxICell.RemoveFromParent().

mxICell com.mxgraph.mxCell.InsertEdge ( mxICell  edge,
bool  isOutgoing 
)
inline

Inserts the specified edge into the edge array and returns the edge. Will update the respective terminal reference of the edge.

Parameters
edgeCell to be inserted into the edge array.
isOutgoingBoolean that specifies if the edge is outgoing.
Returns
Returns the inserted edge.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.GetTerminal(), com.mxgraph.mxICell.RemoveFromTerminal(), and com.mxgraph.mxICell.SetTerminal().

mxICell com.mxgraph.mxCell.Remove ( int  index)
inline

Removes the child at the specified index from the child array and returns the child that was removed. Will remove the parent reference of the child.

Parameters
indexInteger that specifies the index of the child to be removed.
Returns
Returns the child that was removed.

Implements com.mxgraph.mxICell.

mxICell com.mxgraph.mxCell.Remove ( mxICell  child)
inline

Removes the given child from the child array. Will remove the parent reference of the child.

Parameters
child
Returns
Returns the child that was removed.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.Parent, and com.mxgraph.mxICell.Remove().

mxICell com.mxgraph.mxCell.RemoveEdge ( mxICell  edge,
bool  isOutgoing 
)
inline

Removes the specified edge from the edge array and returns the edge. Will remove the respective terminal reference from the edge.

Parameters
edgeCell to be removed from the edge array.
isOutgoingBoolean that specifies if the edge is outgoing.
Returns
Returns the edge that was removed.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.GetTerminal(), com.mxgraph.mxICell.Remove(), and com.mxgraph.mxICell.SetTerminal().

void com.mxgraph.mxCell.RemoveFromParent ( )
inline

Removes the cell from its parent.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.Remove().

void com.mxgraph.mxCell.RemoveFromTerminal ( bool  isSource)
inline

Removes the edge from its source or target terminal.

Parameters
isSourceBoolean that specifies if the edge should be removed from its source or target terminal.

Implements com.mxgraph.mxICell.

References com.mxgraph.mxICell.RemoveEdge().

void com.mxgraph.mxCell.SetAttribute ( String  name,
String  value 
)
inline

Sets the specified attribute on the user object if it is an XML node.

Parameters
nameName of the attribute whose value should be set.
valueNew value of the attribute.
mxICell com.mxgraph.mxCell.SetTerminal ( mxICell  terminal,
bool  source 
)
inline

Sets the source or target terminal.

Parameters
terminalCell that represents the new source or target terminal.
sourceBoolean that specifies if the source or target terminal should be set.
Returns
Returns the new terminal.

Implements com.mxgraph.mxICell.

Member Data Documentation

List<mxICell> com.mxgraph.mxCell.children
protected

Holds the child cells.

bool com.mxgraph.mxCell.collapsed = false
protected

Specifies whether the cell is collapsed. Default value is false.

bool com.mxgraph.mxCell.connectable = true
protected

Specifies whether the cell connectable. Default value is true.

bool com.mxgraph.mxCell.edge = false
protected

Specifies whether the cell is an edge. Default value is false.

List<mxICell> com.mxgraph.mxCell.edges
protected

Holds the connected edges.

mxGeometry com.mxgraph.mxCell.geometry
protected

Holds the geometry. Default is null.

string com.mxgraph.mxCell.id
protected

Holds the Id. Default is null.

mxICell com.mxgraph.mxCell.parent
protected

Reference to the parent cell.

mxICell com.mxgraph.mxCell.source
protected

Reference to the source terminal of an edge.

string com.mxgraph.mxCell.style
protected

Holds the geometry. Default is null.

mxICell com.mxgraph.mxCell.target
protected

Reference to the target terminal of an edge.

Object com.mxgraph.mxCell.value
protected

Holds the user object. Default is null.

bool com.mxgraph.mxCell.vertex = false
protected

Specifies whether the cell is a vertex. Default value is false.

bool com.mxgraph.mxCell.visible = true
protected

Specifies whether the cell is visible. Default value is true.

Property Documentation

mxICell com.mxgraph.mxCell.Source
getset

Sets or returns the source terminal of the cell.

mxICell com.mxgraph.mxCell.Target
getset

Sets or returns the target terminal of the cell.


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