| com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior
All known Subclasses: org.jdesktop.j3dfly.utils.vpbehaviors.VPCollisionBehavior, org.jdesktop.j3dfly.utils.vpbehaviors.KeyNavigatorBehavior, com.sun.j3d.utils.behaviors.vp.OrbitBehavior,
ViewPlatformAWTBehavior | abstract public class ViewPlatformAWTBehavior extends ViewPlatformBehavior implements MouseListener,MouseMotionListener,KeyListener,MouseWheelListener(Code) | | Abstract class which implements much of the event tracking and
state updating in a thread safe manner.
AWT Events are captured and placed in a queue.
While there are pending events or motion the behavior will wake
up every frame, call processAWTEvents and integrateTransforms.
since: Java 3D 1.2.1 |
Constructor Summary | |
protected | ViewPlatformAWTBehavior() Parameterless constructor for this behavior, intended for use by
subclasses instantiated through ConfiguredUniverse. | protected | ViewPlatformAWTBehavior(int listenerFlags) Construct a behavior which listens for events specified by the given
flags, intended for use by subclasses instantiated through
ConfiguredUniverse. | public | ViewPlatformAWTBehavior(Canvas3D c, int listenerFlags) Constructs a new ViewPlatformAWTBehavior.
Parameters: c - The Canvas3D on which to listen for events. |
KEY_LISTENER | final public static int KEY_LISTENER(Code) | | Flag indicating Behavior should listen for Key Events
|
MOUSE_LISTENER | final public static int MOUSE_LISTENER(Code) | | Flag indicating Behavior should listen for Mouse Events
|
MOUSE_MOTION_LISTENER | final public static int MOUSE_MOTION_LISTENER(Code) | | Flag indicating Behavior should listen for Mouse Motion Events
|
MOUSE_WHEEL_LISTENER | final public static int MOUSE_WHEEL_LISTENER(Code) | | Flag indicating Behavior should listen for MouseWheel Events
|
POST_ID | final protected static int POST_ID(Code) | | Behavior PostId used in this behavior
|
canvases | protected Canvas3D canvases(Code) | | The Canvas3Ds from which this Behavior gets AWT events
|
motion | protected boolean motion(Code) | | Boolean for whether the mouse is in motion
|
targetTransform | protected Transform3D targetTransform(Code) | | The target Transform3D for this behavior
|
ViewPlatformAWTBehavior | protected ViewPlatformAWTBehavior()(Code) | | Parameterless constructor for this behavior, intended for use by
subclasses instantiated through ConfiguredUniverse. Such a constructor
is required for configurable behaviors.
since: Java 3D 1.3 |
ViewPlatformAWTBehavior | protected ViewPlatformAWTBehavior(int listenerFlags)(Code) | | Construct a behavior which listens for events specified by the given
flags, intended for use by subclasses instantiated through
ConfiguredUniverse.
Parameters: listenerFlags - Indicates which listener should be registered,one or more of MOUSE_LISTENER, MOUSE_MOTION_LISTENER, KEY_LISTENER, MOUSE_WHEEL_LISTENER since: Java 3D 1.3 |
ViewPlatformAWTBehavior | public ViewPlatformAWTBehavior(Canvas3D c, int listenerFlags)(Code) | | Constructs a new ViewPlatformAWTBehavior.
Parameters: c - The Canvas3D on which to listen for events. If this is null aNullPointerException will be thrown. Parameters: listenerFlags - Indicates which listener should be registered,one or more of MOUSE_LISTENER, MOUSE_MOTION_LISTENER, KEY_LISTENER, MOUSE_WHEEL_LISTENER |
initialize | public void initialize()(Code) | | Initializes the behavior.
NOTE: Applications should not call this method. It is called by the
Java 3D behavior scheduler.
|
integrateTransforms | abstract protected void integrateTransforms()(Code) | | Called once per frame (if the view is moving) to calculate the new
view platform transform
|
processAWTEvents | abstract protected void processAWTEvents(java.awt.AWTEvent[] events)(Code) | | This is called once per frame if there are any AWT events to
process.
The motion variable will be true when the method
is called. If it is true when the method returns integrateTransforms
will be called immediately.
The AWTEvents are presented in the array in the order in which they
arrived from AWT.
|
processStimulus | public void processStimulus(java.util.Enumeration behEnum)(Code) | | Process a stimulus meant for this behavior.
NOTE: Applications should not call this method. It is called by the
Java 3D behavior scheduler.
|
queueAWTEvent | protected void queueAWTEvent(AWTEvent e)(Code) | | Queue AWTEvents in a thread safe manner.
If subclasses override this method they must call
super.queueAWTEvent(e)
|
setEnable | public void setEnable(boolean state)(Code) | | Overload setEnable from Behavior.
Adds/Removes the AWT listeners depending on the requested
state.
|
setListenerFlags | protected void setListenerFlags(int listenerFlags)(Code) | | Sets listener flags for this behavior.
Parameters: listenerFlags - Indicates which listener should be registered,one or more of MOUSE_LISTENER, MOUSE_MOTION_LISTENER, KEY_LISTENER, MOUSE_WHEEL_LISTENER since: Java 3D 1.3 |
setViewingPlatform | public void setViewingPlatform(ViewingPlatform vp)(Code) | | Sets the ViewingPlatform for this behavior. This method is
called by the ViewingPlatform.
If a sub-calls overrides this method, it must call
super.setViewingPlatform(vp).
NOTE: Applications should not call this method.
|
|
|