de.fhg.igd.earth.model.graph
Class Leaf

java.lang.Object
  extended byde.fhg.igd.earth.model.graph.ProjectorObject
      extended byde.fhg.igd.earth.model.graph.ModelGraphObject
          extended byde.fhg.igd.earth.model.graph.Node
              extended byde.fhg.igd.earth.model.graph.Leaf
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
Background, Shape

public abstract class Leaf
extends Node
implements Serializable, Cloneable

This class represents a leaf. A leaf have got a parent group but can't have children. It can be visible or not. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel
See Also:
Serialized Form

Field Summary
private  boolean visible_
          the visible flag
 
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.ModelGraphObject
CHANGE_AddChild, CHANGE_Anything, CHANGE_Appearance, CHANGE_Color, CHANGE_Create, CHANGE_Delete, CHANGE_Focus, CHANGE_HistoryGroup, CHANGE_InfoTable, CHANGE_Object, CHANGE_RemoveChild, CHANGE_Shape, CHANGE_Trace, CHANGE_Update, CHANGE_Visibility, changes_, infoTable_, mutable_, name_, subChanges_, SUBTYPE_BackGround, SUBTYPE_Box, SUBTYPE_BranchGroup, SUBTYPE_Cone, SUBTYPE_Cylinder, SUBTYPE_DetailGroup, SUBTYPE_DistanceDetailGroup, SUBTYPE_Group, SUBTYPE_HistoryGroup, SUBTYPE_LatchGroup, SUBTYPE_ModelGraph, SUBTYPE_Polygon, SUBTYPE_Primitive, SUBTYPE_Sphere, SUBTYPE_Text, SUBTYPE_TransformGroup, SUBTYPE_WireBoxGroup, timeStamp_, trace_, traceable_, TYPE_Group, TYPE_Leaf
 
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject
projectorObject_
 
Constructor Summary
Leaf()
          Constructs and initializes a default leaf.
 
Method Summary
 Object clone()
          Clones this leaf
protected  void createLeafList(Vector list)
          Inserts this leaf to a given Vector.
protected  void createSubGroupList(Vector list)
          Does nothing becarse this is a leaf
protected  void createSubNodeList(Vector list)
          Inserts this leaf to a given Vector.
protected  void detach()
          Sets the CHANGE_DELETED bit
 boolean getVisible()
          Returns the visible flag.
 Enumeration searchDown(int type)
          Search method which walks down the tree and searches by type.
 Node searchDown(int type, int subType)
          Search method which walks down the tree and searches by type and subtype.
 Enumeration searchDown(String group)
          Search method which walks down the tree and searches by group.
 Node searchDown(String group, String name)
          Search method which walks down the tree and searches by group and name.
protected  void searchDownInserter(int type, Vector result)
          This method inserts all nodes with the given type into the result Vector.
protected  void searchDownInserter(String group, Vector result)
          This method inserts all nodes with the given group name into the result Vector.
protected  void setMutable(boolean m)
          Sets the mutable flag.
 void setVisible(boolean v)
          Sets the visible flag.
 
Methods inherited from class de.fhg.igd.earth.model.graph.Node
broadcastCreation, broadcastResetChanges, calcBoundingBox, 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, setColor, setHighLight, 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, getSubType, getSubTypeName, getTimeStamp, getTrace, getTraceable, getType, putInfo, resetChanges, setChanges, setInfoTable, 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

visible_

private boolean visible_
the visible flag

Constructor Detail

Leaf

public Leaf()
Constructs and initializes a default leaf. The visible flag is true.

Method Detail

detach

protected void detach()
Sets the CHANGE_DELETED bit

Specified by:
detach in class Node

setVisible

public void setVisible(boolean v)
Sets the visible flag. Released changes: CHANGE_UPDATE, CHANGE_VISIBILITY

Specified by:
setVisible in class Node
Parameters:
v - New visible flag

getVisible

public boolean getVisible()
Returns the visible flag.

Returns:
visible flag

setMutable

protected void setMutable(boolean m)
Sets the mutable flag.

Specified by:
setMutable in class ModelGraphObject
Parameters:
m - New mutable flag

searchDown

public Node searchDown(String group,
                       String name)
Search method which walks down the tree and searches by group and name. It returns a node which has the given name and group. The search includes this node.

Specified by:
searchDown in class Node
Parameters:
group - The searched group
name - The searched name
Returns:
node or null

searchDown

public Enumeration searchDown(String group)
Search method which walks down the tree and searches by group. It returns an Enumeration of nodes which has the given group. The search includes this node.

Specified by:
searchDown in class Node
Parameters:
group - The searched group
Returns:
Enumeration of nodes

searchDownInserter

protected void searchDownInserter(String group,
                                  Vector result)
This method inserts all nodes with the given group name into the result Vector. The search includes this node.

Specified by:
searchDownInserter in class Node
Parameters:
group - The searched group
result - The Vector to insert into

searchDown

public Node searchDown(int type,
                       int subType)
Search method which walks down the tree and searches by type and subtype. It returns a node which has the given type and subtype. The search includes this node.

Specified by:
searchDown in class Node
Parameters:
type - The searched type
Returns:
node or null

searchDown

public Enumeration searchDown(int type)
Search method which walks down the tree and searches by type. It returns an Enumeration of nodes which has the given type. The search includes this node.

Specified by:
searchDown in class Node
Returns:
Enumeration of nodes

searchDownInserter

protected void searchDownInserter(int type,
                                  Vector result)
This method inserts all nodes with the given type into the result Vector. The search includes this node.

Specified by:
searchDownInserter in class Node
Parameters:
type - The searched type
result - The Vector to insert into

createSubNodeList

protected void createSubNodeList(Vector list)
Inserts this leaf to a given Vector. This method is used by Node.getSubNodeList().

Specified by:
createSubNodeList in class Node
Parameters:
list - Vector to add into

createSubGroupList

protected void createSubGroupList(Vector list)
Does nothing becarse this is a leaf

Specified by:
createSubGroupList in class Node
Parameters:
list - Vector to add into

createLeafList

protected void createLeafList(Vector list)
Inserts this leaf to a given Vector. This method is used by Node.getSubLeafList().

Specified by:
createLeafList in class Node
Parameters:
list - Vector to add into

clone

public Object clone()
Clones this leaf

Overrides:
clone in class Node


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.