|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgraph.graph.ParentMap
public class 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 Set |
changedNodes
Set of changed changedNodes for the parent map. |
protected Map |
childCount
Maps parents to integers with the future number of childs. |
protected ArrayList |
entries
Contents of the parent map. |
Constructor Summary | |
---|---|
ParentMap()
Constructs a ParentMap object. |
Method Summary | |
---|---|
void |
addEntry(Object child,
Object parent)
Add a new entry for this child, parent pair to the parent map. |
ParentMap |
clone(Map map)
Creates a new parent map based on this parent map, where the child and parents are mapped using map . |
static ParentMap |
create(GraphModel m,
Object[] c,
boolean remove,
boolean strict)
Returns a parent map that represents the insertion or removal of cells in model based
on remove . |
Iterator |
entries()
Returns an Iterator for the entries in the map. |
Set |
getChangedNodes()
Returns a Set for the nodes, childs and parents,
in this parent map. |
int |
size()
Returns the number of entries. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ArrayList entries
protected Set changedNodes
protected Map childCount
Constructor Detail |
---|
public ParentMap()
ParentMap
object.
Method Detail |
---|
public static ParentMap create(GraphModel m, Object[] c, boolean remove, boolean strict)
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. Note: Strict can be used to indicate if only cells fromt the passed-in cell array are allowed parents. This is only used if remove is not true.
public void addEntry(Object child, Object parent)
public int size()
public Iterator entries()
Iterator
for the entries in the map.
public Set getChangedNodes()
Set
for the nodes, childs and parents,
in this parent map.
public ParentMap clone(Map map)
map
.
If one the cells is not in map
, then the original
cell is used instead.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |