|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.ding3d.SceneGraphObject
javax.media.ding3d.Node
javax.media.ding3d.Leaf
javax.media.ding3d.Behavior
javax.media.ding3d.utils.behaviors.vp.ViewPlatformBehavior
javax.media.ding3d.utils.behaviors.vp.ViewPlatformAWTBehavior
public abstract class ViewPlatformAWTBehavior
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.
| Field Summary | |
|---|---|
static int |
KEY_LISTENER
Flag indicating Behavior should listen for Key Events |
static int |
MOUSE_LISTENER
Flag indicating Behavior should listen for Mouse Events |
static int |
MOUSE_MOTION_LISTENER
Flag indicating Behavior should listen for Mouse Motion Events |
static int |
MOUSE_WHEEL_LISTENER
Flag indicating Behavior should listen for MouseWheel Events |
| Constructor Summary | |
|---|---|
ViewPlatformAWTBehavior(Canvas3D c,
int listenerFlags)
Constructs a new ViewPlatformAWTBehavior. |
|
| Method Summary | |
|---|---|
void |
initialize()
Initializes the behavior. |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
processStimulus(java.util.Enumeration behEnum)
Process a stimulus meant for this behavior. |
void |
setEnable(boolean state)
Overload setEnable from Behavior. |
void |
setViewingPlatform(ViewingPlatform vp)
Sets the ViewingPlatform for this behavior. |
| Methods inherited from class javax.media.ding3d.utils.behaviors.vp.ViewPlatformBehavior |
|---|
getHomeTransform, getViewingPlatform, goHome, setHomeTransform |
| Methods inherited from class javax.media.ding3d.Behavior |
|---|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences |
| Methods inherited from class javax.media.ding3d.Node |
|---|
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
| Methods inherited from class javax.media.ding3d.SceneGraphObject |
|---|
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOUSE_LISTENER
public static final int MOUSE_MOTION_LISTENER
public static final int KEY_LISTENER
public static final int MOUSE_WHEEL_LISTENER
| Constructor Detail |
|---|
public ViewPlatformAWTBehavior(Canvas3D c,
int listenerFlags)
c - The Canvas3D on which to listen for events. If this is null a
NullPointerException will be thrown.listenerFlags - Indicates which listener should be registered,
one or more of MOUSE_LISTENER, MOUSE_MOTION_LISTENER, KEY_LISTENER, MOUSE_WHEEL_LISTENER| Method Detail |
|---|
public void initialize()
initialize in class Behaviorpublic void processStimulus(java.util.Enumeration behEnum)
processStimulus in class BehaviorbehEnum - an enumeration of triggered wakeup criteria for this
behaviorpublic void setEnable(boolean state)
setEnable in class Behaviorstate - true or false to enable or disable this Behaviorpublic void setViewingPlatform(ViewingPlatform vp)
setViewingPlatform in class ViewPlatformBehaviorvp - the target ViewingPlatform for this behaviorpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||