Class SFImage
java.lang.Object
org.web3d.vrml.scripting.ecmascript.builtin.FieldScriptableObject
org.web3d.vrml.scripting.ecmascript.builtin.SFImage
- All Implemented Interfaces:
org.mozilla.javascript.Scriptable
MFInt field object.
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
-
Field Summary
Fields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the value of the named function.int[]
Get the array of underlying int values.void
getRawData
(int[] value) Alternative form to fetch the raw value by copying it into the provided array.boolean
has
(int index, org.mozilla.javascript.Scriptable start) boolean
static org.mozilla.javascript.Scriptable
jsConstructor
(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr) Constructor for a new Rhino objectboolean
jsFunction_equals
(Object val) Comparison of this object to another of the same type.Creates a string version of this node.void
Sets the named property with a new value.toString()
Format the internal values of this matrix as a string.Methods inherited from class org.web3d.vrml.scripting.ecmascript.builtin.FieldScriptableObject
delete, delete, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, hasChanged, hasInstance, locateFunction, put, registerFunction, setParentScope, setPrototype, setReadOnly, setScriptField
-
Constructor Details
-
SFImage
public SFImage()Default public constructor required by Rhino for when created by an Ecmascript call. -
SFImage
public SFImage(int[] values, int numValid) Construct a field based on the given array of data (sourced from a node).- Parameters:
values
- array of initial valuesnumValid
- The number of valid values to copy from the array
-
SFImage
Construct a field based on an array of SFInt32 objects.- Parameters:
args
- the objects
-
-
Method Details
-
jsConstructor
public static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr) Constructor for a new Rhino object- Parameters:
cx
-args
-ctorObj
-inNewExpr
-- Returns:
-
has
public boolean has(int index, org.mozilla.javascript.Scriptable start) - Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classFieldScriptableObject
-
has
- Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classFieldScriptableObject
-
get
Get the value of the named function. If no function object is registered for this name, the method will return null.- Specified by:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classFieldScriptableObject
- Parameters:
name
- The variable namestart
- The object where the lookup began- Returns:
- the corresponding function object or null
-
put
Sets the named property with a new value. We don't allow the users to dynamically change the length property of this node. That would cause all sorts of problems. Therefore it is read-only as far as this implementation is concerned.- Specified by:
put
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
put
in classFieldScriptableObject
- Parameters:
name
- The name of the property to definestart
- The object who's property is being setvalue
- The value being requested
-
jsFunction_toString
Creates a string version of this node. Just calls the standard toString() method of the object.- Returns:
- A VRML string representation of the field
-
jsFunction_equals
Comparison of this object to another of the same type. Just calls the standard equals() method of the object.- Parameters:
val
- The value to compare to this object- Returns:
- true if the components of the object are the same
-
toString
-
equals
-
getRawData
public int[] getRawData()Get the array of underlying int values.- Returns:
- An array of the values
-
getRawData
public void getRawData(int[] value) Alternative form to fetch the raw value by copying it into the provided array.- Parameters:
value
- The array to copy the data into
-