|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.KeyAdapter
org.gjt.sp.jedit.textarea.InputHandler
org.gjt.sp.jedit.textarea.DefaultInputHandler
The default input handler. It maps sequences of keystrokes into actions and inserts key typed events into the text area.
Nested Class Summary |
Field Summary |
Fields inherited from class org.gjt.sp.jedit.textarea.InputHandler |
BACKSPACE, BACKSPACE_WORD, DELETE, DELETE_WORD, DOCUMENT_END, DOCUMENT_HOME, END, grabAction, HOME, inputAction, INSERT_BREAK, INSERT_CHAR, INSERT_TAB, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, OVERWRITE, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, recorder, repeat, REPEAT, repeatCount, SELECT_DOC_END, SELECT_DOC_HOME, SELECT_END, SELECT_HOME, SELECT_NEXT_CHAR, SELECT_NEXT_LINE, SELECT_NEXT_PAGE, SELECT_NEXT_WORD, SELECT_PREV_CHAR, SELECT_PREV_LINE, SELECT_PREV_PAGE, SELECT_PREV_WORD, SMART_HOME_END_PROPERTY |
Constructor Summary | |
DefaultInputHandler()
Creates a new input handler with no key bindings defined. |
|
DefaultInputHandler(DefaultInputHandler copy)
Creates a new input handler with the same set of key bindings as the one specified. |
Method Summary | |
void |
addDefaultKeyBindings()
Sets up the default key bindings. |
void |
addKeyBinding(java.lang.String keyBinding,
java.awt.event.ActionListener action)
Adds a key binding to this input handler. |
void |
keyPressed(java.awt.event.KeyEvent evt)
Handle a key pressed event. |
void |
keyTyped(java.awt.event.KeyEvent evt)
Handle a key typed event. |
static javax.swing.KeyStroke |
parseKeyStroke(java.lang.String keyStroke)
Converts a string to a keystroke. |
void |
removeAllKeyBindings()
Removes all key bindings from this input handler. |
void |
removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler. |
Methods inherited from class org.gjt.sp.jedit.textarea.InputHandler |
executeAction, executeOneClickAction, getAction, getActionName, getActions, getInputAction, getMacroRecorder, getRepeatCount, getTextArea, grabNextKeyStroke, handleGrabAction, isRepeatEnabled, setInputAction, setMacroRecorder, setRepeatCount, setRepeatEnabled |
Methods inherited from class java.awt.event.KeyAdapter |
keyReleased |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultInputHandler()
public DefaultInputHandler(DefaultInputHandler copy)
copy
- The input handler to copy key bindings fromMethod Detail |
public void addDefaultKeyBindings()
addDefaultKeyBindings
in class InputHandler
public void addKeyBinding(java.lang.String keyBinding, java.awt.event.ActionListener action)
addKeyBinding
in class InputHandler
keyBinding
- The key bindingaction
- The actionpublic void removeKeyBinding(java.lang.String keyBinding)
removeKeyBinding
in class InputHandler
keyBinding
- The key bindingpublic void removeAllKeyBindings()
removeAllKeyBindings
in class InputHandler
public void keyPressed(java.awt.event.KeyEvent evt)
public void keyTyped(java.awt.event.KeyEvent evt)
public static javax.swing.KeyStroke parseKeyStroke(java.lang.String keyStroke)
KeyEvent
class, without
the VK_
prefix.
keyStroke
- A string description of the key stroke
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |