T
- the value typeC
- the component typeB
- the builder typepublic interface ComboBoxBuilder<T,C extends JComboBox<T>,B extends ComboBoxBuilder<T,C,B>> extends ComponentBuilder<T,C,B>
JComboBox
.TRANSFER_FOCUS_ON_ENTER
Modifier and Type | Method and Description |
---|---|
static <T,C extends JComboBox<T>,B extends ComboBoxBuilder<T,C,B>> |
builder(ComboBoxModel<T> comboBoxModel) |
static <T,C extends JComboBox<T>,B extends ComboBoxBuilder<T,C,B>> |
builder(ComboBoxModel<T> comboBoxModel,
Value<T> linkedValue) |
B |
completionMode(Completion.Mode completionMode) |
B |
editable(boolean editable) |
B |
editor(ComboBoxEditor editor) |
B |
itemListener(ItemListener itemListener) |
B |
maximumRowCount(int maximumRowCount) |
B |
mouseWheelScrolling(boolean mouseWheelScrolling)
Enable mouse wheel scrolling on the combo box
|
B |
mouseWheelScrollingWithWrapAround(boolean mouseWheelScrollingWithWrapAround)
Enable mouse wheel scrolling on the combo box, with wrap around
|
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.
|
B |
popupWidth(int popupWidth)
Only used for the system and cross-platform Look and Feels.
|
B |
renderer(ListCellRenderer<T> renderer) |
background, border, build, build, buildComponentValue, clear, clientProperty, componentListener, componentOrientation, enabled, enabledState, focusable, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, linkedValue, linkedValueObserver, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator
B editable(boolean editable)
editable
- specifies whether the combo box should be editableB completionMode(Completion.Mode completionMode)
completionMode
- the completion modeB renderer(ListCellRenderer<T> renderer)
renderer
- the renderer for the combo boxB editor(ComboBoxEditor editor)
editor
- the editor for the combo boxB mouseWheelScrolling(boolean mouseWheelScrolling)
mouseWheelScrolling
- true if mouse wheel scrolling should be enabledB mouseWheelScrollingWithWrapAround(boolean mouseWheelScrollingWithWrapAround)
mouseWheelScrollingWithWrapAround
- true if mouse wheel scrolling with wrap around should be enabledB maximumRowCount(int maximumRowCount)
maximumRowCount
- the maximum row count before a scroll bar is shownB moveCaretToFrontOnSelection(boolean moveCaretToFrontOnSelection)
FilteredComboBoxModel
.
This is enabled by default.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 endB popupWidth(int popupWidth)
popupWidth
- a fixed popup widthB itemListener(ItemListener itemListener)
itemListener
- the item listenerstatic <T,C extends JComboBox<T>,B extends ComboBoxBuilder<T,C,B>> ComboBoxBuilder<T,C,B> builder(ComboBoxModel<T> comboBoxModel)
T
- the value typeC
- the component typeB
- the builder typecomboBoxModel
- the combo box modelstatic <T,C extends JComboBox<T>,B extends ComboBoxBuilder<T,C,B>> ComboBoxBuilder<T,C,B> builder(ComboBoxModel<T> comboBoxModel, Value<T> linkedValue)
T
- the value typeC
- the component typeB
- the builder typecomboBoxModel
- the combo box modellinkedValue
- the value to link to the component