visad
Interface KeyboardBehavior
-
- All Known Implementing Classes:
- CBMKeyboardBehaviorJ3D, KeyboardBehaviorJ2D, KeyboardBehaviorJ3D
public interface KeyboardBehavior
-
-
Field Summary
Fields Modifier and Type Field and Description static intNO_MASKMask to indicate there are no modifiers for this key.static intRESETIdentifier for function to reset the display to the original projection or last saved projectionstatic intTRANSLATE_DOWNIdentifier for function to translate the display downwardsstatic intTRANSLATE_LEFTIdentifier for function to translate the display to the leftstatic intTRANSLATE_RIGHTIdentifier for function to translate the display to the rightstatic intTRANSLATE_UPIdentifier for function to translate the display upwardsstatic intZOOM_INIdentifier for function to zoom in the displaystatic intZOOM_OUTIdentifier for function to zoom out the display
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidexecFunction(int function)Executes the given function.voidmapKeyToFunction(int function, int keycode, int modifiers)Maps key represented by keycode & modifiers to the given function.voidprocessKeyEvent(java.awt.event.KeyEvent event)Process a key event.
-
-
-
Field Detail
-
TRANSLATE_UP
static final int TRANSLATE_UP
Identifier for function to translate the display upwards- See Also:
- Constant Field Values
-
TRANSLATE_DOWN
static final int TRANSLATE_DOWN
Identifier for function to translate the display downwards- See Also:
- Constant Field Values
-
TRANSLATE_LEFT
static final int TRANSLATE_LEFT
Identifier for function to translate the display to the left- See Also:
- Constant Field Values
-
TRANSLATE_RIGHT
static final int TRANSLATE_RIGHT
Identifier for function to translate the display to the right- See Also:
- Constant Field Values
-
ZOOM_IN
static final int ZOOM_IN
Identifier for function to zoom in the display- See Also:
- Constant Field Values
-
ZOOM_OUT
static final int ZOOM_OUT
Identifier for function to zoom out the display- See Also:
- Constant Field Values
-
RESET
static final int RESET
Identifier for function to reset the display to the original projection or last saved projection
-
NO_MASK
static final int NO_MASK
Mask to indicate there are no modifiers for this key.
-
-
Method Detail
-
mapKeyToFunction
void mapKeyToFunction(int function, int keycode, int modifiers)Maps key represented by keycode & modifiers to the given function. Each function can only have one key/modifier combination assigned to it at a time.- Parameters:
function- keyboard function (TRANSLATE_UP, ZOOM_IN, etc)keycode-KeyEventvirtual keycodesmodifiers-InputEventkey mask- See Also:
KeyEvent,InputEvent
-
processKeyEvent
void processKeyEvent(java.awt.event.KeyEvent event)
Process a key event. Determines whether a meaningful key was pressed. place.- Parameters:
event- KeyEvent stimulus
-
execFunction
void execFunction(int function)
Executes the given function.- Parameters:
function- function to perform (TRANSLATE_UP, ZOOM_IN, etc)
-
-
DMelt 3.0 © DataMelt by jWork.ORG