|
java-gnome version 4.0.15 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Bin
org.gnome.gtk.ComboBox
org.gnome.gtk.ComboBoxEntry
org.gnome.gtk.TextComboBoxEntry
public class TextComboBoxEntry
A ComboBoxEntry with a simplified API for displaying and extracting
Strings. When dealing
with ComboBoxEntries you usually get the Entry child Widget and hook up to
its methods and signals. Our text-only variant, however, has methods
allowing you to quickly manipulate the list of options and to get the
currently selected one.
As with the parent ComboBoxEntry, if you want what is actually in the Entry, you will have to pull the Entry out to ask it.
These are indeed the same convenience methods as found in the text-only
API of GtkComboBox
, which we have split into
ComboBox
and TextComboBox
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gnome.gtk.ComboBox |
---|
ComboBox.Changed |
Nested classes/interfaces inherited from class org.gnome.gtk.Widget |
---|
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent |
Constructor Summary | |
---|---|
TextComboBoxEntry()
Construct a new text-only ComboBoxEntry. |
Method Summary | |
---|---|
void |
appendText(String text)
Append an item to the list. |
String |
getActiveText()
Returns the text of the active item. |
void |
insertText(int position,
String text)
Append an item at the supplied position. |
void |
prependText(String text)
Prepend an item to the beginning of the list. |
Methods inherited from class org.gnome.gtk.ComboBox |
---|
connect, getActive, getActiveIter, popdown, popup, setActive, setActiveIter, setModel |
Methods inherited from class org.gnome.gtk.Bin |
---|
getChild |
Methods inherited from class org.gnome.gtk.Container |
---|
add, getChildren, remove, setBorderWidth |
Methods inherited from class org.gnome.gtk.Widget |
---|
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextComboBoxEntry()
Method Detail |
---|
public void appendText(String text)
public String getActiveText()
If the TextComboBoxEntry is showing the result of the user having
selected an item from the list, or the developer has called
setActive()
, then this will be equal to the result of
calling:
e = (Entry) combo.getChild(); e.getText();but beware that if the user hasn't caused one of the existing options to be picked and has instead entered their own data, then this won't match what is in the Entry.
public void insertText(int position, String text)
public void prependText(String text)
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |