Class UIComboBox

All Implemented Interfaces:
UIKeyHandler, Hintable, Savable

public class UIComboBox extends UIPanel
A UI component that contains several possible choices, but shows only the currently selected one. Changing the selection is allowed via a popup menu shown when the component is clicked on.
  • Field Details

    • _model

      protected ComboBoxModel _model
    • _valueLabel

      protected UILabel _valueLabel
    • _openButton

      protected UIButton _openButton
    • _valuesMenu

      protected UIPopupMenu _valuesMenu
    • _selectedIndex

      protected int _selectedIndex
  • Constructor Details

    • UIComboBox

      public UIComboBox()
    • UIComboBox

      public UIComboBox(ComboBoxModel model)
  • Method Details

    • clearOver

      protected void clearOver()
    • getSelectedIndex

      public int getSelectedIndex()
    • getSelectedValue

      public Object getSelectedValue()
    • setSelectedIndex

      public void setSelectedIndex(int index)
    • setSelectedIndex

      public void setSelectedIndex(int index, boolean fireEvent)
    • fireSelectionEvent

      protected void fireSelectionEvent()
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class UIComponent
      Parameters:
      enabled - true if this component should be considered "enabled"... a concept that is interpreted by each individual component type.
    • getTooltipText

      public String getTooltipText()
      Overrides:
      getTooltipText in class UIComponent
      Returns:
      this component's tooltip text. If none has been set, we will ask our parent component and so on. returns null if no tooltips are found.
    • getValueLabel

      public UILabel getValueLabel()
    • getModel

      public ComboBoxModel getModel()
    • getOpenButton

      public UIButton getOpenButton()
    • getValuesMenu

      public UIPopupMenu getValuesMenu()
    • addSelectionListener

      public void addSelectionListener(SelectionListener<UIComboBox> listener)
    • removeSelectionListener

      public void removeSelectionListener(SelectionListener<UIComboBox> listener)
    • clearSelectionListeners

      public void clearSelectionListeners()
    • setItemSkinCallback

      public void setItemSkinCallback(SkinningTask callback)
    • getItemSkinCallback

      public SkinningTask getItemSkinCallback()