JIDE 3.5.15

com.jidesoft.editor.action
Class DefaultInputHandler

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by com.jidesoft.editor.action.InputHandler
          extended by com.jidesoft.editor.action.DefaultInputHandler
All Implemented Interfaces:
KeyListener, EventListener

public class DefaultInputHandler
extends InputHandler

The default input handler. It maps sequences of keystrokes into actions and inserts key typed events into the text area. Internally, it used ShortcutSchemaManager from JIDE Shortcut Editor to define all the shortcuts. By default, there are two ShortcutSchemas - one is the default one, EditorShortcutSchema; the other is MacOSXEditorShortcutSchema for Mac OSX.

Version:
$Id: DefaultInputHandler.java,v 1.2 2003/11/22 03:39:20 bradford Exp $
Author:
Slava Pestov

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.editor.action.InputHandler
InputHandler.MacroRecorder, InputHandler.NonRecordable, InputHandler.NonRepeatable, InputHandler.Wrapper
 
Field Summary
protected  ShortcutSchemaManager _shortcutSchemaManager
           
 
Fields inherited from class com.jidesoft.editor.action.InputHandler
_grabAction, _repeat, _repeatCount, ACTIONS, BACKSPACE, BACKSPACE_WORD, BLOCK_COMMENTS, CLIP_COPY, CLIP_CUT, CLIP_PASTE, CLIP_PASTE_WITH_DIALOG, COLLAPSE_ALL, COLLAPSE_FOLDING, DELETE, DELETE_LINE, DELETE_WORD, DOCUMENT_END, DOCUMENT_HOME, DUPLICATE_SELECTION, END, ESCAPE, EXPAND_ALL, EXPAND_FOLDING, FIND, FIND_NEXT, FIND_PREVIOUS, FOLD_SELECTION, GOTO_LINE, HOME, INDENT_SELECTION, INSERT_BREAK, INSERT_CHAR, JOIN_LINES, LINE_COMMENTS, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, OVERWRITE, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, QUICK_SEARCH, recorder, REDO, REPEAT, REPLACE, SELECT_ALL, 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, SELECT_TO_MATCHING_BRACKET, SELECT_WORD, SPLIT_LINE, START_NEW_LINE, TOGGLE_CASE, TOGGLE_RECT, UNDO, UNINDENT_SELECTION
 
Constructor Summary
DefaultInputHandler()
          Creates a new input handler with no key bindings defined.
 
Method Summary
 Object findAction(KeyStroke keyStroke)
          Finds the action associated with the keystroke.
 ShortcutSchemaManager getShortcutSchemaManager()
          Gets the ShortcutSchemaManager used by this DefaultInputHandler.
 void setShortcutSchemaManager(ShortcutSchemaManager shortcutSchemaManager)
          Sets the the ShortcutSchemaManager.
 
Methods inherited from class com.jidesoft.editor.action.InputHandler
addAction, addAction, executeAction, getAction, getActionName, getActions, getCodeEditor, getMacroRecorder, getRepeatCount, grabNextKeyStroke, handleGrabAction, initDefaultActions, isRepeatEnabled, keyPressed, keyTyped, modifySelectionOnPaste, removeAction, 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
 

Field Detail

_shortcutSchemaManager

protected ShortcutSchemaManager _shortcutSchemaManager
Constructor Detail

DefaultInputHandler

public DefaultInputHandler()
Creates a new input handler with no key bindings defined.

Method Detail

findAction

public Object findAction(KeyStroke keyStroke)
Finds the action associated with the keystroke.

Specified by:
findAction in class InputHandler
Parameters:
keyStroke - the keystroke
Returns:
the action associated with the keystroke.

getShortcutSchemaManager

public ShortcutSchemaManager getShortcutSchemaManager()
Gets the ShortcutSchemaManager used by this DefaultInputHandler.

Returns:
the ShortcutSchemaManager.

setShortcutSchemaManager

public void setShortcutSchemaManager(ShortcutSchemaManager shortcutSchemaManager)
Sets the the ShortcutSchemaManager.

Parameters:
shortcutSchemaManager - a new ShortcutSchemaManager.

JIDE 3.5.15