public class IME extends Widget
IMPORTANT: This class is not intended to be subclassed.
Modifier and Type | Field and Description |
---|---|
(package private) int |
caretOffset |
(package private) static byte[] |
CLSID_TF_InputProcessorProfiles |
(package private) int |
commitCount |
(package private) static byte[] |
GUID_TFCAT_TIP_KEYBOARD |
(package private) static byte[] |
IID_ITfDisplayAttributeProvider |
(package private) static byte[] |
IID_ITfInputProcessorProfiles |
(package private) Canvas |
parent |
(package private) int[] |
ranges |
(package private) int |
startOffset |
(package private) TextStyle[] |
styles |
(package private) java.lang.String |
text |
(package private) static int |
UNDERLINE_IME_DASH |
(package private) static int |
UNDERLINE_IME_DOT |
(package private) static int |
UNDERLINE_IME_THICK |
(package private) static int |
WM_MSIME_MOUSE |
CANVAS, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, display, DISPOSE_SENT, DISPOSED, DRAG_DETECT, DRAW_BACKGROUND, eventTable, FOREIGN_HANDLE, HIDDEN, IGNORE_WM_CHANGEUISTATE, KEYED_DATA, LAYOUT_CHANGED, LAYOUT_CHILD, LAYOUT_NEEDED, MAJOR, MINOR, MOVE_DEFERRED, MOVE_OCCURRED, PARENT_BACKGROUND, RELEASED, RESIZE_DEFERRED, RESIZE_OCCURRED, SKIN_NEEDED, state, style, THEME_BACKGROUND, TRACK_MOUSE
Constructor and Description |
---|
IME()
Prevents uninitialized instances from being created outside the package.
|
IME(Canvas parent,
int style)
Constructs a new instance of this class given its parent
and a style value describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
createWidget() |
int |
getCaretOffset()
Returns the offset of the caret from the start of the document.
|
int |
getCommitCount()
Returns the commit count of the composition.
|
int |
getCompositionOffset()
Returns the offset of the composition from the start of the document.
|
(package private) TF_DISPLAYATTRIBUTE |
getDisplayAttribute(short langid,
int attInfo) |
int[] |
getRanges()
Returns the ranges for the style that should be applied during the
in-line edit session.
|
TextStyle[] |
getStyles()
Returns the styles for the ranges.
|
java.lang.String |
getText()
Returns the composition text.
|
boolean |
getWideCaret()
Returns
true if the caret should be wide, and
false otherwise. |
(package private) boolean |
isInlineEnabled() |
(package private) void |
releaseParent() |
(package private) void |
releaseWidget() |
void |
setCompositionOffset(int offset)
Sets the offset of the composition from the start of the document.
|
(package private) LRESULT |
WM_IME_COMPOSITION_START(int wParam,
int lParam) |
(package private) LRESULT |
WM_IME_COMPOSITION(int wParam,
int lParam) |
(package private) LRESULT |
WM_IME_ENDCOMPOSITION(int wParam,
int lParam) |
(package private) LRESULT |
WM_KILLFOCUS(int wParam,
int lParam) |
(package private) LRESULT |
WM_LBUTTONDOWN(int wParam,
int lParam) |
_addListener, addDisposeListener, addListener, callWindowProc, checkBits, checkOpened, checkOrientation, checkParent, checkSubclass, checkWidget, DeferWindowPos, destroyWidget, dispose, dragDetect, error, filters, findItem, fixMnemonic, fixMnemonic, getData, getData, getDisplay, getListeners, getMenu, getName, getNameText, getStyle, hooks, isDisposed, isListening, isValidSubclass, isValidThread, mapEvent, new_GC, notifyListeners, postEvent, postEvent, release, releaseChildren, releaseHandle, removeDisposeListener, removeListener, removeListener, reskin, reskinChildren, reskinWidget, sendDragEvent, sendDragEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendFocusEvent, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, sendMouseWheelEvent, sendSelectionEvent, sendSelectionEvent, setData, setData, setInputState, setKeyState, setLocationMask, setTabGroupFocus, setTabItemFocus, SetWindowPos, showMenu, showMenu, toString, updateMenuLocation, wmCaptureChanged, wmChar, wmContextMenu, wmIMEChar, wmKeyDown, wmKeyUp, wmKillFocus, wmLButtonDblClk, wmLButtonDown, wmLButtonUp, wmMButtonDblClk, wmMButtonDown, wmMButtonUp, wmMouseHover, wmMouseHWheel, wmMouseLeave, wmMouseMove, wmMouseWheel, wmNCPaint, wmPaint, wmPrint, wmRButtonDblClk, wmRButtonDown, wmRButtonUp, wmSetFocus, wmSysChar, wmSysKeyDown, wmSysKeyUp, wmXButtonDblClk, wmXButtonDown, wmXButtonUp
Canvas parent
int caretOffset
int startOffset
int commitCount
java.lang.String text
int[] ranges
TextStyle[] styles
static final int WM_MSIME_MOUSE
static final byte[] IID_ITfInputProcessorProfiles
static final byte[] IID_ITfDisplayAttributeProvider
static final byte[] CLSID_TF_InputProcessorProfiles
static final byte[] GUID_TFCAT_TIP_KEYBOARD
static final int UNDERLINE_IME_DOT
static final int UNDERLINE_IME_DASH
static final int UNDERLINE_IME_THICK
IME()
public IME(Canvas parent, int style)
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a canvas control which will be the parent of the new instance (cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- SWTException
- Widget.checkSubclass()
,
Widget.getStyle()
void createWidget()
public int getCaretOffset()
SWTException
- public int getCommitCount()
SWTException
- getText()
public int getCompositionOffset()
SWTException
- TF_DISPLAYATTRIBUTE getDisplayAttribute(short langid, int attInfo)
public int[] getRanges()
The ranges array contains start and end pairs. Each pair refers to
the corresponding style in the styles array. For example, the pair
that starts at ranges[n] and ends at ranges[n+1] uses the style
at styles[n/2] returned by getStyles()
.
SWTException
- getStyles()
public TextStyle[] getStyles()
The ranges array contains start and end pairs. Each pair refers to the corresponding style in the styles array. For example, the pair that starts at ranges[n] and ends at ranges[n+1] uses the style at styles[n/2].
SWTException
- getRanges()
public java.lang.String getText()
The text for an IME is the characters in the widget that are in the current composition. When the commit count is equal to the length of the composition text, then the in-line edit operation is complete.
SWTException
- public boolean getWideCaret()
true
if the caret should be wide, and
false
otherwise. In some languages, for example
Korean, the caret is typically widened to the width of the
current character in the in-line edit session.SWTException
- boolean isInlineEnabled()
void releaseParent()
releaseParent
in class Widget
void releaseWidget()
releaseWidget
in class Widget
public void setCompositionOffset(int offset)
offset
- the offset of the compositionSWTException
- LRESULT WM_IME_COMPOSITION(int wParam, int lParam)
LRESULT WM_IME_COMPOSITION_START(int wParam, int lParam)
LRESULT WM_IME_ENDCOMPOSITION(int wParam, int lParam)
LRESULT WM_KILLFOCUS(int wParam, int lParam)
LRESULT WM_LBUTTONDOWN(int wParam, int lParam)