Interface ItemComboBoxBuilder<T>

Type Parameters:
T - the value type
All Superinterfaces:
ComponentBuilder<T,JComboBox<Item<T>>,ItemComboBoxBuilder<T>>

public interface ItemComboBoxBuilder<T> extends ComponentBuilder<T,JComboBox<Item<T>>,ItemComboBoxBuilder<T>>
Builds a item combo box.
  • Method Details

    • nullable

      ItemComboBoxBuilder<T> nullable(boolean nullable)
      Parameters:
      nullable - true if a null value should be added to the model if missing
      Returns:
      this builder instance
    • sorted

      ItemComboBoxBuilder<T> sorted(boolean sorted)
      Sorts the items by caption, false by default
      Parameters:
      sorted - if true then the items will be sorted by caption
      Returns:
      this builder instance
    • comparator

      ItemComboBoxBuilder<T> comparator(Comparator<Item<T>> comparator)
      Parameters:
      comparator - if specified the combo box items are sorted using this comparator
      Returns:
      this builder instance
    • completionMode

      ItemComboBoxBuilder<T> completionMode(Completion.Mode completionMode)
      Parameters:
      completionMode - the completion mode
      Returns:
      this builder instance
    • normalize

      ItemComboBoxBuilder<T> normalize(boolean normalize)
      Specifies whether to normalize strings during auto completion
      Parameters:
      normalize - true if strings should be normalized during autocomplete
      Returns:
      this builder instance
      See Also:
    • mouseWheelScrolling

      ItemComboBoxBuilder<T> mouseWheelScrolling(boolean mouseWheelScrolling)
      Enable mouse wheel scrolling on the combo box
      Parameters:
      mouseWheelScrolling - true if mouse wheel scrolling should be enabled
      Returns:
      this builder instance
    • mouseWheelScrollingWithWrapAround

      ItemComboBoxBuilder<T> mouseWheelScrollingWithWrapAround(boolean mouseWheelScrollingWithWrapAround)
      Enable mouse wheel scrolling on the combo box, with wrap around
      Parameters:
      mouseWheelScrollingWithWrapAround - true if mouse wheel scrolling with wrap around should be enabled
      Returns:
      this builder instance
    • maximumRowCount

      ItemComboBoxBuilder<T> maximumRowCount(int maximumRowCount)
      Parameters:
      maximumRowCount - the maximum row count
      Returns:
      this builder instance
    • popupWidth

      ItemComboBoxBuilder<T> popupWidth(int popupWidth)
      Only used for the system and cross-platform Look and Feels.
      Parameters:
      popupWidth - a fixed popup width
      Returns:
      this builder instance
    • renderer

      ItemComboBoxBuilder<T> renderer(ListCellRenderer<Item<T>> renderer)
      Parameters:
      renderer - the renderer for the combo box
      Returns:
      this builder instance
      See Also:
    • editor

      Parameters:
      editor - the editor for the combo box
      Returns:
      this builder instance
      See Also:
    • itemListener

      ItemComboBoxBuilder<T> itemListener(ItemListener itemListener)
      Parameters:
      itemListener - the item listener
      Returns:
      this builder instance
      See Also:
    • builder

      static <T> ItemComboBoxBuilder<T> builder(FilterComboBoxModel<Item<T>> comboBoxModel)
      Type Parameters:
      T - the value type
      Parameters:
      comboBoxModel - the combo box model
      Returns:
      a builder for a component
    • builder

      static <T> ItemComboBoxBuilder<T> builder(FilterComboBoxModel<Item<T>> comboBoxModel, Value<T> linkedValue)
      Type Parameters:
      T - the value type
      Parameters:
      comboBoxModel - the combo box model
      linkedValue - the value to link to the component
      Returns:
      a builder for a component
    • builder

      static <T> ItemComboBoxBuilder<T> builder(List<Item<T>> values)
      Type Parameters:
      T - the value type
      Parameters:
      values - the values
      Returns:
      a builder for a component
    • builder

      static <T> ItemComboBoxBuilder<T> builder(List<Item<T>> values, Value<T> linkedValue)
      Type Parameters:
      T - the value type
      Parameters:
      values - the values
      linkedValue - the value to link to the component
      Returns:
      a builder for a component