|
|||||||||||
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 | +--org.gnu.gtk.Entry
A single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.
Constructor Summary | |
Entry()
Creates a new Entry widget. |
|
Entry(int handle)
|
Method Summary | |
void |
addListener(EntryListener listener)
Register an object to handle spin events. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
GtkEventType |
getEventType(java.lang.String signal)
|
boolean |
getHasFrame()
Gets the value set by setHasFrame(boolean) . |
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. |
java.lang.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 setWidth(int) . |
void |
removeListener(EntryListener listener)
Removes a listener |
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 |
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. |
void |
setMaxLength(int max)
Sets the maximum allowed length of the contents of the widget. |
void |
setText(java.lang.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. |
Methods inherited from class org.gnu.gtk.Editable |
addListener, copyClipboard, cutClipboard, deleteSelection, deleteText, getCharacters, getCursorPosition, getEditable, insertText, pasteClipboard, removeListener, selectRegion, setCursorPosition, setEditable |
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 |
Constructor Detail |
public Entry()
public Entry(int handle)
Method Detail |
public void setText(java.lang.String text)
text
- The new text.public java.lang.String getText()
public void setVisible(boolean visible)
The default invisible char is the asterisk '*', but it can be changed with setInvisibleChar().
public boolean getVisible()
public void setInvisibleChar(char character)
public void setMaxLength(int max)
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.public int getMaxLength()
public boolean getHasFrame()
setHasFrame(boolean)
.
public int getWidth()
setWidth(int)
.
public void setActivateDefaultWidget(boolean setting)
setting
- TRUE to activate window's default widget on Enter
keypresspublic void setHasFrame(boolean setting)
public void setWidth(int number)
number
- Width in Characterspublic Layout getLayout()
public Point getLayoutOffsets()
Point
identifying the x and y offset
of the layout.public static Type getType()
public void addListener(EntryListener listener)
EntryListener
public void removeListener(EntryListener listener)
addListener(EntryListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Editable
public GtkEventType getEventType(java.lang.String signal)
getEventType
in class Editable
|
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 |