src/share/classes/java/awt/event/InputMethodEvent.java

Print this page

        

*** 23,32 **** --- 23,34 ---- * questions. */ package java.awt.event; + import sun.awt.AWTAccessor; + import java.awt.AWTEvent; import java.awt.Component; import java.awt.EventQueue; import java.awt.font.TextHitInfo; import java.io.IOException;
*** 215,226 **** * @throws IllegalArgumentException if <code>source</code> is null */ public InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) { ! this(source, id, EventQueue.getMostRecentEventTime(), text, ! committedCharacterCount, caret, visiblePosition); } /** * Constructs an <code>InputMethodEvent</code> with the * specified source component, type, caret, and visiblePosition. --- 217,231 ---- * @throws IllegalArgumentException if <code>source</code> is null */ public InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) { ! this(source, id, ! AWTAccessor.getEventQueueAccessor() ! .getMostRecentEventTimeForTarget(source), ! text, committedCharacterCount, ! caret, visiblePosition); } /** * Constructs an <code>InputMethodEvent</code> with the * specified source component, type, caret, and visiblePosition.
*** 256,267 **** * <code>INPUT_METHOD_FIRST</code>..<code>INPUT_METHOD_LAST</code> * @throws IllegalArgumentException if <code>source</code> is null */ public InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition) { ! this(source, id, EventQueue.getMostRecentEventTime(), null, ! 0, caret, visiblePosition); } /** * Gets the combined committed and composed text. * Characters from index 0 to index <code>getCommittedCharacterCount() - 1</code> are committed --- 261,274 ---- * <code>INPUT_METHOD_FIRST</code>..<code>INPUT_METHOD_LAST</code> * @throws IllegalArgumentException if <code>source</code> is null */ public InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition) { ! this(source, id, ! AWTAccessor.getEventQueueAccessor() ! .getMostRecentEventTimeForTarget(source), ! null, 0, caret, visiblePosition); } /** * Gets the combined committed and composed text. * Characters from index 0 to index <code>getCommittedCharacterCount() - 1</code> are committed
*** 409,417 **** * invoking {@link java.awt.EventQueue#getMostRecentEventTime()}. */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); if (when == 0) { ! when = EventQueue.getMostRecentEventTime(); } } } --- 416,425 ---- * invoking {@link java.awt.EventQueue#getMostRecentEventTime()}. */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); if (when == 0) { ! when = AWTAccessor.getEventQueueAccessor() ! .getMostRecentEventTimeForTarget(this.source); } } }