Package io.jmix.ui.component.impl
Class AbstractSelectList<V,I,T extends JmixAbstractListSelect<I>>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractValueComponent<T,P,V>
io.jmix.ui.component.impl.AbstractField<T,Set<I>,V>
io.jmix.ui.component.impl.AbstractSelectList<V,I,T>
- Type Parameters:
V
- single value type or CollectionI
- item typeT
- Vaadin component type
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasValueSource<V>
,Field<V>
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasOptionCaptionProvider<I>
,HasValidator<V>
,HasValue<V>
,OptionsField<V,
,I> Requirable
,SelectList<V,
,I> Validatable
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
MultiSelectListImpl
,SingleSelectListImpl
public abstract class AbstractSelectList<V,I,T extends JmixAbstractListSelect<I>>
extends AbstractField<T,Set<I>,V>
implements SelectList<V,I>, org.springframework.beans.factory.InitializingBean
Base class for list select components.
-
Nested Class Summary
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>
Nested classes/interfaces inherited from interface io.jmix.ui.component.SelectList
SelectList.DoubleClickEvent<I>
-
Field Summary
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddDoubleClickListener
(Consumer<SelectList.DoubleClickEvent<I>> listener) Adds a listener that is fired when user double-clicks on a list item.void
protected void
componentValueChanged
(Set<I> prevComponentValue, Set<I> newComponentValue, boolean isUserOriginated) protected abstract T
void
focus()
Sets focus to this componentprotected String
generateDefaultItemCaption
(I item) protected String
generateItemCaption
(I item) protected abstract Collection<I>
int
Gets the tabulator index of theHasTabIndex
component.protected void
initComponent
(T component) protected void
onDoubleClick
(I item) protected void
setItemsToPresentation
(Stream<I> options) void
setMetadataTools
(MetadataTools metadataTools) void
setOptionCaptionProvider
(Function<? super I, String> optionCaptionProvider) Sets function that provides caption for option items.void
setOptions
(Options<I> options) Sets options for UI component.void
setTabIndex
(int tabIndex) Sets the tabulator index of theFocusable
component.protected void
valueBindingConnected
(ValueSource<V> valueSource) Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, commit, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
isFocusable, setFocusable
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.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.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.OptionsField
setOptionsEnum, setOptionsList, setOptionsMap
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
metadataTools
-
optionsBinding
-
optionCaptionProvider
-
-
Constructor Details
-
AbstractSelectList
public AbstractSelectList()
-
-
Method Details
-
setMetadataTools
-
createComponent
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
initComponent
-
setOptionCaptionProvider
Description copied from interface:HasOptionCaptionProvider
Sets function that provides caption for option items.- Specified by:
setOptionCaptionProvider
in interfaceHasOptionCaptionProvider<V>
- Parameters:
optionCaptionProvider
- caption provider for options
-
getOptionCaptionProvider
- Specified by:
getOptionCaptionProvider
in interfaceHasOptionCaptionProvider<V>
- Returns:
- caption provider for options
-
addDoubleClickListener
Description copied from interface:SelectList
Adds a listener that is fired when user double-clicks on a list item.- Specified by:
addDoubleClickListener
in interfaceSelectList<V,
I> - Parameters:
listener
- a listener to add
-
focus
public void focus()Description copied from interface:Component.Focusable
Sets focus to this component- Specified by:
focus
in interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.Focusable
Gets the tabulator index of theHasTabIndex
component.- Specified by:
getTabIndex
in interfaceComponent.Focusable
- Returns:
- tab index set for the
HasTabIndex
component
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
component. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.- Specified by:
setTabIndex
in interfaceComponent.Focusable
- Parameters:
tabIndex
- tab index
-
getOptions
- Specified by:
getOptions
in interfaceOptionsField<V,
I> - Returns:
- options object
-
setOptions
Description copied from interface:OptionsField
Sets options for UI component.- Specified by:
setOptions
in interfaceOptionsField<V,
I> - Parameters:
options
- options- See Also:
-
setItemsToPresentation
-
getCollectionValue
-
componentValueChanged
protected void componentValueChanged(Set<I> prevComponentValue, Set<I> newComponentValue, boolean isUserOriginated) - Overrides:
componentValueChanged
in classAbstractValueComponent<T extends JmixAbstractListSelect<I>,
Set<I>, V>
-
valueBindingConnected
- Overrides:
valueBindingConnected
in classAbstractValueComponent<T extends JmixAbstractListSelect<I>,
Set<I>, V>
-
generateDefaultItemCaption
-
generateItemCaption
-
onDoubleClick
-