JGraph X 0.15.0.3


com.mxgraph.model
Class mxCellPath

java.lang.Object
  extended by com.mxgraph.model.mxCellPath

public class mxCellPath
extends Object

Implements a mechanism for temporary cell Ids.


Field Summary
static String PATH_SEPARATOR
          Defines the separator between the path components.
 
Constructor Summary
mxCellPath()
           
 
Method Summary
static String create(mxICell cell)
          Creates the cell path for the given cell.
static String getParentPath(String path)
          Returns the path for the parent of the cell represented by the given path.
static mxICell resolve(mxICell root, String path)
          Returns the cell for the specified cell path using the given root as the root of the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_SEPARATOR

public static String PATH_SEPARATOR
Defines the separator between the path components. Default is ..

Constructor Detail

mxCellPath

public mxCellPath()
Method Detail

create

public static String create(mxICell cell)
Creates the cell path for the given cell. The cell path is a concatenation of the indices of all cells on the (finite) path to the root, eg. "0.0.0.1".

Parameters:
cell - Cell whose path should be returned.
Returns:
Returns the string that represents the path.

getParentPath

public static String getParentPath(String path)
Returns the path for the parent of the cell represented by the given path. Returns null if the given path has no parent.

Parameters:
path - Path whose parent path should be returned.

resolve

public static mxICell resolve(mxICell root,
                              String path)
Returns the cell for the specified cell path using the given root as the root of the path.

Parameters:
root - Root cell of the path to be resolved.
path - String that defines the path.
Returns:
Returns the cell that is defined by the path.

JGraph X 0.15.0.3


Copyright (c) 2008 Gaudenz Alder. All rights reserved.