Module is.codion.swing.framework.ui
Interface EntitySearchField.Builder
- All Superinterfaces:
ComponentBuilder<EntitySearchField,,EntitySearchField.Builder> ComponentValueBuilder<EntitySearchField,,Entity, EntitySearchField.Builder> Supplier<EntitySearchField>
- Enclosing class:
EntitySearchField
public static interface EntitySearchField.Builder
extends ComponentValueBuilder<EntitySearchField,Entity,EntitySearchField.Builder>
Builds an entity search field.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
COMPONENT_VALUE -
Method Summary
Modifier and TypeMethodDescriptioncolumns(int columns) confirmAdd(boolean confirmAdd) confirmEdit(boolean confirmEdit) editable(boolean editable) editPanel(Supplier<EntityEditPanel> editPanel) An edit panel is required for the add and edit controls.Overrides the default formatter for search elements when displayed in a field based on this fieldkeyStroke(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) Specifies whether a search should be performed when the field loses focus.searchProgressBarDelay(int searchProgressBarDelay) selectionToolTip(boolean selectionToolTip) Specifies whether the selected entity should be available in a tool tip, for a field too narrow to display it in full.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
ancestorListener, background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, get, hierarchyListener, keyEvent, keyListener, label, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupControl, popupControls, popupControls, popupMenu, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visibleMethods inherited from interface is.codion.swing.common.ui.component.builder.ComponentValueBuilder
buildValue, buildValue, changeConsumer, changeListener, consumer, link, link, listener, modified, modifiedIndicator, onBuildValue, valid, valid, validationIndicator, validator, value, warned, weakChangeConsumer, weakChangeListener, weakConsumer, weakListener, when, when, when, when
-
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
-
formatter
Overrides the default formatter for search elements when displayed in a field based on this field- Parameters:
formatter- the formatter- 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
-
selectionToolTip
Specifies whether the selected entity should be available in a tool tip, for a field too narrow to display it in full. Default false.- Parameters:
selectionToolTip- true if the selected entity should be available in a tool tip- Returns:
- this builder instance
-
searchOnFocusLost
Specifies whether a search should be performed when the field loses focus.
Note that the focus lost search only selects an item in case of a single result, multiple results are ignored in order to not display a result selection dialog during focus traversal.
Default true.
- 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
-
searchProgressBarDelay
- Parameters:
searchProgressBarDelay- the number of milliseconds to delay showing the search progress bar, if enabled- Returns:
- this builder instance
- See Also:
-
selector
- Parameters:
selector- the selector factory to use- Returns:
- this builder instance
-
editPanel
An 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:
-