|
||||||||||
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
This class represents a node. A node can have a parent. It can be collidable, pickable and boundless. Collidable isn't implemented yet. If pickable is true this node can get the focus from a projector. Boundless means that there is no bounding box to show. The icon you can define is for visualizing this node on a tree projector. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG
Field Summary | |
protected boolean |
boundless_
boundless flag |
protected boolean |
collidable_
collidable flag |
protected String |
icon_
the filename of the icon for this node |
protected Node |
parent_
the parent of this node (can be null if this node is the root) |
protected boolean |
pickable_
pickable flag |
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
projectorObject_ |
Constructor Summary | |
Node()
Constructs and initializes a default node. |
Method Summary | |
void |
broadcastCreation()
Sets the CHANGE_CREATE flag of all sub nodes |
protected void |
broadcastResetChanges()
Resets all changes in all sub nodes. |
protected abstract void |
calcBoundingBox(cBoundingBox boundingBox)
Calculates the bounding box of this node. |
Object |
clone()
Clones this node |
protected abstract void |
createLeafList(Vector list)
Inserts all sub leafs to a given Vector. |
protected void |
createParentGroupList(Vector list)
Inserts all parent groups to a given Vector. |
protected abstract void |
createSubGroupList(Vector list)
Inserts all sub groups to a given Vector. |
protected abstract void |
createSubNodeList(Vector list)
Inserts all subnodes to a given Vector. |
boolean |
delete()
Delete this Node. |
boolean |
delete(String group,
String name)
Deletes the node with the given group and name. |
protected abstract void |
detach()
This method sets the CHANGED_DELETED flag of this node and all sub nodes. |
cBoundingBox |
getBoundingBox()
Returnes the bounding box of this node. |
boolean |
getBoundless()
Returns the boundless flag. |
BranchGroup |
getBranchGroup()
Returns the BranchGroup of this node. |
boolean |
getCollidable()
Returns the collidable flag. |
String |
getGroup()
Returns the "group" of this node. |
String |
getIcon()
Returns the filename of the icon. |
Vector |
getLeafList()
Returns a Vector witch includes all sub leafs. |
ModelGraph |
getModelGraph()
Returns the root node (ModelGraph). |
Node |
getParent()
Returns the parent of this node |
Vector |
getParentGroupList()
Returns a Vector witch includes all related parent groups. |
boolean |
getPickable()
Returns the pickable flag. |
Vector |
getSubGroupList()
Returns a Vector witch includes all sub groups. |
Vector |
getSubNodeList()
Returns a Vector witch includes all subnodes. |
boolean |
isFocused()
Returnes true if this node has got the focus. |
boolean |
move(double x,
double y,
double z)
move this graphic object relatively to the current position. |
boolean |
move(String group,
String name,
double x,
double y,
double z)
search a node and move it. |
boolean |
moveTo(double x,
double y,
double z)
move this graphic object to the given position. |
protected void |
publishChanges(int c)
All changes of this node will be published to the parent. |
void |
resetProjectorObject(Object p)
Removes all projector object entries in all subnodes with the given projector. |
abstract Enumeration |
searchDown(int type)
Search method which walks down the tree and searches by type. |
abstract Node |
searchDown(int type,
int subType)
Search method which walks down the tree and searches by type and subtype. |
abstract Enumeration |
searchDown(String group)
Search method which walks down the tree and searches by group. |
abstract Node |
searchDown(String group,
String name)
Search method which walks down the tree and searches by group and name. |
protected abstract void |
searchDownInserter(int type,
Vector result)
This method inserts all nodes with the given type into the result Vector. |
protected abstract void |
searchDownInserter(String group,
Vector result)
This method inserts all nodes with the given group name into the result Vector. |
Enumeration |
searchUp(int type)
Search method which walks up the tree and searches by type. |
Node |
searchUp(int type,
int subType)
Search method which walks up the tree and searches by type and subtype. |
Enumeration |
searchUp(String group)
Search method which walks up the tree and searches by group. |
Node |
searchUp(String group,
String name)
Search method which walks up the tree and searches by group and name. |
void |
setBoundless(boolean boundless)
Sets the boundless flag. |
boolean |
setCollidable(boolean c)
Sets the collidable flag (blocked by mutable). |
abstract boolean |
setColor(Color c)
Sets the color of all leafs. |
abstract boolean |
setHighLight(boolean on)
Sets the HighLight flag of all leafs. |
boolean |
setIcon(String icon)
Sets the filename of the icon (blocked by mutable). |
protected void |
setParent(Node p)
Defines the parent of this node |
boolean |
setPickable(boolean p)
Sets the pickable flag (blocked by mutable). |
abstract void |
setVisible(boolean v)
Sets the visibility of this node and all subnodes. |
Methods inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject |
anyChanges, anySubChanges, getChanges, getChanges, getInfoTable, getInfoTableElements, getInfoTableKeys, getInfoTableSize, getInfoTableValues, getMutable, getName, getSubChanges, getSubChanges, getSubType, getSubTypeName, getTimeStamp, getTrace, getTraceable, getType, putInfo, resetChanges, setChanges, setInfoTable, setMutable, 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 Node parent_
protected String icon_
protected boolean collidable_
protected boolean pickable_
protected boolean boundless_
Constructor Detail |
public Node()
Method Detail |
protected void setParent(Node p)
p
- Parent nodepublic Node getParent()
public String getGroup()
public abstract Node searchDown(String group, String name)
group
- The searched groupname
- The searched name
public abstract Enumeration searchDown(String group)
group
- The searched group
protected abstract void searchDownInserter(String group, Vector result)
group
- The searched groupresult
- The Vector to insert intopublic Node searchUp(String group, String name)
group
- The searched groupname
- The searched name
public Enumeration searchUp(String group)
group
- The searched group
public abstract Node searchDown(int type, int subType)
type
- The searched type
public abstract Enumeration searchDown(int type)
protected abstract void searchDownInserter(int type, Vector result)
type
- The searched typeresult
- The Vector to insert intopublic Node searchUp(int type, int subType)
type
- The searched type
public Enumeration searchUp(int type)
type
- The searched type
protected void publishChanges(int c)
publishChanges
in class ModelGraphObject
c
- changepublic BranchGroup getBranchGroup()
public ModelGraph getModelGraph()
public boolean setCollidable(boolean c)
c
- New collidable flag
true
on successpublic boolean getCollidable()
public boolean setPickable(boolean p)
true
on successpublic boolean getPickable()
protected abstract void calcBoundingBox(cBoundingBox boundingBox)
boundingBox
- which will be combined withpublic cBoundingBox getBoundingBox()
public boolean delete()
public boolean delete(String group, String name)
group
- The group of the node to deletename
- The name of the node to delete
true
on successpublic boolean move(double x, double y, double z)
true
on successpublic boolean moveTo(double x, double y, double z)
true
on successpublic boolean move(String group, String name, double x, double y, double z)
group
- The groupname
- The name
true
on successprotected abstract void detach()
public abstract void setVisible(boolean v)
v
- visibilitypublic String getIcon()
public boolean setIcon(String icon)
icon
- filename
true
on successpublic boolean isFocused()
public void setBoundless(boolean boundless)
boundless
- The new boundless flagpublic boolean getBoundless()
public abstract boolean setColor(Color c)
c
- Color
true
on successpublic abstract boolean setHighLight(boolean on)
on
- The new HighLight flag
true
on successpublic Vector getSubNodeList()
protected abstract void createSubNodeList(Vector list)
list
- Vector to add intopublic Vector getSubGroupList()
protected abstract void createSubGroupList(Vector list)
list
- Vector to add intopublic Vector getLeafList()
protected abstract void createLeafList(Vector list)
list
- Vector to add intopublic Vector getParentGroupList()
protected void createParentGroupList(Vector list)
list
- Vector to add intoprotected void broadcastResetChanges()
public void broadcastCreation()
public void resetProjectorObject(Object p)
p
- projectorpublic Object clone()
clone
in class ModelGraphObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |