Module is.codion.swing.common.ui
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.
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
COMPONENT_VALUE, TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ItemComboBoxBuilder<T>
builder
(FilterComboBoxModel<Item<T>> comboBoxModel) static <T> ItemComboBoxBuilder<T>
builder
(FilterComboBoxModel<Item<T>> comboBoxModel, Value<T> linkedValue) static <T> ItemComboBoxBuilder<T>
static <T> ItemComboBoxBuilder<T>
comparator
(Comparator<Item<T>> comparator) completionMode
(Completion.Mode completionMode) editor
(ComboBoxEditor editor) itemListener
(ItemListener itemListener) maximumRowCount
(int maximumRowCount) mouseWheelScrolling
(boolean mouseWheelScrolling) Enable mouse wheel scrolling on the combo boxmouseWheelScrollingWithWrapAround
(boolean mouseWheelScrollingWithWrapAround) Enable mouse wheel scrolling on the combo box, with wrap aroundnullable
(boolean nullable) popupWidth
(int popupWidth) Only used for the system and cross-platform Look and Feels.renderer
(ListCellRenderer<Item<T>> renderer) sorted
(boolean sorted) Sorts the items by caption, false by defaultMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, buildValue, buildValue, clientProperty, componentListener, componentOrientation, consumer, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, keyEvent, keyListener, label, link, link, listener, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onBuildValue, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, value, visible
-
Method Details
-
nullable
- Parameters:
nullable
- true if a null value should be added to the model if missing- Returns:
- this builder instance
-
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
- Parameters:
comparator
- if specified the combo box items are sorted using this comparator- Returns:
- this builder instance
-
completionMode
- Parameters:
completionMode
- the completion mode- Returns:
- this builder instance
-
mouseWheelScrolling
Enable mouse wheel scrolling on the combo box- Parameters:
mouseWheelScrolling
- true if mouse wheel scrolling should be enabled- Returns:
- this builder instance
-
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
- Parameters:
maximumRowCount
- the maximum row count- Returns:
- this builder instance
-
popupWidth
Only used for the system and cross-platform Look and Feels.- Parameters:
popupWidth
- a fixed popup width- Returns:
- this builder instance
-
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
- Parameters:
itemListener
- the item listener- Returns:
- this builder instance
- See Also:
-
builder
- 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 modellinkedValue
- the value to link to the component- Returns:
- a builder for a component
-
builder
- Type Parameters:
T
- the value type- Parameters:
values
- the values- Returns:
- a builder for a component
-
builder
- Type Parameters:
T
- the value type- Parameters:
values
- the valueslinkedValue
- the value to link to the component- Returns:
- a builder for a component
-