|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.earth.model.graph.ProjectorObject de.fhg.igd.earth.model.graph.ModelGraphObject de.fhg.igd.earth.model.graph.Node de.fhg.igd.earth.model.graph.Group de.fhg.igd.earth.model.graph.SwitchGroup de.fhg.igd.earth.model.graph.HistoryGroup
A HistoryGroup represents a group which can store mutable nodes and all their changes. Mutable nodes can be traced by an observer. After you have changed the FIRST child of this group you can let it clone automaticly by calling createNewChild(). The first child is the youngest, and the last one is the oldest. You can set a maximum capacity, the current capacity and the view depth. Also you can call the createNewConnector() methode witch creates a default connector (flat an spherical) between the first and the second child. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG
Field Summary | |
private int |
capacity_
current capacity = maximum of children |
protected String |
datapath_
Datapath for Icons |
private int |
hops_
number of hops since creation |
static String |
ICON_ACTIVE
active agent icon |
static String |
ICON_HISTORY
inactive agent icon |
private int |
maxCapacity_
maximum capacity sets the highest capacity value |
private int |
viewDepth_
defines how much children will be visible. |
Fields inherited from class de.fhg.igd.earth.model.graph.SwitchGroup |
CHILD_ALL, CHILD_MASK, CHILD_NONE |
Fields inherited from class de.fhg.igd.earth.model.graph.Group |
maxNumChildren_ |
Fields inherited from class de.fhg.igd.earth.model.graph.Node |
boundless_, collidable_, icon_, parent_, pickable_ |
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
projectorObject_ |
Constructor Summary | |
HistoryGroup(int capacity,
int maxCapacity,
int viewDepth)
Constructs and initializes a HistoryGroup. |
Method Summary | |
protected boolean |
allowChildAddEvent(Node n)
Overwrites the group class method. |
void |
calcBoundingBox(cBoundingBox boundingBox)
Overwrites the Group method. |
private void |
calcConnectorColor()
Calculates and updates the connector color for all children. |
private void |
checkViewDepth()
Checks the view depth and calculates the childMask |
protected void |
childAddedEvent(int index)
This method is called AFTER a new child was added to this group. |
Object |
clone()
Clones this HistoryGroup |
Node |
createNewChild()
Clones the first child and includes the clone AFTER the first child. |
void |
createNewConnector()
Creates a new connector. |
int |
getCapacity()
Returns the capacity. |
int |
getHops()
Returns the number of hops |
int |
getMaxCapacity()
Returns the maximum capacity. |
int |
getSubType()
Returns SUBTYPE_HistoryGroup. |
int |
getType()
Returns TYPE_Group. |
int |
getViewDepth()
Returns the view depth. |
boolean |
setCapacity(int cap)
Sets the current capacity (blocked by mutable and limited by maxCapacity) |
void |
setDatapath(String datapath)
Sets the "Datapath" for icons |
boolean |
setInfoTable(Hashtable infoTable)
Overwrites the current infoTable with a new one (blocked by mutable). |
boolean |
setViewDepth(int vd)
Sets the view depth (blocked by mutable and limited by capacity) Released changes: CHANGE_UPDATE, CHANGE_HISTORYGROUP |
Methods inherited from class de.fhg.igd.earth.model.graph.SwitchGroup |
childRemovedEvent, getChildMask, getWitchChild, setChildMask, setWitchChild |
Methods inherited from class de.fhg.igd.earth.model.graph.Group |
addChild, createLeafList, createSubGroupList, createSubNodeList, detach, detachedEvent, getAllChildren, getChild, getErasedChildren, numChildren, removeAllChildren, removeChild, removeChild, resetChanges, searchDown, searchDown, searchDown, searchDown, searchDownInserter, searchDownInserter, setChildAt, setColor, setHighLight, setMutable, setVisible |
Methods inherited from class de.fhg.igd.earth.model.graph.Node |
broadcastCreation, broadcastResetChanges, createParentGroupList, delete, delete, getBoundingBox, getBoundless, getBranchGroup, getCollidable, getGroup, getIcon, getLeafList, getModelGraph, getParent, getParentGroupList, getPickable, getSubGroupList, getSubNodeList, isFocused, move, move, moveTo, publishChanges, resetProjectorObject, searchUp, searchUp, searchUp, searchUp, setBoundless, setCollidable, setIcon, setParent, setPickable |
Methods inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject |
anyChanges, anySubChanges, getChanges, getChanges, getInfoTable, getInfoTableElements, getInfoTableKeys, getInfoTableSize, getInfoTableValues, getMutable, getName, getSubChanges, getSubChanges, getSubTypeName, getTimeStamp, getTrace, getTraceable, putInfo, setChanges, setName, setSubChanges, setTrace, VectorClone |
Methods inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
getProjectorObject, setProjectorObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String datapath_
public static final String ICON_ACTIVE
public static final String ICON_HISTORY
private int hops_
private int capacity_
private int maxCapacity_
private int viewDepth_
Constructor Detail |
public HistoryGroup(int capacity, int maxCapacity, int viewDepth)
capacity
- Current capacitymaxCapacity
- Highest capacity valueMethod Detail |
public int getType()
getType
in class Group
public int getSubType()
getSubType
in class Group
public boolean setCapacity(int cap)
cap
- Capacity
true
on successpublic int getCapacity()
public int getMaxCapacity()
public int getViewDepth()
public boolean setViewDepth(int vd)
vd
- View depth
true
on successprivate void checkViewDepth()
public int getHops()
protected void childAddedEvent(int index)
childAddedEvent
in class SwitchGroup
index
- Index of the new nodepublic Node createNewChild()
public void createNewConnector()
public boolean setInfoTable(Hashtable infoTable)
setInfoTable
in class ModelGraphObject
infoTable
- The new infoTable of this object.
true
on successprivate void calcConnectorColor()
protected boolean allowChildAddEvent(Node n)
allowChildAddEvent
in class Group
n
- Node
public void calcBoundingBox(cBoundingBox boundingBox)
calcBoundingBox
in class Group
boundingBox
- which will be combined withpublic void setDatapath(String datapath)
public Object clone()
clone
in class SwitchGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |