org.jgraph.graph.ParentMap Class Reference

List of all members.

Public Member Functions

 ParentMap ()
 ParentMap (Object[] children, Object parent)
void addEntry (Object child, Object parent)
void addEntries (Object[] children, Object parent)
int size ()
Iterator entries ()
Set getChangedNodes ()
ParentMap clone (Map map)
String toString ()

Static Public Member Functions

static ParentMap create (GraphModel m, Object[] c, boolean remove, boolean onlyUsePassedInCells)

Protected Attributes

ArrayList entries = new ArrayList()
Set changedNodes = new HashSet()
Map childCount = new Hashtable()

Classes

class  Entry

Detailed Description

An object that describes relations between childs and parents.

Version:
1.0 1/1/02
Author:
Gaudenz Alder


Constructor & Destructor Documentation

org.jgraph.graph.ParentMap.ParentMap  ) 
 

Constructs a ParentMap object.

org.jgraph.graph.ParentMap.ParentMap Object[]  children,
Object  parent
 

Constructs a ParentMap object.


Member Function Documentation

void org.jgraph.graph.ParentMap.addEntries Object[]  children,
Object  parent
 

Adds all child parent pairs using addEntry.

void org.jgraph.graph.ParentMap.addEntry Object  child,
Object  parent
 

Add a new entry for this child, parent pair to the parent map. The child and parent are added to the set of changed nodes. Note: The previous parent is changed on execution of this parent map and must be added by the GraphModel and reflected by the GraphChange.getChanged method. TODO: In general, the GraphModel should be in charge of computing the set of changed cells.

ParentMap org.jgraph.graph.ParentMap.clone Map  map  ) 
 

Creates a new parent map based on this parent map, where the child and parents are mapped using map. If one the cells is not in map, then the original cell is used instead.

static ParentMap org.jgraph.graph.ParentMap.create GraphModel  m,
Object[]  c,
boolean  remove,
boolean  onlyUsePassedInCells
[static]
 

Returns a parent map that represents the insertion or removal of 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: onlyUsePassedInCells can be used to indicate if only cells from the passed-in cell array are allowed parents. This is only used if remove is not true.

Iterator org.jgraph.graph.ParentMap.entries  ) 
 

Returns an Iterator for the entries in the map.

Set org.jgraph.graph.ParentMap.getChangedNodes  ) 
 

Returns a Set for the nodes, childs and parents, in this parent map.

int org.jgraph.graph.ParentMap.size  ) 
 

Returns the number of entries.

String org.jgraph.graph.ParentMap.toString  ) 
 


Member Data Documentation

Set org.jgraph.graph.ParentMap.changedNodes = new HashSet() [protected]
 

Set of changed changedNodes for the parent map. Includes childs and parents.

Map org.jgraph.graph.ParentMap.childCount = new Hashtable() [protected]
 

Maps parents to integers with the future number of childs.

ArrayList org.jgraph.graph.ParentMap.entries = new ArrayList() [protected]
 

Contents of the parent map.


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:16 2006 for Digimod by  doxygen 1.4.6-NO