|
Whole document tree
java.awt.event
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
static int |
CARET_POSITION_CHANGED
The event type indicating a changed insertion point in input method text. |
static int |
INPUT_METHOD_FIRST
Marks the first integer id for the range of input method event ids. |
static int |
INPUT_METHOD_LAST
Marks the last integer id for the range of input method event ids. |
static int |
INPUT_METHOD_TEXT_CHANGED
The event type indicating changed input method text. |
| Fields inherited from class java.util.EventObject |
source |
| Constructor Summary | |
InputMethodEvent(Component source,
int id,
AttributedCharacterIterator text,
int committedCharacterCount,
TextHitInfo caret,
TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition. |
|
InputMethodEvent(Component source,
int id,
TextHitInfo caret,
TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition. |
|
| Method Summary | |
void |
consume()
Consumes this event so that it will not be processed in the default manner by the source which originated it. |
TextHitInfo |
getCaret()
Gets the caret. |
int |
getCommittedCharacterCount()
Gets the number of committed characters in the text. |
AttributedCharacterIterator |
getText()
Gets the combined committed and composed text. |
TextHitInfo |
getVisiblePosition()
Gets the position that's most important to be visible. |
boolean |
isConsumed()
Returns whether or not this event has been consumed. |
String |
paramString()
Returns a parameter string identifying this event. |
| Methods inherited from class java.awt.AWTEvent |
finalize, getID, toString |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int INPUT_METHOD_FIRST
public static final int INPUT_METHOD_TEXT_CHANGED
public static final int CARET_POSITION_CHANGED
public static final int INPUT_METHOD_LAST
| Constructor Detail |
public InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
The offsets of caret and visiblePosition are relative to the current
composed text; that is, the composed text within text
if this is an INPUT_METHOD_TEXT_CHANGED event,
the composed text within the text of the
preceding INPUT_METHOD_TEXT_CHANGED event otherwise.
source - The object where the event originated.id - The event type.text - The combined committed and composed text, committed text first.
Must be null when the event type is
CARET_POSITION_CHANGED;
may be null for INPUT_METHOD_TEXT_CHANGED if there's no committed or composed text.committedCharacterCount - The number of committed characters in the text.caret - the caret (a.k.a. insertion point).
Null if there's no caret within current composed text.visiblePosition - The position that's most important to be visible.
Null if there's no recommendation for a visible position within current composed text.IllegalArgumentException - if id is not in the range INPUT_METHOD_FIRST..INPUT_METHOD_LAST,
if id is CARET_POSITION_CHANGED and text is not null,
or if committedCharacterCount is not in the range 0..(text.getEndIndex() - text.getBeginIndex())public InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
The offsets of caret and visiblePosition are relative to the current
composed text; that is,
the composed text within the text of the
preceding INPUT_METHOD_TEXT_CHANGED event
if the event being constructed as a CARET_POSITION_CHANGED event.
For an INPUT_METHOD_TEXT_CHANGED event without text, caret
and visiblePosition must be null.
source - The object where the event originated.id - The event type.caret - the caret (a.k.a. insertion point).
Null if there's no caret within current composed text.visiblePosition - The position that's most important to be visible.
Null if there's no recommendation for a visible position within current composed text.| Method Detail |
public AttributedCharacterIterator getText()
getCommittedCharacterCount() - 1 are committed
text, the remaining characters are composed text.public int getCommittedCharacterCount()
public TextHitInfo getCaret()
The offset of the caret is relative to the current
composed text; that is, the composed text within getText()
if this is an INPUT_METHOD_TEXT_CHANGED event,
the composed text within getText() of the
preceding INPUT_METHOD_TEXT_CHANGED event otherwise.
public TextHitInfo getVisiblePosition()
The offset of the visible position is relative to the current
composed text; that is, the composed text within getText()
if this is an INPUT_METHOD_TEXT_CHANGED event,
the composed text within getText() of the
preceding INPUT_METHOD_TEXT_CHANGED event otherwise.
public void consume()
public boolean isConsumed()
isConsumed in class AWTEventconsume()public String paramString()
paramString in class AWTEvent
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.