|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFInt32
public abstract class EventOutMFInt32
Reference to a MFInt32 event-out slot. Use this class to read values from MFInt32 event-out slots.
The following example gets the values of an "index_changed" event-out slot of a Script node and prints them to the console:
vrml.eai.Node script = ...;
vrml.eai.field.EventOutMFInt32 index_changed = (vrml.eai.field.EventOutMFInt32)script.getEventOut("index_changed");
int[] v = index_changed.getValue();
for (int i = 0; i < v.length; ++i)
System.out.println(v[i]);
| Field Summary |
|---|
| Fields inherited from class vrml.eai.field.BaseField |
|---|
MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f |
| Constructor Summary | |
|---|---|
protected |
EventOutMFInt32()
Default Constructor. |
| Method Summary | |
|---|---|
abstract int |
get1Value(int index)
Returns one element of a MFFloat event-out slot. |
abstract int[] |
getValue()
Returns the current value of a MFInt32 event-out slot. |
abstract void |
getValue(int[] value)
Returns the current value of a MFInt32 event-out slot. |
| Methods inherited from class vrml.eai.field.EventOutMField |
|---|
size |
| Methods inherited from class vrml.eai.field.EventOut |
|---|
addVrmlEventListener, getUserData, removeVrmlEventListener, 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 |
|---|
protected EventOutMFInt32()
Node.getEventOut(java.lang.String) method.
| Method Detail |
|---|
public abstract int[] getValue()
The following example gets the values of an "index_changed" event-out slot of a Script node and prints them to the console:
vrml.eai.Node script = ...;
vrml.eai.field.EventOutMFInt32 index_changed = (vrml.eai.field.EventOutMFInt32)script.getEventOut("index_changed");
int[] v = index_changed.getValue();
for (int i = 0; i < v.length; ++i)
System.out.println(v[i]);
public abstract void getValue(int[] value)
throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the values of an "index_changed" event-out slot of a Script node and prints them to the console:
vrml.eai.Node script = ...;
vrml.eai.field.EventOutMFInt32 index_changed = (vrml.eai.field.EventOutMFInt32)script.getEventOut("index_changed");
int size = index_changed.size();
int[] v = new int[size];
index_changed.getValue(v);
for (int i = 0; i < size; ++i)
System.out.println(v[i]);
value - An array of integer values that gets filled with the
current integer values of the MFInt32 event-out slot.
java.lang.ArrayIndexOutOfBoundsException - when the value array is
too small.
public abstract int get1Value(int index)
throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the first value of an "index_changed" event-out slot of a Script node and prints it to the console:
vrml.eai.Node script = ...;
vrml.eai.field.EventOutMFInt32 index_changed = (vrml.eai.field.EventOutMFInt32)script.getEventOut("index_changed");
System.out.println(index_changed.get1Value(0));
index - The index of the element, starting at 0.
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||