vrml.eai.field
Class EventOutSFNode

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventOut
          extended by vrml.eai.field.EventOutSFNode

public abstract class EventOutSFNode
extends EventOut

Reference to a SFNode event-out slot. Use this class to read values from SFNode event-out slots.

The following example demonstrates how to get the geometry node from a Shape node and prints the type of geometry to the console:

 vrml.eai.Node shapeNode = ...;
 vrml.eai.field.EventOutSFNode geometry_changed = (vrml.eai.field.EventOutSFNode)shapeNode.getEventOut("geometry_changed");
 vrml.eai.Node geometry = geometry_changed.getValue();
 if (geometry == null)
     System.out.println("geometry = null");
 else
     System.out.println("geometry = " + geometry.getType());
 


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 EventOutSFNode()
          Default Constructor.
 
Method Summary
abstract  Node getValue()
          Returns the current value of the SFNode 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
 

Constructor Detail

EventOutSFNode

protected EventOutSFNode()
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.getEventOut(java.lang.String) method.

Method Detail

getValue

public abstract Node getValue()
Returns the current value of the SFNode event-out slot.

The following example demonstrates how to get the geometry node from a Shape node and prints the type of geometry to the console:

 vrml.eai.Node shapeNode = ...;
 vrml.eai.field.EventOutSFNode geometry_changed = (vrml.eai.field.EventOutSFNode)shapeNode.getEventOut("geometry_changed");
 vrml.eai.Node geometry = geometry_changed.getValue();
 if (geometry == null)
     System.out.println("geometry = null");
 else
     System.out.println("geometry = " + geometry.getType());
 

Returns:
The node. This can be null when there currently is no node in the event-out slot.