|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gtk.GtkObject | +--org.gnu.gtk.Widget | +--org.gnu.gtk.Editable
The Editable class is the base class for widgets for editing text, such as Entry. It cannot be instantiated by itself. The editable class contains functions for generically manipulating an editable widget, a large number of action events used for key bindings, and several events that an application can connect to to modify the behavior of a widget.
Method Summary | |
void |
addListener(EditableListener listener)
Register an object to handle spin events. |
void |
copyClipboard()
Causes the characters in the current selection to be copied to the clipboard. |
void |
cutClipboard()
Causes the characters in the current selection to be copied to the clipboard and then deleted from the widget. |
void |
deleteSelection()
Deletes the contents of the current selection. |
void |
deleteText(int start,
int end)
Delete a sequence of characters. |
java.lang.String |
getCharacters(int start,
int end)
Retrieve a sequence of characters. |
int |
getCursorPosition()
Retrieves the current cursor position. |
boolean |
getEditable()
Retrieves whether the text contained in the widget is editable. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
GtkEventType |
getEventType(java.lang.String signal)
|
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
int |
insertText(java.lang.String text,
int offset)
Insert text at a given point |
void |
pasteClipboard()
Causes the contents of the clipboard to be pasted into this widget at the current cursor position. |
void |
removeListener(EditableListener listener)
Removes a listener |
void |
selectRegion(int start,
int end)
Select a region of text. |
void |
setCursorPosition(int position)
Sets the cursor position |
void |
setEditable(boolean isEditable)
Determines if the user can edit the text contained in the widget. |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void selectRegion(int start, int end)
public int insertText(java.lang.String text, int offset)
text
- The text to insert.offset
- The offset into the buffer to begin the insert.
public void deleteText(int start, int end)
public java.lang.String getCharacters(int start, int end)
public void cutClipboard()
public void copyClipboard()
public void pasteClipboard()
public void deleteSelection()
public void setCursorPosition(int position)
position
- The position of the cursor. The cursor is displayed
before the character with the given (base 0) index in the widget. The
value must be less than or equal to the number of characters in the widget.public int getCursorPosition()
public void setEditable(boolean isEditable)
isEditable
- true if the user can edit the text.public boolean getEditable()
public void addListener(EditableListener listener)
EditableListener
public void removeListener(EditableListener listener)
addListener(EditableListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Widget
public GtkEventType getEventType(java.lang.String signal)
getEventType
in class Widget
public static Type getType()
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |