|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Leaf
javax.media.j3d.Behavior
visad.java3d.KeyboardBehaviorJ3D
public class KeyboardBehaviorJ3D
KeyboardBehaviorJ3D is the VisAD class for keyboard control of rotation, translation, and zoom of display in Java3D.
| Field Summary | |
|---|---|
static int |
ROTATE_X_NEG
Identifier for function to rotate negatively around the X viewing axis |
static int |
ROTATE_X_POS
Identifier for function to rotate positively around the X viewing axis |
static int |
ROTATE_Y_NEG
Identifier for function to rotate negatively around the Y viewing axis |
static int |
ROTATE_Y_POS
Identifier for function to rotate positively around the Y viewing axis |
static int |
ROTATE_Z_NEG
Identifier for function to rotate negatively around the Z viewing axis |
static int |
ROTATE_Z_POS
Identifier for function to rotate positively around the Z viewing axis |
protected WakeupCondition |
wakeupCondition
Condition that causes this Behavior to wake up. |
| Fields inherited from interface visad.KeyboardBehavior |
|---|
NO_MASK, RESET, TRANSLATE_DOWN, TRANSLATE_LEFT, TRANSLATE_RIGHT, TRANSLATE_UP, ZOOM_IN, ZOOM_OUT |
| Constructor Summary | |
|---|---|
KeyboardBehaviorJ3D(DisplayRendererJ3D r)
Construct a new keyboard behavior for the DisplayRenderer. |
|
KeyboardBehaviorJ3D(DisplayRendererJ3D r,
int num_functions)
|
|
| Method Summary | |
|---|---|
void |
execFunction(int function)
Executes the given function. |
void |
initialize()
Initialize this behavior. |
void |
mapKeyToFunction(int function,
int keycode,
int modifiers)
Maps key represented by keycode & modifiers to the given function. |
void |
processKeyEvent(KeyEvent event)
Process a key event. |
void |
processStimulus(Enumeration criteria)
Process a stimulus meant for this behavior. |
| Methods inherited from class javax.media.j3d.Behavior |
|---|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn |
| Methods inherited from class javax.media.j3d.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.j3d.SceneGraphObject |
|---|
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ROTATE_Z_POS
public static final int ROTATE_Z_NEG
public static final int ROTATE_X_POS
public static final int ROTATE_X_NEG
public static final int ROTATE_Y_POS
public static final int ROTATE_Y_NEG
protected WakeupCondition wakeupCondition
| Constructor Detail |
|---|
public KeyboardBehaviorJ3D(DisplayRendererJ3D r)
Rotation (3D renderer only):
r - DisplayRenderer to use.DisplayRendererJ3D.addKeyboardBehavior(KeyboardBehaviorJ3D behavior),
to
change default key to function mappings
public KeyboardBehaviorJ3D(DisplayRendererJ3D r,
int num_functions)
| Method Detail |
|---|
public void initialize()
initialize in class Behaviorpublic void processStimulus(Enumeration criteria)
processStimulus in class Behaviorcriteria - an enumeration of triggered wakeup criteria
public void mapKeyToFunction(int function,
int keycode,
int modifiers)
mapKeyToFunction in interface KeyboardBehaviorfunction - keyboard function (ROTATE_X_POS, ZOOM_IN, etc)keycode - KeyEvent virtual keycodesmodifiers - InputEvent key maskKeyEvent,
InputEventpublic void processKeyEvent(KeyEvent event)
processKeyEvent in interface KeyboardBehaviorevent - KeyEvent stimuluspublic void execFunction(int function)
execFunction in interface KeyboardBehaviorfunction - function to perform (TRANSLATE_UP, ZOOM_IN, etc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||