vrml.eai.field
Class EventInMFInt32

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

public abstract class EventInMFInt32
extends EventIn

Reference to a MFInt32 event-in slot. Use this class to write values into MFInt32 event-in slots.

The following example demonstrates how to write three integer values (0, 1 and 2) into the "colorIndex" field of an IndexedFaceSet node:

 vrml.eai.Node indexedFaceSet = ...;
 vrml.eai.field.EventInMFInt32 set_colorIndex = (vrml.eai.field.EventInMFInt32)indexedFaceSet.getEventIn("set_colorIndex");
 set_colorIndex.setValue(new int[] { 0, 1, 2 });
 


Field Summary
 
Fields inherited from class vrml.eai.field.BaseField
MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFMatrix4f, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f
 
Constructor Summary
protected EventInMFInt32()
          Default constructor.
 
Method Summary
abstract  void set1Value(int index, int value)
          Sets one element of the MFInt32 event-in slot.
abstract  void setValue(int[] value)
          Sets the elements of the MFInt32 event-in slot.
 
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

EventInMFInt32

protected EventInMFInt32()
Default constructor. This method is protected, i.e. you cannot create new instances of this class. The only way to get instances is via the Node.getEventIn(java.lang.String) method.

Method Detail

setValue

public abstract void setValue(int[] value)
Sets the elements of the MFInt32 event-in slot.

The following example demonstrates how to write three integer values (0, 1 and 2) into the "colorIndex" field of an IndexedFaceSet node:

 vrml.eai.Node indexedFaceSet = ...;
 vrml.eai.field.EventInMFInt32 set_colorIndex = (vrml.eai.field.EventInMFInt32)indexedFaceSet.getEventIn("set_colorIndex");
 set_colorIndex.setValue(new int[] { 0, 1, 2 });
 

Parameters:
value - The new integer values.

set1Value

public abstract void set1Value(int index,
                               int value)
                        throws java.lang.ArrayIndexOutOfBoundsException
Sets one element of the MFInt32 event-in slot.

The following example demonstrates how to write an integer value (2) into the first element of the "colorIndex" field of an IndexedFaceSet node:

 vrml.eai.Node indexedFaceSet = ...;
 vrml.eai.field.EventInMFInt32 set_colorIndex = (vrml.eai.field.EventInMFInt32)indexedFaceSet.getEventIn("set_colorIndex");
 set_colorIndex.set1Value(0, 2);
 

Parameters:
index - The index of the element, starting at 0.
value - The new integer value.
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid.