Module jEdit

Class TextAreaInputHandler


public abstract class TextAreaInputHandler extends AbstractInputHandler<JEditBeanShellAction>
This class manage the key bindings and execute the actions binded on the keyboard events for the standalone textarea.
Version:
$Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
Author:
Matthieu Casanova
  • Constructor Details

    • TextAreaInputHandler

      protected TextAreaInputHandler(TextArea textArea)
  • Method Details

    • processKeyEvent

      public void processKeyEvent(KeyEvent evt, int from, boolean global)
      Forwards key events directly to the input handler. This is slightly faster than using a KeyListener because some Swing overhead is avoided.
      Specified by:
      processKeyEvent in class AbstractInputHandler<JEditBeanShellAction>
      Parameters:
      evt - the keyboard event
      from - the source of the event. Since this is the input handler of the textarea, it should always be 1
      global - it is only true if the event comes from the DefaultKeyboardFocusManager
      Since:
      4.3pre7
    • getAction

      protected abstract JEditBeanShellAction getAction(String action)
    • invokeAction

      public void invokeAction(String action)
      Invokes the specified action, repeating and recording it as necessary.
      Specified by:
      invokeAction in class AbstractInputHandler<JEditBeanShellAction>
      Parameters:
      action - The action
      Since:
      jEdit 4.2pre1
    • invokeAction

      public void invokeAction(JEditBeanShellAction action)
      Invokes the specified action, repeating and recording it as necessary.
      Specified by:
      invokeAction in class AbstractInputHandler<JEditBeanShellAction>
      Parameters:
      action - The action
    • handleKey

      public boolean handleKey(KeyEventTranslator.Key keyStroke, boolean dryRun)
      Handles the given keystroke.
      Specified by:
      handleKey in class AbstractInputHandler<JEditBeanShellAction>
      Parameters:
      keyStroke - The key stroke
      dryRun - only calculate the return value, do not have any other effect
      Returns:
      true if the input could be handled.
      Since:
      jEdit 4.2pre5
    • userInput

      protected void userInput(char ch)
    • invokeReadNextChar

      protected void invokeReadNextChar(char ch)