public class KeyNavigatorBehavior extends org.jogamp.java3d.Behavior implements KeyListener
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 |
---|
KeyNavigatorBehavior(Component c,
org.jogamp.java3d.TransformGroup targetTG)
Constructs a key navigator behavior that uses AWT listeners
and behavior posts rather than WakeupOnAWTEvent.
|
KeyNavigatorBehavior(org.jogamp.java3d.TransformGroup targetTG)
Constructs a new key navigator behavior node that operates
on the specified transform group.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(Component c)
Adds this behavior as a KeyListener to the specified component.
|
void |
initialize()
Override Behavior's initialize method to setup wakeup criteria.
|
void |
keyPressed(KeyEvent evt) |
void |
keyReleased(KeyEvent evt) |
void |
keyTyped(KeyEvent evt) |
void |
processStimulus(Iterator<org.jogamp.java3d.WakeupCriterion> criteria)
Override Behavior's stimulus method to handle the event.
|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
public KeyNavigatorBehavior(org.jogamp.java3d.TransformGroup targetTG)
targetTG
- the target transform grouppublic KeyNavigatorBehavior(Component c, org.jogamp.java3d.TransformGroup targetTG)
c
- The component to add the KeyListener to.targetTG
- The target transform group.public void initialize()
initialize
in class org.jogamp.java3d.Behavior
public void processStimulus(Iterator<org.jogamp.java3d.WakeupCriterion> criteria)
processStimulus
in class org.jogamp.java3d.Behavior
public void addListener(Component c)
c
- The component to add the KeyListener to.IllegalStateException
- if the behavior was not created
as a listenerpublic void keyPressed(KeyEvent evt)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent evt)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent evt)
keyTyped
in interface KeyListener
Copyright © 2019. All rights reserved.