|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseBindableNode
An abstract implementation of any bindable node.
The implementation treats the time and bound states independently. It is assumed that the browser environment displaying the world will take care of the stack and bind time information setting.
| Field Summary | |
protected static int |
FIELD_BIND
Index of the set_bind eventIn |
protected static int |
FIELD_BIND_TIME
Index of the bindTime field |
protected static int |
FIELD_IS_BOUND
Index of the isBind eventOut |
protected boolean |
isOnStack
Flag indicating if this node is already on the stack |
protected static int |
LAST_BINDABLE_INDEX
The last field index used by this class |
protected double |
vfBindTime
SFTime bindTime |
protected boolean |
vfIsBound
SFBool isBound |
| Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
BAD_NODE_MSG, errorReporter, FIELD_METADATA, fieldData, hasChanged, INIT_ONLY_WRITE_MSG, inSetup, isDEF, isStatic, LAST_NODE_INDEX, METADATA_NODE_MSG, METADATA_PROTO_MSG, nodeName, pMetadata, refCount, stateManager, vfMetadata, vrmlMajorVersion, vrmlMinorVersion |
| Constructor Summary | |
protected |
BaseBindableNode(java.lang.String name)
Construct a default instance of this class with the bind flag set to false and no time information set (effective value of zero). |
| Method Summary | |
void |
addBindableNodeListener(VRMLBindableNodeListener l)
Add a listener for geometry changed events. |
protected void |
copy(VRMLBindableNodeType node)
Set the fields of the binadble node that has the fields set based on the fields of the passed in node. |
protected void |
fireIsBoundChanged(boolean isActive)
Send the bindable listeners the an event to say we have just become the active node. |
double |
getBindTime()
Set the bindTime field of this node. |
VRMLFieldData |
getFieldValue(int index)
Get the value of a field. |
boolean |
getIsBound()
Get the current isBound state of the node. |
int[] |
getSecondaryType()
Get the secondary type of this node. |
void |
removeBindableNodeListener(VRMLBindableNodeListener l)
Remove a listener for geometry changed events. |
void |
sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Send a routed value from this node to the given destination node. |
void |
setBind(boolean enable,
boolean notify,
double time)
Set the bind field of this node. |
void |
setOnStack(boolean onStack)
Notify the bindable node that it is on the stack, or not on the stack, as the case may be and that it should send bind events as appropriate |
void |
setValue(int index,
boolean value)
Set the value of the field at the given index as an boolean. |
void |
setVRMLClock(VRMLClock clock)
Set the clock that this time dependent node will be running with. |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, fireFieldChanged, getMetadataObject, getNodeFieldIndices, getRefCount, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setupFinished, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, updateRefCount |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType |
addNodeListener, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount |
| Methods inherited from interface org.web3d.vrml.lang.VRMLNode |
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion |
| Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener |
allEventsComplete |
| Field Detail |
protected static final int FIELD_BIND
protected static final int FIELD_BIND_TIME
protected static final int FIELD_IS_BOUND
protected static final int LAST_BINDABLE_INDEX
protected double vfBindTime
protected boolean vfIsBound
protected boolean isOnStack
| Constructor Detail |
protected BaseBindableNode(java.lang.String name)
name - The name of the type of node| Method Detail |
protected void copy(VRMLBindableNodeType node)
node - The bindable node to copy info frompublic void setVRMLClock(VRMLClock clock)
setVRMLClock in interface VRMLTimeDependentNodeTypeclock - The clock to use for this nodepublic void setOnStack(boolean onStack)
setOnStack in interface VRMLBindableNodeTypeonStack - true if this node is now on the stack
public void setBind(boolean enable,
boolean notify,
double time)
setBind in interface VRMLBindableNodeTypeenable - True if this node is to be boundnotify - true if this should notify the listenerstime - The time that this was sentpublic boolean getIsBound()
getIsBound in interface VRMLBindableNodeTypepublic double getBindTime()
getBindTime in interface VRMLBindableNodeTypepublic void addBindableNodeListener(VRMLBindableNodeListener l)
addBindableNodeListener in interface VRMLBindableNodeTypel - The listener to addpublic void removeBindableNodeListener(VRMLBindableNodeListener l)
removeBindableNodeListener in interface VRMLBindableNodeTypel - The listener to removepublic int[] getSecondaryType()
getSecondaryType in interface VRMLNodegetSecondaryType in class AbstractNode
public VRMLFieldData getFieldValue(int index)
throws InvalidFieldException
getFieldValue in interface VRMLNodeTypegetFieldValue in class AbstractNodeindex - The index of the field to change.
InvalidFieldException - The field index is not known
public void sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
sendRoute in interface VRMLNodeTypesendRoute in class AbstractNodetime - The time that this route occurred (not necessarily epoch
time. Should be treated as a relative value only)srcIndex - The index of the field in this node that the value
should be sent fromdestNode - The node reference that we will be sending the value todestIndex - The index of the field in the destination node that
the value should be sent to.
public void setValue(int index,
boolean value)
throws InvalidFieldException,
InvalidFieldValueException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not know
InvalidFieldValueException - The value provided is out of range
for the field type.protected void fireIsBoundChanged(boolean isActive)
isActive - true if this node is becoming active
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||