public class KeyboardBehaviorJ2D extends Object implements KeyboardBehavior
Modifier and Type | Field and Description |
---|---|
static int |
ROTATE_Z_NEG
Identifier for function to rotate negatively around the Z viewing axis
(perpendicular to the screen plane)
|
static int |
ROTATE_Z_POS
Identifier for function to rotate positively around the Z viewing axis
(perpendicular to the screen plane)
|
NO_MASK, RESET, TRANSLATE_DOWN, TRANSLATE_LEFT, TRANSLATE_RIGHT, TRANSLATE_UP, ZOOM_IN, ZOOM_OUT
Constructor and Description |
---|
KeyboardBehaviorJ2D(DisplayRendererJ2D r)
Construct a new keyboard behavior for the DisplayRenderer.
|
Modifier and Type | Method and Description |
---|---|
void |
execFunction(int function)
Executes the given function.
|
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.
|
public static final int ROTATE_Z_POS
public static final int ROTATE_Z_NEG
public KeyboardBehaviorJ2D(DisplayRendererJ2D r)
r
- DisplayRenderer to use.DisplayRendererJ2D.addKeyboardBehavior(KeyboardBehaviorJ2D behavior)
public void mapKeyToFunction(int function, int keycode, int modifiers)
mapKeyToFunction
in interface KeyboardBehavior
function
- keyboard function (ROTATE_X_POS, ZOOM_IN, etc)keycode
- KeyEvent
virtual keycodesmodifiers
- InputEvent
key maskKeyEvent
,
InputEvent
public void processKeyEvent(KeyEvent event)
processKeyEvent
in interface KeyboardBehavior
event
- KeyEvent stimuluspublic void execFunction(int function)
execFunction
in interface KeyboardBehavior
function
- function to perform (TRANSLATE_UP, ZOOM_IN, etc)Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.