mxGraph 2.5.0.2


com.mxgraph.model
Interface mxICell

All Known Implementing Classes:
mxCell

public interface mxICell

Defines the requirements for a cell that can be used in an mxGraphModel.


Method Summary
 Object clone()
          Returns a clone of this cell.
 mxICell getChildAt(int index)
          Returns the child at the specified index.
 int getChildCount()
          Returns the number of child cells.
 mxICell getEdgeAt(int index)
          Returns the edge at the specified index in the edge array.
 int getEdgeCount()
          Returns the number of edges in the edge array.
 int getEdgeIndex(mxICell edge)
          Returns the index of the specified edge in the edge array.
 mxGeometry getGeometry()
          Returns the object that describes the geometry.
 String getId()
          Returns the Id of the cell as a string.
 int getIndex(mxICell child)
          Returns the index of the specified child in the child array.
 mxICell getParent()
          Returns the cell's parent.
 String getStyle()
          Returns the string that describes the style.
 mxICell getTerminal(boolean source)
          Returns the source or target terminal.
 Object getValue()
          Returns the user object of the cell.
 mxICell insert(mxICell child)
          Appends the specified child into the child array and updates the parent reference of the child.
 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.
 mxICell insertEdge(mxICell edge, boolean isOutgoing)
          Inserts the specified edge into the edge array and returns the edge.
 boolean isCollapsed()
          Returns true if the cell is collapsed.
 boolean isConnectable()
          Returns true if the cell is connectable.
 boolean isEdge()
          Returns true if the cell is an edge.
 boolean isVertex()
          Returns true if the cell is a vertex.
 boolean isVisible()
          Returns true if the cell is visibile.
 mxICell remove(int index)
          Removes the child at the specified index from the child array and returns the child that was removed.
 mxICell remove(mxICell child)
          Removes the given child from the child array and returns it.
 mxICell removeEdge(mxICell edge, boolean isOutgoing)
          Removes the specified edge from the edge array and returns the edge.
 void removeFromParent()
          Removes the cell from its parent.
 void removeFromTerminal(boolean isSource)
          Removes the edge from its source or target terminal.
 void setCollapsed(boolean collapsed)
          Sets the collapsed state.
 void setGeometry(mxGeometry geometry)
          Sets the object to be used as the geometry.
 void setId(String id)
          Sets the Id of the cell to the given string.
 void setParent(mxICell parent)
          Sets the parent cell.
 void setStyle(String style)
          Sets the string to be used as the style.
 mxICell setTerminal(mxICell terminal, boolean isSource)
          Sets the source or target terminal and returns the new terminal.
 void setValue(Object value)
          Sets the user object of the cell.
 void setVisible(boolean visible)
          Specifies if the cell is visible.
 

Method Detail

getId

String getId()
Returns the Id of the cell as a string.

Returns:
Returns the Id.

setId

void setId(String id)
Sets the Id of the cell to the given string.

Parameters:
id - String that represents the new Id.

getValue

Object getValue()
Returns the user object of the cell.

Returns:
Returns the user object.

setValue

void setValue(Object value)
Sets the user object of the cell.

Parameters:
value - Object that represents the new value.

getGeometry

mxGeometry getGeometry()
Returns the object that describes the geometry.

Returns:
Returns the cell geometry.

setGeometry

void setGeometry(mxGeometry geometry)
Sets the object to be used as the geometry.


getStyle

String getStyle()
Returns the string that describes the style.

Returns:
Returns the cell style.

setStyle

void setStyle(String style)
Sets the string to be used as the style.


isVertex

boolean isVertex()
Returns true if the cell is a vertex.

Returns:
Returns true if the cell is a vertex.

isEdge

boolean isEdge()
Returns true if the cell is an edge.

Returns:
Returns true if the cell is an edge.

isConnectable

boolean isConnectable()
Returns true if the cell is connectable.

Returns:
Returns the connectable state.

isVisible

boolean isVisible()
Returns true if the cell is visibile.

Returns:
Returns the visible state.

setVisible

void setVisible(boolean visible)
Specifies if the cell is visible.

Parameters:
visible - Boolean that specifies the new visible state.

isCollapsed

boolean isCollapsed()
Returns true if the cell is collapsed.

Returns:
Returns the collapsed state.

setCollapsed

void setCollapsed(boolean collapsed)
Sets the collapsed state.

Parameters:
collapsed - Boolean that specifies the new collapsed state.

getParent

mxICell getParent()
Returns the cell's parent.

Returns:
Returns the parent cell.

setParent

void setParent(mxICell parent)
Sets the parent cell.

Parameters:
parent - Cell that represents the new parent.

getTerminal

mxICell getTerminal(boolean source)
Returns the source or target terminal.

Parameters:
source - Boolean that specifies if the source terminal should be returned.
Returns:
Returns the source or target terminal.

setTerminal

mxICell setTerminal(mxICell terminal,
                    boolean isSource)
Sets the source or target terminal and returns the new terminal.

Parameters:
terminal - Cell that represents the new source or target terminal.
isSource - Boolean that specifies if the source or target terminal should be set.
Returns:
Returns the new terminal.

getChildCount

int getChildCount()
Returns the number of child cells.

Returns:
Returns the number of children.

getIndex

int getIndex(mxICell child)
Returns the index of the specified child in the child array.

Parameters:
child - Child whose index should be returned.
Returns:
Returns the index of the given child.

getChildAt

mxICell getChildAt(int index)
Returns the child at the specified index.

Parameters:
index - Integer that specifies the child to be returned.
Returns:
Returns the child at the given index.

insert

mxICell insert(mxICell child)
Appends the specified child into the child array and updates the parent reference of the child. Returns the appended child.

Parameters:
child - Cell to be appended to the child array.
Returns:
Returns the new child.

insert

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

Parameters:
child - Cell to be inserted into the child array.
index - Integer that specifies the index at which the child should be inserted into the child array.
Returns:
Returns the new child.

remove

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.

Parameters:
index - Integer that specifies the index of the child to be removed.
Returns:
Returns the child that was removed.

remove

mxICell remove(mxICell child)
Removes the given child from the child array and returns it. Will remove the parent reference of the child.

Parameters:
child - Cell that represents the child to be removed.
Returns:
Returns the child that was removed.

removeFromParent

void removeFromParent()
Removes the cell from its parent.


getEdgeCount

int getEdgeCount()
Returns the number of edges in the edge array.

Returns:
Returns the number of edges.

getEdgeIndex

int getEdgeIndex(mxICell edge)
Returns the index of the specified edge in the edge array.

Parameters:
edge - Cell whose index should be returned.
Returns:
Returns the index of the given edge.

getEdgeAt

mxICell getEdgeAt(int index)
Returns the edge at the specified index in the edge array.

Parameters:
index - Integer that specifies the index of the edge to be returned.
Returns:
Returns the edge at the given index.

insertEdge

mxICell insertEdge(mxICell edge,
                   boolean isOutgoing)
Inserts the specified edge into the edge array and returns the edge. Will update the respective terminal reference of the edge.

Parameters:
edge - Cell to be inserted into the edge array.
isOutgoing - Boolean that specifies if the edge is outgoing.
Returns:
Returns the new edge.

removeEdge

mxICell removeEdge(mxICell edge,
                   boolean isOutgoing)
Removes the specified edge from the edge array and returns the edge. Will remove the respective terminal reference from the edge.

Parameters:
edge - Cell to be removed from the edge array.
isOutgoing - Boolean that specifies if the edge is outgoing.
Returns:
Returns the edge that was removed.

removeFromTerminal

void removeFromTerminal(boolean isSource)
Removes the edge from its source or target terminal.

Parameters:
isSource - Boolean that specifies if the edge should be removed from its source or target terminal.

clone

Object clone()
             throws CloneNotSupportedException
Returns a clone of this cell.

Returns:
Returns a clone of this cell.
Throws:
CloneNotSupportedException

mxGraph 2.5.0.2


Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.