Interface ComboBoxBuilder<T,​C extends JComboBox<T>,​B extends ComboBoxBuilder<T,​C,​B>>

    • Method Detail

      • editable

        B editable​(boolean editable)
        Parameters:
        editable - specifies whether the combo box should be editable
        Returns:
        this builder instance
      • completionMode

        B completionMode​(Completion.Mode completionMode)
        Parameters:
        completionMode - the completion mode
        Returns:
        this builder instance
      • renderer

        B renderer​(ListCellRenderer<T> renderer)
        Parameters:
        renderer - the renderer for the combo box
        Returns:
        this builder instance
      • editor

        B editor​(ComboBoxEditor editor)
        Parameters:
        editor - the editor for the combo box
        Returns:
        this builder instance
      • mouseWheelScrolling

        B 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

        B 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

        B maximumRowCount​(int maximumRowCount)
        Parameters:
        maximumRowCount - the maximum row count before a scroll bar is shown
        Returns:
        this builder instance
      • moveCaretToFrontOnSelection

        B moveCaretToFrontOnSelection​(boolean moveCaretToFrontOnSelection)
        When a JComboBox is editable, and a long item is selected, the caret is moved to the end, hiding the start of the selected item. Enabling this moves the caret to the front on selection, thereby showing the start of the selected item. Note that this only works for FilteredComboBoxModel. This is enabled by default.
        Parameters:
        moveCaretToFrontOnSelection - if true the caret is moved to the front of the editor component on selection, displaying the start of the selected item, instead of the end
        Returns:
        this builder instance
      • popupWidth

        B popupWidth​(int popupWidth)
        Only used for the system and cross-platform Look and Feels.
        Parameters:
        popupWidth - a fixed popup width
        Returns:
        this builder instance
      • itemListener

        B itemListener​(ItemListener itemListener)
        Parameters:
        itemListener - the item listener
        Returns:
        this builder instance
      • builder

        static <T,​C extends JComboBox<T>,​B extends ComboBoxBuilder<T,​C,​B>> ComboBoxBuilder<T,​C,​B> builder​(ComboBoxModel<T> comboBoxModel)
        Type Parameters:
        T - the value type
        C - the component type
        B - the builder type
        Parameters:
        comboBoxModel - the combo box model
        Returns:
        a builder for a component
      • builder

        static <T,​C extends JComboBox<T>,​B extends ComboBoxBuilder<T,​C,​B>> ComboBoxBuilder<T,​C,​B> builder​(ComboBoxModel<T> comboBoxModel,
                                                                                                                                              Value<T> linkedValue)
        Type Parameters:
        T - the value type
        C - the component type
        B - the builder type
        Parameters:
        comboBoxModel - the combo box model
        linkedValue - the value to link to the component
        Returns:
        a builder for a component