List of usage examples for java.awt.font TextAttribute INPUT_METHOD_HIGHLIGHT
TextAttribute INPUT_METHOD_HIGHLIGHT
To view the source code for java.awt.font TextAttribute INPUT_METHOD_HIGHLIGHT.
Click Source Link
From source file:CodePointInputMethod.java
/** * Send the composed text to the client. *///from w w w . ja va2s . c om private void sendComposedText() { AttributedString as = new AttributedString(buffer.toString()); as.addAttribute(TextAttribute.INPUT_METHOD_HIGHLIGHT, InputMethodHighlight.SELECTED_RAW_TEXT_HIGHLIGHT); context.dispatchInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, as.getIterator(), 0, TextHitInfo.leading(insertionPoint), null); }