Xj3D 2.0 VRML/X3D Code API

vrml.eai.field
Class EventInMFNode

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventIn
          extended by vrml.eai.field.EventInMFNode

public abstract class EventInMFNode
extends EventIn

VRML eventIn class for MFNode.

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 propogated to the VRML browser scenegraph (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 scenegraph may vary until the issue is resolved.

Version:
1.0 30 April 1998

Field Summary
 
Fields inherited from class vrml.eai.field.BaseField
fieldType, MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f, UNSET_FIELD
 
Constructor Summary
protected EventInMFNode()
          Construct an instance of this class.
 
Method Summary
abstract  void set1Value(int index, Node value)
          Set a particular node value in the given eventIn array.
abstract  void setValue(Node[] value)
          Set the value of the array of nodes.
 
Methods inherited from class vrml.eai.field.EventIn
getUserData, setUserData
 
Methods inherited from class vrml.eai.field.BaseField
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventInMFNode

protected EventInMFNode()
Construct an instance of this class. The superclass constructor is called with the type MFNode.

Method Detail

setValue

public abstract void setValue(Node[] value)
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 dependent

If any of the node references have had their dispose methods called, an InvalidNodeException will be generated and no event sent to the scenegraph.

Parameters:
value - The array of node references
Throws:
InvalidNodeException - At least one node has been "disposed" of

set1Value

public abstract void set1Value(int index,
                               Node value)
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 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.

Parameters:
index - The position to set the colour value
value - The node reference
Throws:
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

Copyright © 2001 - 2006 Web3D Consortium