56 |
setText (tc.getText ()); |
setText (tc.getText ()); |
57 |
} |
} |
58 |
|
|
59 |
|
public native void connectHooks (); |
60 |
public native int getCaretPosition (); |
public native int getCaretPosition (); |
61 |
public void setCaretPosition (int pos) |
public native void setCaretPosition (int pos); |
|
{ |
|
|
set ("text_position", pos); |
|
|
} |
|
62 |
public native int getSelectionStart (); |
public native int getSelectionStart (); |
63 |
public native int getSelectionEnd (); |
public native int getSelectionEnd (); |
64 |
public native String getText (); |
public native String getText (); |
65 |
public native void select (int start, int end); |
public native void select (int start, int end); |
66 |
|
public native void setEditable (boolean state); |
|
public void setEditable (boolean state) |
|
|
{ |
|
|
set ("editable", state); |
|
|
} |
|
|
|
|
67 |
public native void setText (String text); |
public native void setText (String text); |
68 |
|
|
|
public void getArgs (Component component, GtkArgList args) |
|
|
{ |
|
|
super.getArgs (component, args); |
|
|
|
|
|
TextComponent tc = (TextComponent) component; |
|
|
|
|
|
args.add ("text_position", tc.getCaretPosition ()); |
|
|
args.add ("editable", tc.isEditable ()); |
|
|
} |
|
|
|
|
69 |
public int getIndexAtPoint(int x, int y) |
public int getIndexAtPoint(int x, int y) |
70 |
{ |
{ |
71 |
return 0; // FIXME |
return 0; // FIXME |
80 |
{ |
{ |
81 |
return filter; // FIXME |
return filter; // FIXME |
82 |
} |
} |
83 |
|
|
84 |
|
protected void postTextEvent () |
85 |
|
{ |
86 |
|
q.postEvent (new TextEvent (awtComponent, TextEvent.TEXT_VALUE_CHANGED)); |
87 |
|
} |
88 |
} |
} |