|
||||||||||
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
This class represents a graphic object. It can be "mutable" and "traceable". Changes can only be done if mutable is true. Traceable means that the tracer is allowed to trace this object. The "trace" flag shows the trace status. Changes and subchanges can be recorded in BitSets. The allowed changes are listed as static variables. "CHANGE_.". You can store additional information into the "infoTable". Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG
Field Summary | |
static int |
CHANGE_AddChild
a child was added |
static int |
CHANGE_Anything
anything was changed |
static int |
CHANGE_Appearance
appearance was changed |
static int |
CHANGE_Color
color was changed |
static int |
CHANGE_Create
object was created |
static int |
CHANGE_Delete
object was deleted |
static int |
CHANGE_Focus
focus was changed |
static int |
CHANGE_HistoryGroup
tracer has changed something |
static int |
CHANGE_InfoTable
infotable was changed |
static int |
CHANGE_Object
internal changes |
static int |
CHANGE_RemoveChild
a child was removed |
static int |
CHANGE_Shape
shape was changed |
static int |
CHANGE_Trace
trace flag was changed |
static int |
CHANGE_Update
projector has to be updated |
static int |
CHANGE_Visibility
visibility was changed |
protected BitSet |
changes_
changes on the current level |
protected Hashtable |
infoTable_
table storing additional information |
protected boolean |
mutable_
flag to allow changes |
protected String |
name_
name of the graphic object |
private static int |
numChanges_
CHANGE_ counter (internal) |
protected BitSet |
subChanges_
changes on sublevels (children) |
static int |
SUBTYPE_BackGround
|
static int |
SUBTYPE_Box
|
static int |
SUBTYPE_BranchGroup
|
static int |
SUBTYPE_Cone
|
static int |
SUBTYPE_Cylinder
|
static int |
SUBTYPE_DetailGroup
|
static int |
SUBTYPE_DistanceDetailGroup
|
static int |
SUBTYPE_Group
|
static int |
SUBTYPE_HistoryGroup
|
static int |
SUBTYPE_LatchGroup
|
static int |
SUBTYPE_ModelGraph
|
static int |
SUBTYPE_Polygon
|
static int |
SUBTYPE_Primitive
|
static int |
SUBTYPE_Sphere
|
static int |
SUBTYPE_Text
|
static int |
SUBTYPE_TransformGroup
|
static int |
SUBTYPE_WireBoxGroup
|
protected TimeStamp |
timeStamp_
time of creation |
protected boolean |
trace_
the trace status |
protected boolean |
traceable_
flag to allow tracing |
static int |
TYPE_Group
this object can have children |
static int |
TYPE_Leaf
this object can't have children |
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
projectorObject_ |
Constructor Summary | |
ModelGraphObject()
Constructs and initializes a default graphic object Released changes: CHANGE_OBJECT, CHANGE_CREATE |
Method Summary | |
boolean |
anyChanges()
Returns true if anything was changed. |
boolean |
anySubChanges()
Returns true if any child was changed. |
Object |
clone()
Clones this object. |
BitSet |
getChanges()
Returns the BitSet of changes. |
boolean |
getChanges(int index)
Returns a special change from the BitSet. |
Hashtable |
getInfoTable()
Returns a clone of the infoTable. |
Enumeration |
getInfoTableElements()
Returns the elements of the infoTable as an Enumeration. |
Enumeration |
getInfoTableKeys()
Returns the keys of the infoTable as an Enumeration. |
int |
getInfoTableSize()
Returns the number of keys in the infoTable. |
Collection |
getInfoTableValues()
Returns the values of the infoTable as a Collection. |
boolean |
getMutable()
Returns the mutable flag. |
String |
getName()
Returns the name of this object. |
BitSet |
getSubChanges()
Returns the BitSet of subchanges. |
boolean |
getSubChanges(int index)
Returns a special subchange from the BitSet. |
abstract int |
getSubType()
Returns the subtype of this object |
String |
getSubTypeName()
Returns the SubType of this object as a string. |
TimeStamp |
getTimeStamp()
Returns the timeStamp of this object. |
boolean |
getTrace()
Returns the trace status. |
boolean |
getTraceable()
Returns the traceable flag. |
abstract int |
getType()
Returns the type of this object |
protected abstract void |
publishChanges(int c)
All changes on this level will be published to the parent. |
boolean |
putInfo(Object key,
Object value)
Adds an new value to the infoTable (blocked by mutable). |
protected void |
resetChanges()
Resets all changes and subchanges. |
protected void |
setChanges(int c)
Include a change into the changes BitSet. |
boolean |
setInfoTable(Hashtable infoTable)
Overwrites the current infoTable with a new one (blocked by mutable). |
protected abstract void |
setMutable(boolean m)
Sets the mutable flag. |
boolean |
setName(String name)
Set the name of this object (blocked by mutable). |
protected void |
setSubChanges(int c)
Include a subchange into the subchanges BitSet. |
boolean |
setTrace(boolean t)
Activates the tracer (blocked by mutable). |
protected Vector |
VectorClone(Vector v)
This methode duplicates a vector with all inner objects. |
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 name_
protected Hashtable infoTable_
protected BitSet changes_
protected BitSet subChanges_
protected boolean mutable_
protected boolean traceable_
protected boolean trace_
protected TimeStamp timeStamp_
public static final int TYPE_Leaf
public static final int TYPE_Group
public static final int SUBTYPE_BackGround
public static final int SUBTYPE_Text
public static final int SUBTYPE_Primitive
public static final int SUBTYPE_Polygon
public static final int SUBTYPE_Sphere
public static final int SUBTYPE_Box
public static final int SUBTYPE_Cone
public static final int SUBTYPE_Cylinder
public static final int SUBTYPE_Group
public static final int SUBTYPE_TransformGroup
public static final int SUBTYPE_HistoryGroup
public static final int SUBTYPE_BranchGroup
public static final int SUBTYPE_ModelGraph
public static final int SUBTYPE_LatchGroup
public static final int SUBTYPE_WireBoxGroup
public static final int SUBTYPE_DetailGroup
public static final int SUBTYPE_DistanceDetailGroup
public static final int CHANGE_Anything
public static final int CHANGE_Update
public static final int CHANGE_Create
public static final int CHANGE_Delete
public static final int CHANGE_Object
public static final int CHANGE_AddChild
public static final int CHANGE_RemoveChild
public static final int CHANGE_Appearance
public static final int CHANGE_Color
public static final int CHANGE_Visibility
public static final int CHANGE_Shape
public static final int CHANGE_InfoTable
public static final int CHANGE_Trace
public static final int CHANGE_Focus
public static final int CHANGE_HistoryGroup
private static final int numChanges_
Constructor Detail |
public ModelGraphObject()
Method Detail |
public abstract int getType()
public abstract int getSubType()
public boolean setName(String name)
name
- The new name of this object.
true
on successpublic String getName()
public boolean setInfoTable(Hashtable infoTable)
infoTable
- The new infoTable of this object.
true
on successpublic Hashtable getInfoTable()
public boolean putInfo(Object key, Object value)
key
- The new keyvalue
- The new value
true
on successpublic int getInfoTableSize()
public Enumeration getInfoTableKeys()
public Enumeration getInfoTableElements()
public Collection getInfoTableValues()
protected void setChanges(int c)
c
- the new changepublic BitSet getChanges()
public boolean getChanges(int index)
index
- The index of the change
public boolean anyChanges()
true
if anything was changedprotected void resetChanges()
protected abstract void publishChanges(int c)
c
- changeprotected void setSubChanges(int c)
c
- the new subchangepublic BitSet getSubChanges()
public boolean getSubChanges(int index)
index
- The index of the subchange
public boolean anySubChanges()
true
if any child was changedpublic boolean setTrace(boolean t)
t
- true=on false=off
true
on successpublic boolean getTrace()
public boolean getTraceable()
true
if this object is traceableprotected abstract void setMutable(boolean m)
m
- new mutable flag (true=is mutable)public boolean getMutable()
true
if this object is mutablepublic TimeStamp getTimeStamp()
protected Vector VectorClone(Vector v)
v
- The vector which should be cloned
public String getSubTypeName()
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |