Package io.jmix.ui.component
Interface ValuePicker<V>
- All Superinterfaces:
ActionsHolder
,Buffered
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Field<V>
,HasContextHelp
,HasFormatter<V>
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInputPrompt
,HasSubParts
,HasValidator<V>
,HasValue<V>
,HasValueSource<V>
,Requirable
,SupportsUserAction<V>
,Validatable
- All Known Subinterfaces:
EntityComboBox<V>
,EntityPicker<V>
,EntitySuggestionField<V>
,TagPicker<V>
,ValuesPicker<V>
- All Known Implementing Classes:
EntityComboBoxImpl
,EntityPickerImpl
,EntitySuggestionFieldImpl
,SearchFieldImpl
,TagPickerImpl
,ValuePickerImpl
,ValuesPickerImpl
@StudioComponent(caption="ValuePicker",
category="Components",
xmlElement="valuePicker",
icon="io/jmix/ui/icon/component/valuePicker.svg",
canvasBehaviour=VALUE_PICKER,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/value-picker.html")
public interface ValuePicker<V>
extends Field<V>, HasFormatter<V>, ActionsHolder, Buffered, Component.Focusable, SupportsUserAction<V>, HasInputPrompt
Generic UI component designed to select and display a value of any type.
Consists of the text field and the set of buttons defined by actions.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
The event that is fired when a user inputs value manually.static interface
Interface to be implemented by actions intended to be used by ValuePicker.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final org.springframework.core.ParameterizedTypeReference<ValuePicker<String>>
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that will be fired in case field is editable.boolean
static <T> org.springframework.core.ParameterizedTypeReference<ValuePicker<T>>
void
setFieldEditable
(boolean editable) Sets whether a user can input the value manually.void
setFieldIconProvider
(Function<? super V, String> iconProvider) Sets a function that provides an icon for the field.Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
Methods inherited from interface io.jmix.ui.component.Buffered
commit, discard, isBuffered, isModified, setBuffered
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasFormatter
getFormatter, setFormatter
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasInputPrompt
getInputPrompt, setInputPrompt
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.SupportsUserAction
setValueFromUser
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
NAME
- See Also:
-
TYPE_STRING
-
-
Method Details
-
of
static <T> org.springframework.core.ParameterizedTypeReference<ValuePicker<T>> of(Class<T> valueClass) -
getFieldIconProvider
- Returns:
- an icon provider or {code null} if not set
-
setFieldIconProvider
Sets a function that provides an icon for the field.- Parameters:
iconProvider
- icon provider to set
-
isFieldEditable
boolean isFieldEditable()- Returns:
- whether a user can input the value manually
-
setFieldEditable
Sets whether a user can input the value manually.false
by default. Doesn't set entered value to the model. To handle user input, theValuePicker.FieldValueChangeEvent
listener must be used.- Parameters:
editable
-true
to enable manual input,false
otherwise- See Also:
-
addFieldValueChangeListener
Adds a listener that will be fired in case field is editable.- Parameters:
listener
- a listener to add- Returns:
- a
Subscription
object - See Also:
-