|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MFNode
Representation of a MFNode field.
Get the values of a node array. The java null reference is
treated to be equivalent to the VRML NULL field values.
It is not illegal to construct an array where some members of the array are null pointers. Due to no specification on the intended result in the VRML specification, the response given by the browser is implementation dependent. Calls will not generate an exception, but the value of actual event received from the scenegraph may vary until the issue is resolved.
| Method Summary | |
|---|---|
void |
append(X3DNode value)
Places a new value at the end of the existing value, increasing the field length accordingly. |
void |
clear()
Removes all values in the field and changes the field size to zero. |
X3DNode |
get1Value(int index)
Get a particular node value in the given eventOut array. |
void |
getValue(X3DNode[] nodes)
Write the value of the array of the nodes to the given array. |
void |
insertValue(int index,
X3DNode value)
Inserts a value into an existing index of the field. |
void |
removeValue(int index)
Removes one value from the field. |
void |
set1Value(int index,
X3DNode value)
Set a particular node value in the given eventIn array. |
void |
setValue(int size,
X3DNode[] value)
Set the value of the array of nodes. |
| Methods inherited from interface org.web3d.x3d.sai.MField |
|---|
getSize |
| Methods inherited from interface org.web3d.x3d.sai.X3DField |
|---|
addX3DEventListener, getDefinition, getUserData, isReadable, isWritable, removeX3DEventListener, setUserData |
| Method Detail |
|---|
void append(X3DNode value)
value - The value to appendvoid clear()
void getValue(X3DNode[] nodes)
nodes - The node array to be filled in
java.lang.ArrayIndexOutOfBoundsException - The provided array was too smallX3DNode get1Value(int index)
If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated. If the Node value is NULL because the browser implementation keeps null references then this method will return a null pointer without throwing any exception.
index - The position to read the values from
java.lang.ArrayIndexOutOfBoundsException - The index was outside the current data
array bounds.
void insertValue(int index,
X3DNode value)
throws java.lang.ArrayIndexOutOfBoundsException
index - The position at which to insertvalue - The new element to insert
java.lang.ArrayIndexOutOfBoundsException - The index was outside the current field
size.
void removeValue(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - The position of the value to remove.
java.lang.ArrayIndexOutOfBoundsException - The index was outside the current field
size.
void setValue(int size,
X3DNode[] value)
If any of the node references have had their dispose methods called, an InvalidNodeException will be generated and no event sent to the scenegraph.
size - The number of nodes to copy from this arrayvalue - The array of node references
InvalidNodeException - At least one node has been "disposed" of
void set1Value(int index,
X3DNode value)
If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated. If the Node value is null the behaviour will be undefined as far as generating an event to the scenegraph is concerned in order to be consistent with the behaviour described in the class introduction. This method call will not generate an exception if the node reference is null.
If the node reference passed to this method has already had the dispose method called then an InvalidNodeException will be generated.
index - The position to set the colour valuevalue - The node reference
InvalidNodeException - The node has been "disposed" of
java.lang.ArrayIndexOutOfBoundsException - The index was out of bounds of the
array currently.
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||