javax.media.j3d
Class WakeupOnAWTEvent

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

public final class WakeupOnAWTEvent
extends WakeupCriterion

Class that specifies a Behavior wakeup when a specific AWT event occurs.


Field Summary
(package private)  int AwtId
           
(package private) static int COND_IN_BS_LIST
           
(package private)  long enableAWTEventTS
           
(package private)  long EventMask
           
(package private)  java.util.Vector events
           
(package private) static int TOTAL_INDEXED_UNORDER_SET_TYPES
           
 
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
WakeupOnAWTEvent(int AWTId)
          Constructs a new WakeupOnAWTEvent object that informs the Java 3D scheduler to wake up the specified Behavior object whenever the specified AWT event occurs.
WakeupOnAWTEvent(long eventMask)
          Constructs a new WakeupOnAWTEvent using Ored EVENT_MASK values.
 
Method Summary
(package private)  void addAWTEvent(java.awt.AWTEvent event)
          Sets the AWT event that will cause a behavior wakeup.
(package private)  void addBehaviorCondition(BehaviorStructure bs)
          This is a callback from BehaviorStructure.
 java.awt.AWTEvent[] getAWTEvent()
          Retrieves the array of consecutive AWT event that triggered this wakeup.
(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, reInsertElapseTimeCond, setConditionMet, triggeredElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COND_IN_BS_LIST

static final int COND_IN_BS_LIST
See Also:
Constant Field Values

TOTAL_INDEXED_UNORDER_SET_TYPES

static final int TOTAL_INDEXED_UNORDER_SET_TYPES
See Also:
Constant Field Values

AwtId

int AwtId

EventMask

long EventMask

enableAWTEventTS

long enableAWTEventTS

events

java.util.Vector events
Constructor Detail

WakeupOnAWTEvent

public WakeupOnAWTEvent(int AWTId)
Constructs a new WakeupOnAWTEvent object that informs the Java 3D scheduler to wake up the specified Behavior object whenever the specified AWT event occurs.

Parameters:
AWTId - the AWT ids that this behavior wishes to intercept

WakeupOnAWTEvent

public WakeupOnAWTEvent(long eventMask)
Constructs a new WakeupOnAWTEvent using Ored EVENT_MASK values.

Parameters:
eventMask - the AWT EVENT_MASK values Ored together
Method Detail

getAWTEvent

public java.awt.AWTEvent[] getAWTEvent()
Retrieves the array of consecutive AWT event that triggered this wakeup. A value of null implies that this event was not the trigger for the behavior wakeup.

Returns:
either null (if not resposible for wakeup) or the array of AWTEvents responsible for the wakeup.

addAWTEvent

void addAWTEvent(java.awt.AWTEvent event)
Sets the AWT event that will cause a behavior wakeup.

Parameters:
event - The event causing this wakeup

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

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.