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
TRANSFER_FOCUS_ON_ENTER -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ListBoxBuilder<T>listBox(ComponentValue<T, ? extends JComponent> itemValue, is.codion.common.value.ValueSet<T> linkedValue) Creates aJComboBoxbasedComponentValueinstance, 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, clear, clientProperty, componentListener, componentOrientation, consumer, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, initialValue, 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, 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, is.codion.common.value.ValueSet<T> linkedValue) Creates aJComboBoxbasedComponentValueinstance, represented by the items in the combo box (as opposed to the selected item). The provideditemValuesupplies new items to add to the combo box.
KeyEvent.VK_INSERTadds the current value whereasKeyEvent.VK_DELETEdeletes 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
-