Class TransliteratorInputMethod

  • All Implemented Interfaces:
    java.awt.im.spi.InputMethod

    public class TransliteratorInputMethod
    extends java.lang.Object
    implements java.awt.im.spi.InputMethod
    • Field Detail

      • attachedStatusWindow

        private static final boolean attachedStatusWindow
      • statusWindow

        private static java.awt.Window statusWindow
      • attachedLimits

        private static java.awt.Rectangle attachedLimits
      • choices

        private static javax.swing.JComboBox choices
      • attachedLocation

        private java.awt.Point attachedLocation
      • gid

        private static int gid
      • id

        private int id
      • imc

        java.awt.im.spi.InputMethodContext imc
      • enabled

        private boolean enabled
      • selectedIndex

        private int selectedIndex
      • desiredContext

        private int desiredContext
      • buffer

        private java.lang.StringBuffer buffer
      • TRACE_EVENT

        private static boolean TRACE_EVENT
      • TRACE_MESSAGES

        private static boolean TRACE_MESSAGES
      • TRACE_BUFFER

        private static boolean TRACE_BUFFER
    • Constructor Detail

      • TransliteratorInputMethod

        public TransliteratorInputMethod()
    • Method Detail

      • usesAttachedIME

        private static boolean usesAttachedIME()
      • dumpStatus

        public void dumpStatus​(java.lang.String msg)
      • setInputMethodContext

        public void setInputMethodContext​(java.awt.im.spi.InputMethodContext context)
        Specified by:
        setInputMethodContext in interface java.awt.im.spi.InputMethod
      • initStatusWindow

        private static void initStatusWindow​(java.awt.im.spi.InputMethodContext context)
      • statusWindowAction

        private void statusWindowAction​(java.awt.event.ActionEvent e)
      • pin

        private static void pin​(java.awt.Point p,
                                java.awt.Rectangle r)
      • notifyClientWindowChange

        public void notifyClientWindowChange​(java.awt.Rectangle location)
        Specified by:
        notifyClientWindowChange in interface java.awt.im.spi.InputMethod
      • activate

        public void activate()
        Specified by:
        activate in interface java.awt.im.spi.InputMethod
      • deactivate

        public void deactivate​(boolean isTemporary)
        Specified by:
        deactivate in interface java.awt.im.spi.InputMethod
      • hideWindows

        public void hideWindows()
        Specified by:
        hideWindows in interface java.awt.im.spi.InputMethod
      • setLocale

        public boolean setLocale​(java.util.Locale locale)
        Specified by:
        setLocale in interface java.awt.im.spi.InputMethod
      • getLocale

        public java.util.Locale getLocale()
        Specified by:
        getLocale in interface java.awt.im.spi.InputMethod
      • setCharacterSubsets

        public void setCharacterSubsets​(java.lang.Character.Subset[] subsets)
        Specified by:
        setCharacterSubsets in interface java.awt.im.spi.InputMethod
      • reconvert

        public void reconvert()
        Specified by:
        reconvert in interface java.awt.im.spi.InputMethod
      • removeNotify

        public void removeNotify()
        Specified by:
        removeNotify in interface java.awt.im.spi.InputMethod
      • endComposition

        public void endComposition()
        Specified by:
        endComposition in interface java.awt.im.spi.InputMethod
      • dispose

        public void dispose()
        Specified by:
        dispose in interface java.awt.im.spi.InputMethod
      • getControlObject

        public java.lang.Object getControlObject()
        Specified by:
        getControlObject in interface java.awt.im.spi.InputMethod
      • setCompositionEnabled

        public void setCompositionEnabled​(boolean enable)
        Specified by:
        setCompositionEnabled in interface java.awt.im.spi.InputMethod
      • isCompositionEnabled

        public boolean isCompositionEnabled()
        Specified by:
        isCompositionEnabled in interface java.awt.im.spi.InputMethod
      • eventInfo

        private java.lang.String eventInfo​(java.awt.AWTEvent event)
      • dispatchEvent

        public void dispatchEvent​(java.awt.AWTEvent event)
        Specified by:
        dispatchEvent in interface java.awt.im.spi.InputMethod
      • reset

        private void reset()
        Wipe clean
      • traceBuffer

        private void traceBuffer​(java.lang.String msg,
                                 int cc,
                                 int off)
      • update

        private void update​(boolean flush)
      • updateCaret

        private void updateCaret()
      • caretToStart

        private void caretToStart()
      • caretToLimit

        private void caretToLimit()
      • caretTowardsStart

        private boolean caretTowardsStart()
      • caretTowardsLimit

        private boolean caretTowardsLimit()
      • canBackspace

        private boolean canBackspace()
      • backspace

        private boolean backspace()
      • canDelete

        private boolean canDelete()
      • delete

        private boolean delete()
      • doDelete

        private void doDelete​(int start,
                              int limit)
      • commitAll

        private boolean commitAll()
      • clearAll

        private void clearAll()
      • insert

        private boolean insert​(char c)
      • editing

        private boolean editing()
      • handleTyped

        private boolean handleTyped​(char ch)
        The big problem is that from release to release swing changes how it handles some characters like tab and backspace. Sometimes it handles them as keyTyped events, and sometimes it handles them as keyPressed events. If you want to allow the event to go through so swing handles it, you have to allow one or the other to go through. If you don't want the event to go through so you can handle it, you have to stop the event both places.
        Returns:
        whether the character was handled
      • handlePressed

        private boolean handlePressed​(int code)
        Handle keyPressed events.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object