|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.InputMethod
public abstract class InputMethod
Complex input handling.
In GTK, these are GtkIMContext
objects. This class and its
concrete subclasses are presented here according to the Java naming
conventions.
Nested Class Summary | |
---|---|
static interface |
InputMethod.Commit
Signal emitted when the input method completes its composition. |
Method Summary | |
---|---|
void |
connect(InputMethod.Commit handler)
Hookup a InputMethod.Commit handler. |
boolean |
filterKeypress(EventKey event)
Find out whether the input method has handled a keystroke, or whether it needs to be further handled or propegated. |
void |
setUsePreedit(boolean setting)
How hould the InputMethod provide feedback to the user? |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void connect(InputMethod.Commit handler)
InputMethod.Commit
handler.
public boolean filterKeypress(EventKey event)
This is for use in Widget.KeyPressEvent
and
Widget.KeyReleaseEvent
handlers when hooking up an input
method to a Widget, where the code will look something like:
drawing.connect(new Widget.KeyPressEvent() { public boolean onKeyPressEvent(Widget source, EventKey event) { if (input.filterKeypress(event)) { return true; } // or carry on with your logic, if (doSomething()) { return true; } // otherwise progegate the keystroke up to the default handler return false; } });You need to do call this for both key presses and releases (at least, for the default input method to work right, anyway).
public void setUsePreedit(boolean setting)
true
, which is to ask the Widget to display in-line,
communicating the preedit string via the signal handlers. Otherwise,
the InputMethod can attempt to use some alternative (internal) means.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |