vrml.eai.field
Class EventIn

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventIn
Direct Known Subclasses:
EventInMFColor, EventInMFFloat, EventInMFInt32, EventInMFNode, EventInMFRotation, EventInMFString, EventInMFTime, EventInMFVec2f, EventInMFVec3f, EventInSFBool, EventInSFColor, EventInSFFloat, EventInSFImage, EventInSFInt32, EventInSFNode, EventInSFRotation, EventInSFString, EventInSFTime, EventInSFVec2f, EventInSFVec3f

public abstract class EventIn
extends BaseField

Abstract ancestor of all event-in slots. This class simply defines methods that allows to attach arbitrary application-specific data to event-in slots. 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.getEventIn(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 "addChildren" event-in slot of a "Group" node:

 vrml.eai.Node group = browser.getNode(...);
 vrml.eai.field.EventInMFNode addChildren = (vrml.eai.field.EventInMFNode)group.getEventIn("addChildren");
 


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  java.lang.Object getUserData()
          Returns the application-specific user data attached to this event-in slot.
abstract  void setUserData(java.lang.Object data)
          Attaches application-specific user data to this event-in slot.
 
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

getUserData

public abstract java.lang.Object getUserData()
Returns the application-specific user data attached to this event-in slot. This user data is not used by the EAI in any way - it is a simple way to attach application-specific data to event-in slots.

The following example demonstrates how to retrieve a data object ("myData") attached to an event-in slot:

 vrml.eai.field.EventIn eventIn = ...;
 MyClass myData = (MyClass)eventIn.getUserData();
 

Returns:
The application-specific user data.

setUserData

public abstract void setUserData(java.lang.Object data)
Attaches application-specific user data to this event-in slot. This user data is not used by the EAI in any way - it is a simple way to attach application-specific data to event-in slots.

The following example demonstrates how to attach a data object ("myData") to an event-in slot:

 MyClass myData = ...;
 vrml.eai.field.EventIn eventIn = ...;
 eventIn.setUserData(myData);
 

Parameters:
data - The application-specific user data.