org.gnu.gtk
public class Entry extends Widget implements Editable
Constructor Summary | |
---|---|
Entry()
Creates a new Entry widget. | |
Entry(Handle handle) |
Method Summary | |
---|---|
void | addListener(EntryListener listener)
Register an object to handle spin events.
|
void | copyClipboard() |
void | cutClipboard() |
void | deleteSelection() |
void | deleteText(int start, int end) |
float | getAlignment()
Gets the value set by Entry. |
String | getCharacters(int start, int end) |
EntryCompletion | getCompletion() |
int | getCursorPosition() |
boolean | getEditable() |
static Entry | getEntry(Handle handle)
Internal static factory method to be used by Java-Gnome only. |
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
boolean | getHasFrame()
Gets the value set by Entry. |
Layout | getLayout()
Gets the Layout used to display the entry. |
Point | getLayoutOffsets()
Obtains the position of the Layout used to render text in the entry, in
widget coordinates. |
int | getMaxLength()
Returns the maximum length of the contents of the widget. |
String | getText()
Retrieve the contents of the entry widget.
|
static Type | getType()
Retrieve the runtime type used by the GLib library. |
boolean | getVisible()
Retrieves whether the contents of the entry are visible or not. |
int | getWidth()
Gets the value set by Entry.
|
void | handleToggleOverwrite() |
int | insertText(String text, int offset) |
int | layoutIndexToTextIndex(int layoutIndex)
Converts from a position in the entry contents (returned by
Entry) to a position in the entry's PangoLayout (returned by Entry, with
text retrieved via Layout). |
void | pasteClipboard() |
void | removeListener(EntryListener listener)
Removes a listener
|
void | selectRegion(int start, int end)
Methods from Editable
|
void | setActivateDefaultWidget(boolean setting)
If setting is TRUE, pressing Enter in the entry will activate the default
widget for the window containing the entry. |
void | setAlignment(float xalign)
Sets the alignment for the contents of the entry. |
void | setCompletion(EntryCompletion completion) |
void | setCursorPosition(int position) |
void | setEditable(boolean isEditable) |
void | setHasFrame(boolean setting)
Sets whether the entry has a beveled frame around it. |
void | setInvisibleChar(char character)
Sets the character to use in place of the actual text when setVisibility
has been called to set text visibility to FALSE (ie this is the character
used in "password mode" to show the user how many characters have been
typed). |
void | setMaxLength(int max)
Sets the maximum allowed length of the contents of the widget. |
void | setText(String text)
Sets the text in the widget to the given value, replacing the current
contents.
|
void | setVisible(boolean visible)
Sets whether the contents of the entry are visible or not. |
void | setWidth(int number)
Changes the size request of the entry to be about the right size for
number characters. |
int | textIndexToLayoutIndex(int textIndex)
Converts from a position in the entry's
PangoLayout (returned by Entry) to a position in the entry
contents (returned by Entry). |
See Also: EntryListener
Returns: The PangoLayout for this entry
Returns: A Point identifying the x and y offset of the layout.
Returns: the text of the widget
Returns: Number of chars to request space for, or negative if unset.
PangoLayout
(returned by Entry, with
text retrieved via Layout).See Also: addListener
Parameters: setting TRUE to activate window's default widget on Enter keypress
Parameters: xalign The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.
Parameters: max The maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.
Parameters: text The new text.
The default invisible char is the asterisk '*', but it can be changed with setInvisibleChar().
Parameters: number Width in Characters
PangoLayout
(returned by Entry) to a position in the entry
contents (returned by Entry).