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 int
The field index in the parentNode that this belongs toprotected VRMLNodeType
The 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, scriptField
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NodeFieldObject
(String name) Construct a new instance of this object using the given name. -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
Get the list of fields that have changed.abstract void
realize()
If the node contains a node instance, check and call its setupFinished if needed.void
setParentField
(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 singleNodeFieldData
instance or anArrayList
of 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
,ArrayList
or null
-
realize
public abstract void realize()If the node contains a node instance, check and call its setupFinished if needed.
-