vrml.eai.field
Class EventOutMField
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
- Direct Known Subclasses:
- EventOutMFColor, EventOutMFFloat, EventOutMFInt32, EventOutMFNode, EventOutMFRotation, EventOutMFString, EventOutMFTime, EventOutMFVec2f, EventOutMFVec3f
public abstract class EventOutMField
- extends EventOut
Abstract ancestor of all multi-value event-out slots.
This class simply defines the size()
method
that allows to determine the number of elements in a
multi-value event-out slot. This is an abstract class, i.e.
you cannot create instances of this class. The only way to
retrieve instances of this class is the
Node.getEventOut(java.lang.String)
method. Usually you do
not use this class directly, but cast it to one of its
descendants for the respective VRML data types.
The following example demonstrates how to get a reference
to the "children" event-out slot of a "Group" node:
vrml.eai.Node group = browser.getNode(...);
vrml.eai.field.EventOutMFNode children = (vrml.eai.field.EventOutMFNode)group.getEventOut("children");
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 |
Method Summary |
abstract int |
size()
Returns the number of elements in the multi-value event-out slot. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
public abstract int size()
- Returns the number of elements in the multi-value event-out slot.
The following example demonstrates prints the number of nodes
that are children of a "Group" node to the console:
vrml.eai.Node group = browser.getNode(...);
vrml.eai.field.EventOutMFNode children = (vrml.eai.field.EventOutMFNode)group.getEventOut("children");
System.out.println("Number of children = " + children.size());
- Returns:
- The number of elements.