syn3d.nodes
Class TransformGroupNode

java.lang.Object
  extended by syn3d.base.ActiveNode
      extended by syn3d.nodes.GroupNode
          extended by syn3d.nodes.TransformGroupNode
All Implemented Interfaces:
java.io.Serializable, DirtyNode
Direct Known Subclasses:
PropertiesTransformGroupNode, TransformGroupNodeJava3D, TransformGroupNodeXith3D

public class TransformGroupNode
extends GroupNode
implements DirtyNode, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected static java.util.List actions
           
protected static int anonymousNodeNumber
           
protected  TransformData data
           
protected static javax.swing.Icon icon
           
protected  SceneNode universe
           
 
Fields inherited from class syn3d.base.ActiveNode
children, name, parent
 
Constructor Summary
TransformGroupNode(ActiveNode parent)
           
 
Method Summary
 void cleanup()
          Tells this dirty node to cleanup, before rendering the scene If the node is already clean, it should return immediately
 void doAction(java.lang.Object action)
          When the user has selected an action in the list return by getActions(), this method is called.
 java.util.List getActions()
          Returns a list of possible actions on this node.
 javax.swing.Icon getIcon()
          Utility method to specialize the swing tree renderer.
protected  void initData()
           
 void remove()
          Removes this node from the parent list.
 void restoreReferences(ActiveNode parent)
          Restore a serialized object to the scene graph.
 boolean saveChildren()
          The scene/swing tree is serialized from root to leaf, hierachically.
 void setDirty()
           
 
Methods inherited from class syn3d.nodes.GroupNode
getScene
 
Methods inherited from class syn3d.base.ActiveNode
addChild, findDescendantOfType, findDescendantOfType, get3DObject, getChildren, getName, getParent, highlight, notifyInternalChange, notifyStructuralChange, propagateAddChildEvent, propagateChangeNameEvent, propagateHighlightEvent, propagateInternalChangeEvent, propagateRemoveChildEvent, propagateStructuralChangeEvent, removeChild, removeNodeTree, removeNodeTreeFrom, setName, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

anonymousNodeNumber

protected static int anonymousNodeNumber

data

protected TransformData data

universe

protected transient SceneNode universe

actions

protected static java.util.List actions

icon

protected static javax.swing.Icon icon
Constructor Detail

TransformGroupNode

public TransformGroupNode(ActiveNode parent)
Method Detail

initData

protected void initData()

cleanup

public void cleanup()
Description copied from interface: DirtyNode
Tells this dirty node to cleanup, before rendering the scene If the node is already clean, it should return immediately

Specified by:
cleanup in interface DirtyNode

setDirty

public void setDirty()

getActions

public java.util.List getActions()
Description copied from class: ActiveNode
Returns a list of possible actions on this node. Actions may be classified by categories using the "|" separator. Ex: a transform node may have the following actions: "Rotate|90° on X", "Rotate|180° on X", etc...

Overrides:
getActions in class ActiveNode
Returns:
an array of possible actions, or a null or empty array if this node doesn't handle any action

doAction

public void doAction(java.lang.Object action)
Description copied from class: ActiveNode
When the user has selected an action in the list return by getActions(), this method is called. The node should then do what it claims.

Overrides:
doAction in class ActiveNode
Parameters:
action - An action previously declared by the getActions method.

remove

public void remove()
Description copied from class: ActiveNode
Removes this node from the parent list. Notifies the parents for structural change.

Overrides:
remove in class ActiveNode

getIcon

public javax.swing.Icon getIcon()
Description copied from class: ActiveNode
Utility method to specialize the swing tree renderer. Give a look to your node, don't let it anonymous!

Overrides:
getIcon in class ActiveNode
Returns:
an Icon to display in the swing tree. May be shared along a node type class, or may even change according the the state of this node.

restoreReferences

public void restoreReferences(ActiveNode parent)
Description copied from class: ActiveNode
Restore a serialized object to the scene graph. The scene is restored from root to leaf, hierachically. A node can count on its parent beeing successfully deserialized, and its precisely the added value of this method to indicate to this object the parent it should attach to. This node is responsible for re-creating its children if it returned true in the save operation. See description of the saveChildren method. This method is called after this node was successfully de-serialized, to give it an occasion to restore anything it may have to with its parent (listeners, etc...). As with the plugin interface methode create, this method should ensure that the 3D object this nodes refers to is added to its parent children list in the underlying 3D model (Java3D, Xith3D). Default behavior is to set this node's parent field to the given value, but an implementor SHALL do what's necessary for the underlying 3D scene graph.

Overrides:
restoreReferences in class ActiveNode
Parameters:
parent - The active node to attach this one to once it has been successfully de-serialized

saveChildren

public boolean saveChildren()
Description copied from class: ActiveNode
The scene/swing tree is serialized from root to leaf, hierachically. A node can count on its parent beeing successfully serialized, and should not try to save its parent. On the other hand, if it is able to re-create the children upon reload it should return true and this branch is considered done. This is especially useful for nodes loaded from external scene object files. This method is called after the object was successfully serialized, to determine wheter or not continue in this tree branch.

Overrides:
saveChildren in class ActiveNode
Returns:
true if this object handles its children, false if it does not. Default is false