public class DefaultInputHandler extends InputHandler
bindings, currentBindings, keyEventInterceptor, lastAction, lastActionCount, PREFIX_STR, readNextChar, REPEAT_COUNT_THRESHOLD, repeatCount, shortcutOnview| Constructor | Description |
|---|---|
DefaultInputHandler(View view) |
Creates a new input handler with no key bindings defined.
|
DefaultInputHandler(View view,
java.util.Hashtable bindings) |
Creates a new input handler with no key bindings defined.
|
DefaultInputHandler(View view,
DefaultInputHandler copy) |
Creates a new input handler with the same set of key bindings
as the one specified.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
getModifierString(java.awt.event.InputEvent evt) |
Returns a string containing symbolic modifier names set in the
specified event.
|
static char |
getSymbolicModifierName(int mod) |
Returns a the symbolic modifier name for the specified Java modifier
flag.
|
boolean |
handleKey(KeyEventTranslator.Key keyStroke,
boolean dryRun) |
Handles the given keystroke.
|
boolean |
isPrefixActive() |
Returns if a prefix key has been pressed.
|
void |
setCurrentBindings(java.util.Hashtable bindings) |
addKeyBinding, addKeyBinding, addKeyBinding, getKeyBinding, getKeyEventInterceptor, getLastActionCount, processKeyEventKeyStrokeHandling, removeAllKeyBindings, removeKeyBinding, resetLastActionCount, sendShortcutPrefixOff, setBindings, setKeyEventInterceptor, toStringgetLastAction, getRepeatCount, handleKey, invokeAction, invokeAction, invokeLastAction, invokeReadNextChar, processKeyEvent, readNextChar, setRepeatCount, userInputpublic DefaultInputHandler(View view, java.util.Hashtable bindings)
view - The viewbindings - An explicitly-specified set of key bindings,
must not be null.public DefaultInputHandler(View view)
view - The viewpublic DefaultInputHandler(View view, DefaultInputHandler copy)
copy - The input handler to copy key bindings fromview - The viewpublic boolean isPrefixActive()
isPrefixActive in class AbstractInputHandler<EditAction>public void setCurrentBindings(java.util.Hashtable bindings)
setCurrentBindings in class AbstractInputHandler<EditAction>public boolean handleKey(KeyEventTranslator.Key keyStroke, boolean dryRun)
handleKey in class AbstractInputHandler<EditAction>keyStroke - The key strokedryRun - only calculate the return value, do not have any other effectpublic static char getSymbolicModifierName(int mod)
mod - A modifier constant from InputEventpublic static java.lang.String getModifierString(java.awt.event.InputEvent evt)
evt - The event