Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class SceneGraphObject

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
Direct Known Subclasses:
BaseSceneGraphObject, BufferState, Layer, Node, NodeComponent, ObjectSet, RenderPass, Scene, ShaderObject, ViewEnvironment, Viewport, ViewportLayer

public abstract class SceneGraphObject
extends java.lang.Object

The SceneGraphObject is a common superclass for all scene graph objects.

Internationalisation Resource Names

Version:
$Revision: 1.16 $
Author:
Alan Hudson

Field Summary
protected  boolean alive
          Current live state of the object
protected static java.lang.String LISTENER_SET_TIMING_ERR_PROP
          Property defining the error message used for listener set timing
protected  NodeUpdateHandler updateHandler
          The scene this node belongs to
 
Constructor Summary
SceneGraphObject()
           
 
Method Summary
protected  void checkForCyclicChild(SceneGraphObject parent)
          Check to see if this node is the same reference as the passed node that is a parent of this node.
protected  void checkForCyclicParent(SceneGraphObject child)
          Check to see if this node is the same reference as the passed node.
 void dataChanged(NodeUpdateListener l)
          Notify the node that you have updates to the node that will not alter its bounds.
protected  java.lang.String getAppUpdateWriteTimingMessage()
          Convenience method to fetch the data write change error message from the internationalisation manager.
protected  java.lang.String getBoundsWriteTimingMessage()
          Convenience method to fetch the data write change error message from the internationalisation manager.
protected  java.lang.String getDataWriteTimingMessage()
          Convenience method to fetch the data write change error message from the internationalisation manager.
 java.lang.Object getUserData()
          Get the currently set user data object.
 boolean isLive()
          Check to see whether this object is alive or not.
protected  void setLive(boolean state)
          Notification that this object's liveness state has changed.
protected  void setUpdateHandler(NodeUpdateHandler handler)
          Set the scenegraph update handler for this node.
 void setUserData(java.lang.Object data)
          Set the user data to the new object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LISTENER_SET_TIMING_ERR_PROP

protected static final java.lang.String LISTENER_SET_TIMING_ERR_PROP
Property defining the error message used for listener set timing

See Also:
Constant Field Values

updateHandler

protected NodeUpdateHandler updateHandler
The scene this node belongs to


alive

protected boolean alive
Current live state of the object

Constructor Detail

SceneGraphObject

public SceneGraphObject()
Method Detail

setUserData

public void setUserData(java.lang.Object data)
Set the user data to the new object. Null will clear the existing object.

Parameters:
data - The new piece of data to set

getUserData

public java.lang.Object getUserData()
Get the currently set user data object. If none set, null is returned.

Returns:
The current user data or null

isLive

public boolean isLive()
Check to see whether this object is alive or not.

Returns:
true if this object is currently live

setLive

protected void setLive(boolean state)
Notification that this object's liveness state has changed.

Parameters:
state - true if this should be marked as live now

checkForCyclicParent

protected void checkForCyclicParent(SceneGraphObject child)
                             throws CyclicSceneGraphStructureException
Check to see if this node is the same reference as the passed node. This is the upwards check to ensure that there is no cyclic scene graph structures at the point where someone adds a node to the scenegraph. When the reference and this are the same, an exception is generated.

Parameters:
child - The reference to check against this class
Throws:
CyclicSceneGraphStructureException - Equal parent and child

checkForCyclicChild

protected void checkForCyclicChild(SceneGraphObject parent)
                            throws CyclicSceneGraphStructureException
Check to see if this node is the same reference as the passed node that is a parent of this node. This is the downwards check to ensure that there is no cyclic scene graph structures at the point where someone adds a node to the scenegraph. When the reference and this are the same, an exception is generated. Since each class may have different lists of child node setups, this should be overriden by any class that can take children, and have the call passed along to the children.

Parameters:
parent - The reference to check against this class
Throws:
CyclicSceneGraphStructureException - Equal parent and child

setUpdateHandler

protected void setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. It will notify all its children of the value. A null value will clear the current handler.

Parameters:
handler - The instance to use as a handler

dataChanged

public void dataChanged(NodeUpdateListener l)
                 throws InvalidListenerSetTimingException
Notify the node that you have updates to the node that will not alter its bounds.

Parameters:
l - The change requestor
Throws:
InvalidListenerSetTimingException - If called when the node is not live or if called during one of the bounds/data changed callbacks

getDataWriteTimingMessage

protected java.lang.String getDataWriteTimingMessage()
Convenience method to fetch the data write change error message from the internationalisation manager.

Returns:
The current internationalisation message

getBoundsWriteTimingMessage

protected java.lang.String getBoundsWriteTimingMessage()
Convenience method to fetch the data write change error message from the internationalisation manager.

Returns:
The current internationalisation message

getAppUpdateWriteTimingMessage

protected java.lang.String getAppUpdateWriteTimingMessage()
Convenience method to fetch the data write change error message from the internationalisation manager.

Returns:
The current internationalisation message

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org