vrml.eai.field
Class EventInSFTime

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventIn
          extended by vrml.eai.field.EventInSFTime

public abstract class EventInSFTime
extends EventIn

Reference to a SFTime event-in slot. Use this class to write values into SFTime event-in slots.

The following example demonstrates how to start a TimeSensor in 5 seconds from the current time:

 vrml.eai.Node timeSensor = ...;
 vrml.eai.field.EventInSFTime set_startTime = (vrml.eai.field.EventInSFTime)timeSensor.getEventIn("set_startTime");
 java.util.Date date = new java.util.Date();
 set_startTime.setValue((double)date.getTime() / 1000.0 + 5.0);
 


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 EventInSFTime()
          Default constructor.
 
Method Summary
abstract  void setValue(double value)
          Sets the value of the SFTime event-in slot.
 
Methods inherited from class vrml.eai.field.EventIn
getUserData, 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

EventInSFTime

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

Method Detail

setValue

public abstract void setValue(double value)
Sets the value of the SFTime event-in slot.

The following example demonstrates how to start a TimeSensor in 5 seconds from the current time:

 vrml.eai.Node timeSensor = ...;
 vrml.eai.field.EventInSFTime set_startTime = (vrml.eai.field.EventInSFTime)timeSensor.getEventIn("set_startTime");
 java.util.Date date = new java.util.Date();
 set_startTime.setValue((double)date.getTime() / 1000.0 + 5.0);
 

Parameters:
value - The new time value. The time is specified in a double value containing the number of seconds since January the 1st, 1970, 00:00:00 GMT.