java-gnome version 4.0.19

org.gnome.gtk
Class ComboBoxEntry

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Object
                  extended by org.gnome.gtk.Widget
                      extended by org.gnome.gtk.Container
                          extended by org.gnome.gtk.Bin
                              extended by org.gnome.gtk.ComboBox
                                  extended by org.gnome.gtk.ComboBoxEntry
All Implemented Interfaces:
CellEditable, CellLayout
Direct Known Subclasses:
TextComboBoxEntry

public class ComboBoxEntry
extends ComboBox
implements CellEditable, CellLayout

An Entry which also offers a range of pre-configured options to choose from. It is a composite Widget with an Entry wrapped in a mechanism to activate a popup dialog allowing the user to pick from a list of options.

ComboBoxEntry is powered by the same mechanism as the parent class ComboBox; the option list is driven by a TreeModel. When constructing a ComboBoxEntry, you specify the column from the model that will supply the data to be used as the list of options.

Almost everyone dealing with ComboBoxEntries wonders how to get the text showing in the Widget. You do this by very simply getting by getting it from the Entry. Call getChild() and call that Entry's getText(); given:

 ComboBoxEntry combo;
 Entry e;
 String str;
 ...
 
you simply write:
 e = (Entry) combo.getChild();
 str = e.getText();
 
and then do something with the returned String.

Like GtkComboBox, GtkComboBoxEntry has a second text-only API that is lumped into the same classes while not being able to be used together. We have similarly spliced this functionality out of this class into our subclass TextComboBoxEntry.

Since:
4.0.6
Author:
Andrew Cowie

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
 
Nested classes/interfaces inherited from class org.gnome.gtk.Object
Object.Destroy
 
Constructor Summary
ComboBoxEntry(TreeModel model, DataColumnString column)
          Construct a new ComboBoxEntry, indicating which DataColumn in the TreeModel is to provide the list of options for the Widget to display.
 
Method Summary
 
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, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
 
Methods inherited from class org.gnome.gtk.Object
connect, destroy
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComboBoxEntry

public ComboBoxEntry(TreeModel model,
                     DataColumnString column)
Construct a new ComboBoxEntry, indicating which DataColumn in the TreeModel is to provide the list of options for the Widget to display.

Since:
4.0.6


java-gnome