Module is.codion.swing.framework.ui
Interface EntitySearchField.Builder<T,B extends EntitySearchField.Builder<T,B>>
- All Superinterfaces:
ComponentBuilder<T,
EntitySearchField, B>
- All Known Subinterfaces:
EntitySearchField.MultiSelectionBuilder
,EntitySearchField.SingleSelectionBuilder
- Enclosing class:
- EntitySearchField
public static interface EntitySearchField.Builder<T,B extends EntitySearchField.Builder<T,B>>
extends ComponentBuilder<T,EntitySearchField,B>
Builds a entity search field.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides multi or single selectionEntitySearchField.Builder.Factory
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 TypeMethodDescriptioncolumns
(int columns) confirmAdd
(boolean confirmAdd) confirmEdit
(boolean confirmEdit) editable
(boolean editable) editPanel
(Supplier<EntityEditPanel> editPanel) A edit panel is required for the add and edit controls.keyStroke
(ControlKey<?> controlKey, KeyStroke keyStroke) 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) Default ", "stringFactory
(Function<Entity, String> stringFactory) Overrides the default toString() for search elements when displayed in a field based on this modelupperCase
(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, 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
-
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
-
stringFactory
Overrides the default toString() for search elements when displayed in a field based on this model- Parameters:
stringFactory
- the function providing the toString() functionality- Returns:
- this builder
-
separator
Default ", "- Parameters:
separator
- the String used to separate multiple items- Returns:
- this builder
-
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
- Parameters:
searchIndicator
- the search indicator- Returns:
- this builder instance
-
selectorFactory
EntitySearchField.Builder<T,B> selectorFactory(Function<EntitySearchModel, EntitySearchField.Selector> selectorFactory) - Parameters:
selectorFactory
- the selector factory to use- Returns:
- this builder instance
-
editPanel
A edit panel is required for the add and edit controls.- Parameters:
editPanel
- the edit panel supplier- Returns:
- this builder instance
-
keyStroke
- Parameters:
controlKey
- the control keykeyStroke
- the keyStroke to assign to the given control- Returns:
- this builder instance
-
limit
- Parameters:
limit
- the search result limit- Returns:
- this builder instance
-
confirmAdd
- Parameters:
confirmAdd
- true if adding an item should be confirmed- Returns:
- this builder instance
- See Also:
-
confirmEdit
- Parameters:
confirmEdit
- true if editing an item should be confirmed- Returns:
- this builder instance
- See Also:
-