|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gjt.sp.jedit.gui.InputHandler
org.gjt.sp.jedit.gui.DefaultInputHandler
public class DefaultInputHandler
The default input handler. It maps sequences of keystrokes into actions and inserts key typed events into the text area.
| Field Summary | |
|---|---|
static java.lang.Object |
PREFIX_STR
|
protected boolean |
shortcutOn
|
| Fields inherited from class org.gjt.sp.jedit.gui.InputHandler |
|---|
lastAction, lastActionCount, readNextChar, repeatCount, view |
| Constructor Summary | |
|---|---|
DefaultInputHandler(View view)
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. |
|
DefaultInputHandler(View view,
java.util.Hashtable bindings)
Creates a new input handler with no key bindings defined. |
|
| Method Summary | |
|---|---|
void |
addKeyBinding(java.lang.String keyBinding,
EditAction action)
Adds a key binding to this input handler. |
void |
addKeyBinding(java.lang.String keyBinding,
java.lang.Object action)
Adds a key binding to this input handler. |
void |
addKeyBinding(java.lang.String keyBinding,
java.lang.String action)
Adds a key binding to this input handler. |
java.lang.Object |
getKeyBinding(java.lang.String keyBinding)
Returns either an edit action, or a hashtable if the specified key is a prefix. |
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)
Handles the given keystroke. |
boolean |
isPrefixActive()
Returns if a prefix key has been pressed. |
void |
removeAllKeyBindings()
Removes all key bindings from this input handler. |
void |
removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler. |
protected void |
sendShortcutPrefixOff()
If |
void |
setBindings(java.util.Hashtable bindings)
Replace the set of key bindings. |
void |
setCurrentBindings(java.util.Hashtable bindings)
|
| Methods inherited from class org.gjt.sp.jedit.gui.InputHandler |
|---|
getLastAction, getLastActionCount, getRepeatCount, invokeAction, invokeAction, invokeLastAction, invokeReadNextChar, readNextChar, readNextChar, resetLastActionCount, setRepeatCount, userInput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean shortcutOn
public static java.lang.Object PREFIX_STR
| Constructor Detail |
|---|
public 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 view
public DefaultInputHandler(View view,
DefaultInputHandler copy)
copy - The input handler to copy key bindings fromview - The view| Method Detail |
|---|
public void addKeyBinding(java.lang.String keyBinding,
java.lang.String action)
addKeyBinding in class InputHandlerkeyBinding - The key bindingaction - The action
public void addKeyBinding(java.lang.String keyBinding,
EditAction action)
addKeyBinding in class InputHandlerkeyBinding - The key bindingaction - The action
public void addKeyBinding(java.lang.String keyBinding,
java.lang.Object action)
keyBinding - The key bindingaction - The actionpublic void removeKeyBinding(java.lang.String keyBinding)
removeKeyBinding in class InputHandlerkeyBinding - The key bindingpublic void removeAllKeyBindings()
removeAllKeyBindings in class InputHandlerpublic java.lang.Object getKeyBinding(java.lang.String keyBinding)
keyBinding - The key bindingpublic boolean isPrefixActive()
isPrefixActive in class InputHandlerpublic void setBindings(java.util.Hashtable bindings)
public void setCurrentBindings(java.util.Hashtable bindings)
public boolean handleKey(KeyEventTranslator.Key keyStroke)
handleKey in class InputHandlerkeyStroke - The key strokeprotected void sendShortcutPrefixOff()
public static char getSymbolicModifierName(int mod)
mod - A modifier constant from InputEventpublic static java.lang.String getModifierString(java.awt.event.InputEvent evt)
evt - The event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||