vrml.eai.field
Class EventOutMField

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventOut
          extended by 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");
 


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
 
Method Summary
abstract  int size()
          Returns the number of elements in the multi-value event-out slot.
 
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
 

Method Detail

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.