javax.media.j3d
Class WakeupOnElapsedTime

java.lang.Object
  extended by javax.media.j3d.WakeupCondition
      extended by javax.media.j3d.WakeupCriterion
          extended by javax.media.j3d.WakeupOnElapsedTime

public final class WakeupOnElapsedTime
extends WakeupCriterion

Class specifying a wakeup when a specific number of milliseconds have elapsed.


Field Summary
(package private)  long triggeredTime
          This represents the triggered time
(package private)  long wait
           
 
Fields inherited from class javax.media.j3d.WakeupCriterion
triggered
 
Fields inherited from class javax.media.j3d.WakeupCondition
ALL_ELEMENTS, allEnum, behav, conditionMet, id, listIdx, parent, trigEnum, TRIGGERED_ELEMENTS
 
Constructor Summary
WakeupOnElapsedTime(long milliseconds)
          Constructs a new WakeupOnElapsedTime criterion.
 
Method Summary
(package private)  void addBehaviorCondition(BehaviorStructure bs)
          This is a callback from BehaviorStructure.
 long getElapsedFrameTime()
          Retrieve the WakeupCriterion's elapsed time value that was used when constructing this object.
(package private)  void reInsertElapseTimeCond()
          This is invoked when Behavior processStimulus can't schedule to run because behav.active = false.
(package private)  void removeBehaviorCondition(BehaviorStructure bs)
          This is a callback from BehaviorStructure.
(package private)  void resetBehaviorCondition(BehaviorStructure bs)
          Perform task in addBehaviorCondition() that has to be set every time the condition met.
 
Methods inherited from class javax.media.j3d.WakeupCriterion
buildTree, cleanTree, hasTriggered, resetTree, setTriggered
 
Methods inherited from class javax.media.j3d.WakeupCondition
allElements, setConditionMet, triggeredElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wait

long wait

triggeredTime

long triggeredTime
This represents the triggered time

Constructor Detail

WakeupOnElapsedTime

public WakeupOnElapsedTime(long milliseconds)
Constructs a new WakeupOnElapsedTime criterion.

Parameters:
milliseconds - the number of milliseconds to the wakeup. A value of zero or less will cause an IllegalArgumentException to be thrown.
Method Detail

getElapsedFrameTime

public long getElapsedFrameTime()
Retrieve the WakeupCriterion's elapsed time value that was used when constructing this object.

Returns:
the elapsed time specified when constructing this object

addBehaviorCondition

void addBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. It is used to add wakeupCondition to behavior structure.

Specified by:
addBehaviorCondition in class WakeupCriterion

removeBehaviorCondition

void removeBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. It is used to remove wakeupCondition from behavior structure.

Specified by:
removeBehaviorCondition in class WakeupCriterion

reInsertElapseTimeCond

void reInsertElapseTimeCond()
This is invoked when Behavior processStimulus can't schedule to run because behav.active = false. In this case we must reinsert the wakeupOnElapseTime condition back to the TimerThread wakeup heap

Overrides:
reInsertElapseTimeCond in class WakeupCondition

resetBehaviorCondition

void resetBehaviorCondition(BehaviorStructure bs)
Perform task in addBehaviorCondition() that has to be set every time the condition met.

Specified by:
resetBehaviorCondition in class WakeupCriterion


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.