|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState
public abstract class SceneGraphObjectState
Field Summary | |
---|---|
protected Controller |
control
|
protected SceneGraphObject |
node
|
protected java.lang.String |
nodeClassName
|
protected SymbolTableData |
symbol
|
Constructor Summary | |
---|---|
SceneGraphObjectState(SymbolTableData symbol,
Controller control)
Create a new State object During Saveing SymbolTableData will have the nodeID and j3dNode fields set During loading SymbolTableData be null, symbol will be created and added to the symbol data during readObject() |
Method Summary | |
---|---|
void |
buildGraph()
Subclasses should processes their own buildGraph requirements BEFORE calling super.buildGraph(). |
void |
cleanup()
|
protected SceneGraphObject |
createNode()
Create a new Java3D node for this object. |
protected SceneGraphObject |
createNode(java.lang.Class state)
Create a new Java3D node from the supplied class using the parameterless constructor For Java3D nodes which do not have a default constructor you must overload this method and create the object using createNode( className, parameters ) This will correctly handle subclasses of Java3D classes |
protected SceneGraphObject |
createNode(java.lang.Class j3dClass,
java.lang.Class[] parameterTypes,
java.lang.Object[] parameters)
Create a Java3D node which does not have a default constructor parameterTypes must contain the classes required by the constructor, use Interger.TYPE, Float.TYPE etc to specifiy primitive types paramters should contain the list of parameters for the constructor, primitive types should be wrapped in the appropriate class (ie Integer, Float ) |
protected SceneGraphObject |
createNode(java.lang.String className)
Create a new Java3D node from the supplied class name using the parameterless constructor For Java3D nodes which do not have a default constructor you must overload this method and create the object using createNode( className, parameters ) This will correctly handle subclasses of Java3D classes |
private SceneGraphObject |
createNode(java.lang.String className,
java.lang.Class[] parameterTypes,
java.lang.Object[] parameters)
Create a Java3D node which does not have a default constructor parameterTypes must contain the classes required by the constructor, use Integer.TYPE, Float.TYPE etc to specifiy primitive types paramters should contain the list of parameters for the constructor, primitive types should be wrapped in the appropriate class (ie Integer, Float ) |
private SceneGraphObject |
createNodeFromSuper(java.lang.String className)
If createNode cannot locate the correct class to instantiate the node this method is called and will instantiate the node using it's Java3D Core superclass |
private SceneGraphObject |
createNodeFromSuper(java.lang.String className,
java.lang.Class[] parameterTypes,
java.lang.Object[] parameters)
If createNode cannot locate the correct class to instantiate the node this method is called and will instantiate the node using it's Java3D Core superclass |
protected SceneGraphObjectState |
createState(SceneGraphObject obj,
Controller control)
Given a scene graph object instantiate the correct State class for that object |
private java.lang.String |
getClassName(java.lang.Class c)
Return the class name of the Class, the fully qualified classname is stripped of all package information and returned |
SceneGraphObject |
getNode()
|
int |
getNodeID()
|
SymbolTableData |
getSymbol()
|
private void |
readCapabilities(java.io.DataInput in)
|
protected void |
readConstructorParams(java.io.DataInput in)
Read the parameters required for the constructor of the Java3D object |
void |
readObject(java.io.DataInput in)
|
protected java.lang.String |
readString(java.io.DataInput in)
Read and return a possibly null string |
private void |
readUserData(java.io.DataInput in)
|
private void |
writeCapabilities(java.io.DataOutput out)
|
protected void |
writeConstructorParams(java.io.DataOutput out)
Write the parameters required for the constructor of the Java3D object |
void |
writeObject(java.io.DataOutput out)
DO NOT call symbolTable.addReference in writeObject as this (may) result in a concurrentModificationException. |
protected void |
writeString(java.lang.String str,
java.io.DataOutput out)
Write a possibly null string to the stream |
private void |
writeUserData(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SceneGraphObject node
protected SymbolTableData symbol
protected Controller control
protected java.lang.String nodeClassName
Constructor Detail |
---|
public SceneGraphObjectState(SymbolTableData symbol, Controller control)
Method Detail |
---|
public void writeObject(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void readObject(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public SceneGraphObject getNode()
public int getNodeID()
public SymbolTableData getSymbol()
private void readUserData(java.io.DataInput in) throws java.io.IOException
java.io.IOException
private void writeUserData(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
private void writeCapabilities(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
private void readCapabilities(java.io.DataInput in) throws java.io.IOException
java.io.IOException
protected void writeConstructorParams(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
protected void readConstructorParams(java.io.DataInput in) throws java.io.IOException
java.io.IOException
protected SceneGraphObject createNode()
protected SceneGraphObject createNode(java.lang.Class state)
protected SceneGraphObject createNode(java.lang.String className)
private SceneGraphObject createNodeFromSuper(java.lang.String className)
private SceneGraphObject createNode(java.lang.String className, java.lang.Class[] parameterTypes, java.lang.Object[] parameters)
protected SceneGraphObject createNode(java.lang.Class j3dClass, java.lang.Class[] parameterTypes, java.lang.Object[] parameters)
private SceneGraphObject createNodeFromSuper(java.lang.String className, java.lang.Class[] parameterTypes, java.lang.Object[] parameters)
protected SceneGraphObjectState createState(SceneGraphObject obj, Controller control)
private java.lang.String getClassName(java.lang.Class c)
public void buildGraph()
public void cleanup()
protected java.lang.String readString(java.io.DataInput in) throws java.io.IOException
java.io.IOException
protected void writeString(java.lang.String str, java.io.DataOutput out) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |