GeezerVison is showing docs.oracle.com — InputMethodHighlight (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
java.awt.im
Class InputMethodHighlight
-
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
int |
getState() |
Returns the conversion state of the text range.
|
Map<TextAttribute,?> |
getStyle() |
Returns the rendering style attributes for the text range, or null.
|
int |
getVariation() |
Returns the variation of the text range.
|
boolean |
isSelected() |
Returns whether the text range is selected.
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
InputMethodHighlight
public InputMethodHighlight(boolean selected,
int state)
Constructs an input method highlight record.
The variation is set to 0, the style to null.
- Parameters:
selected - Whether the text range is selected
state - The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
- Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
- See Also:
RAW_TEXT,
CONVERTED_TEXT
-
InputMethodHighlight
public InputMethodHighlight(boolean selected,
int state,
int variation)
Constructs an input method highlight record.
The style is set to null.
- Parameters:
selected - Whether the text range is selected
state - The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
variation - The style variation for the text range
- Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
- See Also:
RAW_TEXT,
CONVERTED_TEXT
-
InputMethodHighlight
public InputMethodHighlight(boolean selected,
int state,
int variation,
Map<TextAttribute,?> style)
Constructs an input method highlight record.
The style attributes map provided must be unmodifiable.
- Parameters:
selected - whether the text range is selected
state - the conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
variation - the variation for the text range
style - the rendering style attributes for the text range, or null
- Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
- Since:
- 1.3
- See Also:
RAW_TEXT,
CONVERTED_TEXT
-
Method Detail
-
getStyle
public Map<TextAttribute,?> getStyle()
Returns the rendering style attributes for the text range, or null.
- Since:
- 1.3
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|