38 |
package java.awt.im; |
package java.awt.im; |
39 |
|
|
40 |
import java.util.Map; |
import java.util.Map; |
41 |
|
import java.awt.font.TextAttribute; |
42 |
|
|
43 |
/** |
/** |
44 |
* This describes the highlight attributes of text composed in an input method. |
* This describes the highlight attributes of text composed in an input method. |
93 |
private final int variation; |
private final int variation; |
94 |
|
|
95 |
/** The unmodifiable map of rendering styles. */ |
/** The unmodifiable map of rendering styles. */ |
96 |
private final Map style; |
private final Map<TextAttribute, ?> style; |
97 |
|
|
98 |
/** |
/** |
99 |
* Create an input method highlight style, with variation 0 and null style |
* Create an input method highlight style, with variation 0 and null style |
132 |
* @since 1.3 |
* @since 1.3 |
133 |
*/ |
*/ |
134 |
public InputMethodHighlight(boolean selected, int state, int variation, |
public InputMethodHighlight(boolean selected, int state, int variation, |
135 |
Map style) |
Map<TextAttribute, ?> style) |
136 |
{ |
{ |
137 |
if (state != RAW_TEXT && state != CONVERTED_TEXT) |
if (state != RAW_TEXT && state != CONVERTED_TEXT) |
138 |
throw new IllegalArgumentException(); |
throw new IllegalArgumentException(); |
179 |
* @return the style map |
* @return the style map |
180 |
* @since 1.3 |
* @since 1.3 |
181 |
*/ |
*/ |
182 |
public Map getStyle() |
public Map<TextAttribute, ?> getStyle() |
183 |
{ |
{ |
184 |
return style; |
return style; |
185 |
} |
} |