Class NodeFieldObject
java.lang.Object
org.web3d.vrml.scripting.ecmascript.builtin.FieldScriptableObject
org.web3d.vrml.scripting.ecmascript.builtin.NodeFieldObject
- All Implemented Interfaces:
org.mozilla.javascript.Scriptable
Extension of the basic scriptable object with some specifics for handling
nested field data.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe field index in the parentNode that this belongs toprotected VRMLNodeTypeThe parent node of this fieldFields inherited from class org.web3d.vrml.scripting.ecmascript.builtin.FieldScriptableObject
BAD_FORMAT_MSG, dataChanged, INVALID_TYPE_MSG, readOnly, READONLY_MSG, scriptFieldFields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNodeFieldObject(String name) Construct a new instance of this object using the given name. -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectGet the list of fields that have changed.abstract voidrealize()If the node contains a node instance, check and call its setupFinished if needed.voidsetParentField(VRMLNodeType parent, int fieldIndex) Set the container node and field information for this node.Methods inherited from class org.web3d.vrml.scripting.ecmascript.builtin.FieldScriptableObject
delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasChanged, hasInstance, locateFunction, put, put, registerFunction, setParentScope, setPrototype, setReadOnly, setScriptField
-
Field Details
-
parentNode
The parent node of this field -
parentFieldIndex
protected int parentFieldIndexThe field index in the parentNode that this belongs to
-
-
Constructor Details
-
NodeFieldObject
Construct a new instance of this object using the given name.- Parameters:
name- The name of the scriptable object
-
-
Method Details
-
setParentField
Set the container node and field information for this node.- Parameters:
parent- The parent node of this fieldfieldIndex- The index of the field that this field wraps
-
getChangedFields
Get the list of fields that have changed. The return value may be either a singleNodeFieldDatainstance or anArrayListof field data instances if more than one has changed. When called, this is recursive so that all fields and nodes referenced by this node field will be included. If no fields have changed, this will return null. However, that should never happen as the user should always checkFieldScriptableObject.hasChanged()which would return false before calling this method.- Returns:
- A single
NodeFieldData,ArrayListor null
-
realize
public abstract void realize()If the node contains a node instance, check and call its setupFinished if needed.
-