Package java.awt.event

Examples of java.awt.event.InputMethodEvent


        assertEquals(listener3, listeners[2]);
        assertEquals(3, listeners.length);
    }

    void imEventTest(final int id, final String s1, final String s2) {
        InputMethodEvent event = new InputMethodEvent(jtc, id, null, null);
        jtc.processInputMethodEvent(event);
        assertEquals(s1, strOrderProcessInputMethodEventCaret);
        assertEquals(s2, strOrderProcessInputMethodEventText);
        strOrderProcessInputMethodEventCaret = "";
        strOrderProcessInputMethodEventText = "";
View Full Code Here


                                      TextHitInfo caret,
                                      TextHitInfo visiblePosition,
                                      long when) {
        Component source = getClientComponent();
        if (source != null) {
            InputMethodEvent event = new InputMethodEvent(source,
                id, when, text, committedCharacterCount, caret, visiblePosition);
            MToolkit.postEvent(MToolkit.targetToAppContext(source), (AWTEvent)event);
        }
    }
View Full Code Here

        // event into key events.
        Component source;

        source = getClientComponent();
        if (source != null) {
            InputMethodEvent event = new InputMethodEvent(source,
                    id, text, committedCharacterCount, caret, visiblePosition);

            if (haveActiveClient() && !useBelowTheSpotInput()) {
                source.dispatchEvent(event);
            } else {
View Full Code Here

                // active client -> send text as InputMethodEvent
                int beginIndex = text.getBeginIndex();
                AttributedCharacterIterator toBeCommitted =
                    (new AttributedString(text, beginIndex, beginIndex + committedCharacterCount)).getIterator();

                InputMethodEvent inputEvent = new InputMethodEvent(
                        client,
                        InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
                        toBeCommitted,
                        committedCharacterCount,
                        null, null);
View Full Code Here

                                      TextHitInfo caret,
                                      TextHitInfo visiblePosition,
                                      long when) {
        Component source = getClientComponent();
        if (source != null) {
            InputMethodEvent event = new InputMethodEvent(source,
                id, when, text, committedCharacterCount, caret, visiblePosition);
            SunToolkit.postEvent(SunToolkit.targetToAppContext(source), (AWTEvent)event);
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.event.InputMethodEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.