Module is.codion.swing.framework.ui
Interface EntitySearchFieldPanel.Builder
- All Superinterfaces:
ComponentBuilder<Entity,
EntitySearchFieldPanel, EntitySearchFieldPanel.Builder>
- Enclosing class:
- EntitySearchFieldPanel
public static interface EntitySearchFieldPanel.Builder
extends ComponentBuilder<Entity,EntitySearchFieldPanel,EntitySearchFieldPanel.Builder>
A builder for a
EntitySearchFieldPanel
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
COMPONENT_VALUE, TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new component instance.buttonLocation
(String buttonLocation) Must be one ofBorderLayout.WEST
orBorderLayout.EAST
buttonsFocusable
(boolean buttonsFocusable) Default falsecolumns
(int columns) confirmAdd
(boolean confirmAdd) confirmEdit
(boolean confirmEdit) includeAddButton
(boolean includeAddButton) includeEditButton
(boolean includeEditButton) includeSearchButton
(boolean includeSearchButton) limit
(int limit) lowerCase
(boolean lowerCase) Makes the field convert all upper case input to lower casesearchHintEnabled
(boolean searchHintEnabled) searchIndicator
(EntitySearchField.SearchIndicator searchIndicator) searchOnFocusLost
(boolean searchOnFocusLost) selectAllOnFocusGained
(boolean selectAllOnFocusGained) selectorFactory
(Function<EntitySearchModel, EntitySearchField.Selector> selectorFactory) upperCase
(boolean upperCase) Makes the field convert all lower case input to upper caseMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, 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
-
includeSearchButton
- Parameters:
includeSearchButton
- true if a search button should be included- Returns:
- this builder instance
-
includeAddButton
- Parameters:
includeAddButton
- true if a 'Add' button should be included- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case no edit panel supplier is available- See Also:
-
includeEditButton
- Parameters:
includeEditButton
- true if a 'Edit' button should be included- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case no edit panel supplier is available- See Also:
-
confirmAdd
- Parameters:
confirmAdd
- true if adding an item should be confirmed- Returns:
- this builder instance
-
confirmEdit
- Parameters:
confirmEdit
- true if editing an item should be confirmed- 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
-
columns
- Parameters:
columns
- the number of colums in the text field- Returns:
- this builder instance
-
upperCase
Makes the field convert all lower case input to upper case- Parameters:
upperCase
- if true the text component convert all lower case input to upper case- Returns:
- this builder instance
-
lowerCase
Makes the field convert all upper case input to lower case- Parameters:
lowerCase
- if true the text component convert all upper case input to lower case- Returns:
- this builder instance
-
searchHintEnabled
- Parameters:
searchHintEnabled
- true if a search hint text should be visible when the field is empty and not focused- Returns:
- this builder instance
-
searchOnFocusLost
- Parameters:
searchOnFocusLost
- true if search should be performed on focus lost- Returns:
- this builder instance
-
selectAllOnFocusGained
- Parameters:
selectAllOnFocusGained
- true if the contents should be selected when the field gains focus- Returns:
- this builder instance
-
searchIndicator
- Parameters:
searchIndicator
- the search indicator- Returns:
- this builder instance
-
selectorFactory
EntitySearchFieldPanel.Builder selectorFactory(Function<EntitySearchModel, EntitySearchField.Selector> selectorFactory) - Parameters:
selectorFactory
- the selector factory to use- Returns:
- this builder instance
-
limit
- Parameters:
limit
- the search result limit- Returns:
- this builder instance
-
build
EntitySearchFieldPanel build()Description copied from interface:ComponentBuilder
Builds a new component instance.- Specified by:
build
in interfaceComponentBuilder<Entity,
EntitySearchFieldPanel, EntitySearchFieldPanel.Builder> - Returns:
- a new
EntitySearchFieldPanel
based on this builder
-