|
|||||||||
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.EventOutMFString
public abstract class EventOutMFString
Reference to a MFString event-out slot. Use this class to read values from MFString event-out slots.
The following example gets the lines from the "string" field of a Text node and prints them to the console:
vrml.eai.Node text = ...; vrml.eai.field.EventOutMFString string_changed = (vrml.eai.field.EventOutMFString)text.getEventOut("string_changed"); String[] s = string_changed.getValue(); for (int i = 0; i < s.length; ++i) System.out.println(s[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 |
EventOutMFString()
Default Constructor. |
Method Summary | |
---|---|
abstract java.lang.String |
get1Value(int index)
Returns one element of a MFString event-out slot. |
abstract java.lang.String[] |
getValue()
Returns the current value of a MFString event-out slot. |
abstract void |
getValue(java.lang.String[] value)
Returns the current value of a MFString 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 EventOutMFString()
Node.getEventOut(java.lang.String)
method.
Method Detail |
---|
public abstract java.lang.String[] getValue()
The following example gets the lines from the "string" field of a Text node and prints them to the console:
vrml.eai.Node text = ...; vrml.eai.field.EventOutMFString string_changed = (vrml.eai.field.EventOutMFString)text.getEventOut("string_changed"); String[] s = string_changed.getValue(); for (int i = 0; i < s.length; ++i) System.out.println(s[i]);
public abstract void getValue(java.lang.String[] value) throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the lines from the "string" field of a Text node and prints them to the console:
vrml.eai.Node text = ...; vrml.eai.field.EventOutMFString string_changed = (vrml.eai.field.EventOutMFString)text.getEventOut("string_changed"); int size = string_changed.size(); String[] s = new String[size]; string_changed.getValue(s); for (int i = 0; i < size; ++i) System.out.println(s[i]);
value
- An array of strings that gets filled with the current
string values of the MFString event-out slot.
java.lang.ArrayIndexOutOfBoundsException
- when the value array is too
small.public abstract java.lang.String get1Value(int index) throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the first line from the "string" field of a Text node and prints it to the console:
vrml.eai.Node text = ...; vrml.eai.field.EventOutMFString string_changed = (vrml.eai.field.EventOutMFString)text.getEventOut("string_changed"); System.out.println(string_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 |