src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java

Print this page

        

*** 104,122 **** // implements java.awt.im.spi.InputMethodContext.dispatchInputMethodEvent public void dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) { // We need to record the client component as the source so // that we have correct information if we later have to break up this // 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 { getCompositionAreaHandler(true).processInputMethodEvent(event); --- 104,131 ---- // implements java.awt.im.spi.InputMethodContext.dispatchInputMethodEvent public void dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) { + dispatchInputMethodEvent(id, text, committedCharacterCount, caret, + visiblePosition, -1, -1); + } + + // implements java.awt.im.spi.InputMethodContext.dispatchInputMethodEvent + public void dispatchInputMethodEvent(int id, + AttributedCharacterIterator text, int committedCharacterCount, + TextHitInfo caret, TextHitInfo visiblePosition, int start, int end) { // We need to record the client component as the source so // that we have correct information if we later have to break up this // event into key events. Component source; source = getClientComponent(); if (source != null) { InputMethodEvent event = new InputMethodEvent(source, ! id, text, committedCharacterCount, caret, visiblePosition, ! start, end); if (haveActiveClient() && !useBelowTheSpotInput()) { source.dispatchEvent(event); } else { getCompositionAreaHandler(true).processInputMethodEvent(event);