public abstract class ViewPlatformAWTBehavior extends ViewPlatformBehavior implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, java.awt.event.MouseWheelListener
Modifier and Type | Field and Description |
---|---|
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
|
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
Constructor and Description |
---|
ViewPlatformAWTBehavior(Canvas3D c,
int listenerFlags)
Constructs a new ViewPlatformAWTBehavior.
|
Modifier and Type | Method and Description |
---|---|
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.Iterator<WakeupCriterion> 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.
|
getHomeTransform, getViewingPlatform, goHome, setHomeTransform
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
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
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_LISTENERpublic void initialize()
initialize
in class Behavior
public void processStimulus(java.util.Iterator<WakeupCriterion> behEnum)
processStimulus
in class Behavior
behEnum
- an iterator of triggered wakeup criteria for this
behaviorpublic void setEnable(boolean state)
public void setViewingPlatform(ViewingPlatform vp)
setViewingPlatform
in class ViewPlatformBehavior
vp
- the target ViewingPlatform for this behaviorpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener