Module is.codion.swing.common.ui
Interface ListBoxBuilder<T>
- Type Parameters:
T
- the value type
- All Superinterfaces:
ComponentBuilder<Set<T>,
JComboBox<T>, ListBoxBuilder<T>>
Creates a
JComboBox
based ComponentValue
instance, represented by the items
in the combo box (as opposed to the selected item)-
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> ListBoxBuilder<T>
listBox
(ComponentValue<T, ? extends JComponent> itemValue, ValueSet<T> linkedValue) Creates aJComboBox
basedComponentValue
instance, represented by the items in the combo box (as opposed to the selected item).Methods 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, name, onBuild, onBuildValue, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, value, visible
-
Method Details
-
string
- Parameters:
string
- provides a String to display in the list for a given value, formatted or otherwise- Returns:
- this builder instance
-
listBox
static <T> ListBoxBuilder<T> listBox(ComponentValue<T, ? extends JComponent> itemValue, ValueSet<T> linkedValue) Creates aJComboBox
basedComponentValue
instance, represented by the items in the combo box (as opposed to the selected item). The provideditemValue
supplies new items to add to the combo box.KeyEvent.VK_INSERT
adds the current value whereasKeyEvent.VK_DELETE
deletes the selected item from the list.
- Type Parameters:
T
- the value type- Parameters:
itemValue
- the component value providing the items to addlinkedValue
- the value to link- Returns:
- a new
ComponentValue
-