Class EventInMFNode
- Direct Known Subclasses:
EventInMFNodeWrapper
Set the values of a node array to the given values. The java
null
reference is treated to be equivalent to the VRML
NULL
field values.
In the cases where this eventIn is used to represent eventIn
MFNode fields such as addChildren
and
removeChildren
calling the set methods with a zero length array
or null will result in nothing happening. No event will be propagated to the
VRML browser scene graph (although the browser native code may receive this
information internally).
Where this eventIn is used to represent exposedFields such as the
children
field of grouping nodes calling the set methods with
null or zero length arrays will result in that field being cleared of all
its children.
If the eventIn is constructed from an exposedField where the set_ modifier has been specified this shall be treated as though a normal exposedField has been called.
It is legal 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 passed to the scene graph may vary until the issue is resolved.
- Version:
- 1.0 30 April 1998
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class vrml.eai.field.EventIn
getUserData, setUserData
-
Constructor Details
-
EventInMFNode
protected EventInMFNode()Construct an instance of this class. The superclass constructor is called with the type MFNode.
-
-
Method Details
-
setValue
Set the value of the array of nodes. Input is an array of valid Node references. If the length is zero or the node reference is null, then the actions to take are according to the class introduction above. If the array contains a null reference then th resulting event passed to the eventIn is implementation dependentIf any of the node references have had their dispose methods called, an InvalidNodeException will be generated and no event sent to the scene graph.
- Parameters:
value
- The array of node references
-
set1Value
Set a particular node value in the given eventIn array. To the VRML world this will generate a full MFNode event with the nominated index value changed.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 scene graph 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.
- Parameters:
index
- The position to set the colour valuevalue
- The node reference- Throws:
ArrayIndexOutOfBoundsException
- The index was out of bounds of the array currently.
-