Module is.codion.swing.framework.ui
Interface EntitySearchFieldPanel.Builder<T,B extends EntitySearchFieldPanel.Builder<T,B>>
- All Superinterfaces:
ComponentBuilder<T,
EntitySearchFieldPanel, B>
- All Known Subinterfaces:
EntitySearchFieldPanel.MultiSelectionBuilder
,EntitySearchFieldPanel.SingleSelectionBuilder
- Enclosing class:
- EntitySearchFieldPanel
public static interface EntitySearchFieldPanel.Builder<T,B extends EntitySearchFieldPanel.Builder<T,B>>
extends ComponentBuilder<T,EntitySearchFieldPanel,B>
A builder for a
EntitySearchFieldPanel
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides multi or single selectionEntitySearchFieldPanel.Builder
instances -
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) editable
(boolean editable) 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) 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, name, 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
-
editable
- Parameters:
editable
- false if the field should not be editable- 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
-
searchIndicator
EntitySearchFieldPanel.Builder<T,B> searchIndicator(EntitySearchField.SearchIndicator searchIndicator) - Parameters:
searchIndicator
- the search indicator- Returns:
- this builder instance
-
selectorFactory
EntitySearchFieldPanel.Builder<T,B> 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<T,
EntitySearchFieldPanel, B extends EntitySearchFieldPanel.Builder<T, B>> - Returns:
- a new
EntitySearchFieldPanel
based on this builder
-