|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.graph.ParentMap
An object that describes relations between childs and parents.
Nested Class Summary | |
class |
ParentMap.Entry
Object that represents the relation between a child an a parent. |
Field Summary | |
protected java.util.Map |
childCount
Maps parents to integers with the future number of childs. |
protected java.util.ArrayList |
entries
Contents of the parent map. |
protected java.util.Set |
nodes
Set of changed nodes for the parent map. |
Constructor Summary | |
ParentMap()
|
Method Summary | |
void |
addEntry(java.lang.Object child,
java.lang.Object parent)
Set parent of child in the parent map. |
protected void |
changeChildCount(java.lang.Object parent,
int change)
Returns an Iterator for the entries in the map. |
static ParentMap |
create(GraphModel m,
java.lang.Object[] c,
boolean remove)
Returns a parent map that represents the insertion or removal of cells in model based
on remove . |
java.lang.Object[] |
emptyParents()
Returns the parents that will be empty when this parent map is applied. |
java.util.Iterator |
entries()
Returns an Iterator for the entries in the map. |
java.util.Set |
getChangedNodes()
Returns a Set for the nodes, childs and parents,
in this parent map. |
int |
size()
Returns the number of entries. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.ArrayList entries
protected java.util.Set nodes
protected java.util.Map childCount
Constructor Detail |
public ParentMap()
Method Detail |
public static ParentMap create(GraphModel m, java.lang.Object[] c, boolean remove)
cells
in model
based
on remove
.
Unselected childs of selected nodes are moved to the first
unselected parent of that node.Note: Consequently, cells "move up" one level when their parent is removed.
public void addEntry(java.lang.Object child, java.lang.Object parent)
parent
of child
in the parent map.
protected void changeChildCount(java.lang.Object parent, int change)
Iterator
for the entries in the map.
public java.lang.Object[] emptyParents()
public int size()
public java.util.Iterator entries()
Iterator
for the entries in the map.
public java.util.Set getChangedNodes()
Set
for the nodes, childs and parents,
in this parent map.
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |