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

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.Group
                  extended byde.fhg.igd.earth.model.graph.SwitchGroup
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
DetailGroup, DistanceDetailGroup, HistoryGroup

public abstract class SwitchGroup
extends Group
implements Serializable, Cloneable

This class represents a SwitchGroup. The children can switched switched on or off controlled by the childMask (BitSet) and the witchChild value. If the witchChild value is set to CHILD_MASK the projector filters the children with the childMask. This class is used to realizes the LOD-Groups Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

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

Field Summary
static int CHILD_ALL
          show all children
static int CHILD_MASK
          show only the childMask filtered children
static int CHILD_NONE
          don't show any children
private  BitSet childMask_
          childMask
private  int witchChild_
          main filter (NONE,ALL,MASK)
 
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.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
SwitchGroup()
          Creates an instance of this class.
SwitchGroup(int wc)
          Creates an instance of this class and set witchChild.
SwitchGroup(int wc, BitSet cm)
          Creates an instance of this class and set witchChild, childMask.
 
Method Summary
protected  void childAddedEvent(int index)
          This method can be overwritten by subclasses.
protected  void childRemovedEvent(int index)
          This method can be overwritten by subclasses.
 Object clone()
          Clones the SwitchGroup
 BitSet getChildMask()
          Returns the childMask
 int getWitchChild()
          Returns the witchChild value
 void setChildMask(BitSet cm)
          Sets the childMask.
 void setWitchChild(int wc)
          Sets the witchChild value.
 
Methods inherited from class de.fhg.igd.earth.model.graph.Group
addChild, allowChildAddEvent, calcBoundingBox, createLeafList, createSubGroupList, createSubNodeList, detach, detachedEvent, getAllChildren, getChild, getErasedChildren, getSubType, getType, 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, 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

CHILD_NONE

public static final int CHILD_NONE
don't show any children

See Also:
Constant Field Values

CHILD_ALL

public static final int CHILD_ALL
show all children

See Also:
Constant Field Values

CHILD_MASK

public static final int CHILD_MASK
show only the childMask filtered children

See Also:
Constant Field Values

childMask_

private BitSet childMask_
childMask


witchChild_

private int witchChild_
main filter (NONE,ALL,MASK)

Constructor Detail

SwitchGroup

public SwitchGroup()
Creates an instance of this class. witchChild is set to CHILD_NONE


SwitchGroup

public SwitchGroup(int wc)
Creates an instance of this class and set witchChild.

Parameters:
wc - witchChild

SwitchGroup

public SwitchGroup(int wc,
                   BitSet cm)
Creates an instance of this class and set witchChild, childMask.

Parameters:
wc - witchChild
cm - childMask
Method Detail

getChildMask

public BitSet getChildMask()
Returns the childMask

Returns:
childMask

setChildMask

public void setChildMask(BitSet cm)
Sets the childMask.


getWitchChild

public int getWitchChild()
Returns the witchChild value

Returns:
witchChild

setWitchChild

public void setWitchChild(int wc)
Sets the witchChild value. CHILD_NONE, CHILD_ALL, CHILD_MASK


childAddedEvent

protected void childAddedEvent(int index)
This method can be overwritten by subclasses.

Overrides:
childAddedEvent in class Group
Parameters:
index - Index of the new node

childRemovedEvent

protected void childRemovedEvent(int index)
This method can be overwritten by subclasses.

Overrides:
childRemovedEvent in class Group

clone

public Object clone()
Clones the SwitchGroup

Overrides:
clone in class Group


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.