InputMethodSupport

processing.app.syntax.im

## Class InputMethodSupport

- Object
- - InputMethodSupport

- All Implemented Interfaces:
    InputMethodListener, InputMethodRequests, EventListener

      public class InputMethodSupport
      extends Object
      implements InputMethodRequests, InputMethodListener

  Support in-line Japanese input for PDE. (Maybe Chinese, Korean and more) This class is implemented by Java Input Method Framework and handles If you would like to know more about Java Input Method Framework, Please see http://java.sun.com/j2se/1.5.0/docs/guide/imf/ This class is implemented to fix Bug #854. http://dev.processing.org/bugs/show_bug.cgi?id=854

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InputMethodSupport(JEditTextArea textArea)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AttributedCharacterIterator` | `cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)`
    `void` | `caretPositionChanged(InputMethodEvent event)`
    `AttributedCharacterIterator` | `getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)`
    `int` | `getCommittedTextLength()`
    `int` | `getInsertPositionOffset()`
    `TextHitInfo` | `getLocationOffset(int x, int y)`
    `AttributedCharacterIterator` | `getSelectedText(AttributedCharacterIterator.Attribute[] attributes)`
    `Rectangle` | `getTextLocation(TextHitInfo offset)`
    `void` | `inputMethodTextChanged(InputMethodEvent event)` Handles events from InputMethod.

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InputMethodSupport

          public InputMethodSupport(JEditTextArea textArea)

  - ### Method Detail

    - #### getTextLocation

          public Rectangle getTextLocation(TextHitInfo offset)

      Specified by:
        `getTextLocation` in interface `InputMethodRequests`

    - #### getLocationOffset

          public TextHitInfo getLocationOffset(int x,
                                      int y)

      Specified by:
        `getLocationOffset` in interface `InputMethodRequests`

    - #### getInsertPositionOffset

          public int getInsertPositionOffset()

      Specified by:
        `getInsertPositionOffset` in interface `InputMethodRequests`

    - #### getCommittedText

          public AttributedCharacterIterator getCommittedText(int beginIndex,
                                                     int endIndex,
                                                     AttributedCharacterIterator.Attribute[] attributes)

      Specified by:
        `getCommittedText` in interface `InputMethodRequests`

    - #### getCommittedTextLength

          public int getCommittedTextLength()

      Specified by:
        `getCommittedTextLength` in interface `InputMethodRequests`

    - #### cancelLatestCommittedText

          public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)

      Specified by:
        `cancelLatestCommittedText` in interface `InputMethodRequests`

    - #### getSelectedText

          public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)

      Specified by:
        `getSelectedText` in interface `InputMethodRequests`

    - #### inputMethodTextChanged

          public void inputMethodTextChanged(InputMethodEvent event)

      Handles events from InputMethod. This method judges whether beginning of input or progress of input or end and call related method.
      Specified by:
        `inputMethodTextChanged` in interface `InputMethodListener`
      Parameters:
        `event` - event from Input Method.

    - #### caretPositionChanged

          public void caretPositionChanged(InputMethodEvent event)

      Specified by:
        `caretPositionChanged` in interface `InputMethodListener`