|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.graph.GraphContext
Field Summary | |
protected int |
cellCount
Number of all descendants without ports. |
protected java.lang.Object[] |
cells
Reference to the cells. |
protected java.util.Set |
cellSet
Set of all cells including all descendants. |
protected JGraph |
graph
Reference to the parent graph. |
protected GraphView |
graphView
Reference to the graphs GraphView. |
protected java.util.Map |
views
Map of (cell, view) pairs including ports. |
Constructor Summary | |
GraphContext(JGraph graph,
java.lang.Object[] cells)
Constructs a graph context for cells with respect to
the connections defined in the model, and the views in the view
of graph . |
Method Summary | |
boolean |
contains(java.lang.Object node)
Returns true if node or one of
its ancestors is contained in this object. |
CellView[] |
createTemporaryCellViews()
Returns an new consistent array of views for cells . |
CellView[] |
createTemporaryContextViews()
Returns an new consistent array of views for the edges that are connected to and not contained in cells . |
CellView[] |
createTemporaryContextViews(java.util.Set cellSet)
Returns an new consistent array of views for the edges that are connected to and not contained in cellSet . |
PortView[] |
createTemporaryPortViews()
Returns an new consistent array of views for the ports. |
ConnectionSet |
disconnect(CellView[] cells)
Disconnects the edges in cells from the sources
and targets that are not in this context and returns a
ConnectionSet that defines the disconnection. |
java.lang.Object[] |
getCells()
Returns the array that was passed to the constructor. |
int |
getDescendantCount()
Returns the number of all objects (cells and children) in this object. |
JGraph |
getGraph()
Returns the graph that was passed to the constructor. |
CellView |
getMapping(java.lang.Object cell,
boolean create)
Returns the CellView that is mapped to cell
in the graph context. |
boolean |
isEmpty()
Returns true if this object contains no cells. |
void |
putMapping(java.lang.Object cell,
CellView view)
Associates cell with view
in the graph context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JGraph graph
protected transient GraphView graphView
protected java.lang.Object[] cells
protected java.util.Set cellSet
protected int cellCount
protected java.util.Map views
Constructor Detail |
public GraphContext(JGraph graph, java.lang.Object[] cells)
cells
with respect to
the connections defined in the model, and the views in the view
of graph
.
Method Detail |
public boolean isEmpty()
true
if this object contains no cells.
public int getDescendantCount()
public JGraph getGraph()
public java.lang.Object[] getCells()
public boolean contains(java.lang.Object node)
true
if node
or one of
its ancestors is contained in this object.
public CellView[] createTemporaryCellViews()
cells
.
public PortView[] createTemporaryPortViews()
public CellView[] createTemporaryContextViews()
cells
.
public CellView[] createTemporaryContextViews(java.util.Set cellSet)
cellSet
.
public CellView getMapping(java.lang.Object cell, boolean create)
CellView
that is mapped to cell
in the graph context. New views are created based on create
.
getMapping
in interface CellMapper
create
- whether a new view should createdpublic ConnectionSet disconnect(CellView[] cells)
cells
from the sources
and targets that are not in this context and returns a
ConnectionSet that defines the disconnection.
public void putMapping(java.lang.Object cell, CellView view)
cell
with view
in the graph context.
putMapping
in interface CellMapper
cell
- the cell that constitutes the model elementview
- the view that constitutes the view element
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |