|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Editable
Methods common to Widgets which allow the line of text they display to be edited.
Nested Class Summary | |
---|---|
static interface |
Editable.Changed
The signal emitted when the text in the Editable has changed. |
Method Summary | |
---|---|
void |
connect(Editable.Changed handler)
Hook up a handler for Editable.Changed signals. |
int |
getPosition()
Retrieves the current cursor position. |
int |
getSelectionBoundsEnd()
Retrieves the selection end position of the Editable. |
int |
getSelectionBoundsStart()
Retrieves the selection start position of the Editable. |
void |
selectRegion(int start,
int end)
Select a region of the text in this Editable. |
void |
setPosition(int position)
Set the position of the cursor in this Editable. |
Method Detail |
---|
void connect(Editable.Changed handler)
Editable.Changed
signals.
int getPosition()
int getSelectionBoundsEnd()
getSelectionBoundsStart()
and
getSelectionBoundsEnd()
will be identical.
int getSelectionBoundsStart()
getSelectionBoundsStart()
and
getSelectionBoundsEnd()
will be identical.
void selectRegion(int start, int end)
start
up to but not including end
will
be selected.
Calling selectRegion(0, 0)
will remove the selection
(although that will only happen if some other Widget has the focus; in
Windows where there is only one control the user can manipulate an
Entry will end up selected no matter what).
end
- If negative, then the selection will be from
start
to the end of the text in the Editable.void setPosition(int position)
position
- The value given must be less than or equal to the number of
characters currently in the Editable field. Supplying a
value of -1
will cause the cursor to move to a
position after the last character in the text.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |