Module is.codion.swing.framework.ui
Interface EntityComboBoxPanel.Builder
- All Superinterfaces:
ComponentBuilder<Entity,
EntityComboBoxPanel, EntityComboBoxPanel.Builder>
- Enclosing class:
- EntityComboBoxPanel
public static interface EntityComboBoxPanel.Builder
extends ComponentBuilder<Entity,EntityComboBoxPanel,EntityComboBoxPanel.Builder>
A builder for a
EntityComboBoxPanel
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionadd
(boolean add) build()
Builds and returns the component, note that subsequent calls return the same component untilComponentBuilder.clear()
has been called.buttonLocation
(String buttonLocation) Must be one ofBorderLayout.WEST
orBorderLayout.EAST
.buttonsFocusable
(boolean buttonsFocusable) Default falsecomboBoxPreferredWidth
(int comboBoxPreferredWidth) edit
(boolean edit) keyStroke
(EntityComboBoxPanel.KeyboardShortcut keyboardShortcut, KeyStroke keyStroke) Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, buildValue, clear, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, linkedValue, linkedValue, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, visible
-
Method Details
-
add
- Parameters:
add
- true if a 'Add' button should be included- Returns:
- this builder instance
-
edit
- Parameters:
edit
- true if a 'Edit' button should be included- Returns:
- this builder instance
-
buttonsFocusable
Default false- Parameters:
buttonsFocusable
- true if the buttons should be focusable- Returns:
- this builder instance
-
buttonLocation
Must be one ofBorderLayout.WEST
orBorderLayout.EAST
.- Parameters:
buttonLocation
- the button location- Returns:
- this builder instance
- Throws:
IllegalArgumentException
- in case the value is not one ofBorderLayout.WEST
orBorderLayout.EAST
-
keyStroke
EntityComboBoxPanel.Builder keyStroke(EntityComboBoxPanel.KeyboardShortcut keyboardShortcut, KeyStroke keyStroke) - Parameters:
keyboardShortcut
- the keyboard shortcut keykeyStroke
- the keyStroke to assign to the given shortcut key, null resets to the default one- Returns:
- this builder instance
-
comboBoxPreferredWidth
- Parameters:
comboBoxPreferredWidth
- the preferred combo box width- Returns:
- this builder instance
-
build
EntityComboBoxPanel build()Description copied from interface:ComponentBuilder
Builds and returns the component, note that subsequent calls return the same component untilComponentBuilder.clear()
has been called.- Specified by:
build
in interfaceComponentBuilder<Entity,
EntityComboBoxPanel, EntityComboBoxPanel.Builder> - Returns:
- a new
EntityComboBoxPanel
based on this builder
-