Module is.codion.swing.common.ui
Class DefaultComboBoxBuilder<C extends JComboBox<T>,T,B extends ComboBoxBuilder<C,T,B>>
java.lang.Object
is.codion.swing.common.ui.component.builder.AbstractComponentBuilder<C,B>
is.codion.swing.common.ui.component.builder.AbstractComponentValueBuilder<C,T,B>
is.codion.swing.common.ui.component.combobox.DefaultComboBoxBuilder<C,T,B>
- All Implemented Interfaces:
ComponentBuilder<C,,B> ComponentValueBuilder<C,,T, B> ComboBoxBuilder<C,,T, B> Supplier<C>
public class DefaultComboBoxBuilder<C extends JComboBox<T>,T,B extends ComboBoxBuilder<C,T,B>>
extends AbstractComponentValueBuilder<C,T,B>
implements ComboBoxBuilder<C,T,B>
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.swing.common.ui.component.combobox.ComboBoxBuilder
ComboBoxBuilder.ModelStep -
Field Summary
FieldsFields inherited from interface is.codion.swing.common.ui.component.combobox.ComboBoxBuilder
MOUSE_WHEEL_SCROLLINGFields inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
COMPONENT_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BcompletionMode(Completion.Mode completionMode) protected Cprotected final CCreates the component.protected final ComponentValue<C, T> createComponentValue(C component) Creates the component valuefinal Beditable(boolean editable) final Beditor(@Nullable ComboBoxEditor editor) final BitemListener(ItemListener itemListener) final BmaximumRowCount(int maximumRowCount) final BmouseWheelScrolling(boolean mouseWheelScrolling) Enable mouse wheel scrolling on the combo boxfinal BmouseWheelScrollingWithWrapAround(boolean mouseWheelScrollingWithWrapAround) Enable mouse wheel scrolling on the combo box, with wrap aroundfinal BmoveCaretToFrontOnSelection(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.final Bnormalize(boolean normalize) Specifies whether to normalize strings during auto-completionfinal BpopupWidth(int popupWidth) Only applicable for the system and cross-platform Look and Feels.final Brenderer(@Nullable ListCellRenderer<T> renderer) Methods inherited from class is.codion.swing.common.ui.component.builder.AbstractComponentValueBuilder
buildValue, buildValue, configureComponent, consumer, link, link, listener, modifiedIndicator, modifiedIndicatorFactory, onBuildValue, validator, validIndicator, validIndicator, validIndicatorFactory, valueMethods inherited from class is.codion.swing.common.ui.component.builder.AbstractComponentBuilder
background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, enableTransferFocusOnEnter, enableValidIndicator, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, keyEvent, keyListener, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, self, supportsNull, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, get, keyEvent, keyListener, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visibleMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
buildValue, buildValue, consumer, link, link, listener, modifiedIndicator, modifiedIndicatorFactory, onBuildValue, validator, validIndicator, validIndicator, validIndicatorFactory, value
-
Field Details
-
comboBoxModel
-
-
Constructor Details
-
DefaultComboBoxBuilder
-
-
Method Details
-
editable
-
completionMode
- Specified by:
completionModein interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
completionMode- the completion mode- Returns:
- this builder instance
-
normalize
Description copied from interface:ComboBoxBuilderSpecifies whether to normalize strings during auto-completion -
renderer
-
editor
-
mouseWheelScrolling
Description copied from interface:ComboBoxBuilderEnable mouse wheel scrolling on the combo box- Specified by:
mouseWheelScrollingin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
mouseWheelScrolling- true if mouse wheel scrolling should be enabled- Returns:
- this builder instance
- See Also:
-
mouseWheelScrollingWithWrapAround
Description copied from interface:ComboBoxBuilderEnable mouse wheel scrolling on the combo box, with wrap around- Specified by:
mouseWheelScrollingWithWrapAroundin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
mouseWheelScrollingWithWrapAround- true if mouse wheel scrolling with wrap around should be enabled- Returns:
- this builder instance
-
maximumRowCount
- Specified by:
maximumRowCountin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
maximumRowCount- the maximum row count before a scroll bar is shown- Returns:
- this builder instance
- See Also:
-
moveCaretToFrontOnSelection
Description copied from interface:ComboBoxBuilderWhen 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 in conjunction with aFilterComboBoxModel. This is enabled by default.- Specified by:
moveCaretToFrontOnSelectionin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - 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
Description copied from interface:ComboBoxBuilderOnly applicable for the system and cross-platform Look and Feels.- Specified by:
popupWidthin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
popupWidth- a fixed popup width- Returns:
- this builder instance
-
itemListener
- Specified by:
itemListenerin interfaceComboBoxBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
itemListener- the item listener- Returns:
- this builder instance
- See Also:
-
createComponent
Description copied from class:AbstractComponentBuilderCreates the component.- Specified by:
createComponentin classAbstractComponentBuilder<C extends JComboBox<T>,B extends ComboBoxBuilder<C, T, B>> - Returns:
- a new component instance
-
createComponentValue
Description copied from class:AbstractComponentValueBuilderCreates the component value- Specified by:
createComponentValuein classAbstractComponentValueBuilder<C extends JComboBox<T>,T, B extends ComboBoxBuilder<C, T, B>> - Parameters:
component- the component- Returns:
- a component value based on the component
-
createComboBox
-