public class CheckBoxGroupImpl<V> extends AbstractField<JmixCheckBoxGroup<V>,java.util.Set<V>,java.util.Collection<V>> implements CheckBoxGroup<V>, org.springframework.beans.factory.InitializingBean
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
HasOrientation.Orientation
Modifier and Type | Field and Description |
---|---|
protected IconResolver |
iconResolver |
protected io.jmix.core.MetadataTools |
metadataTools |
static com.vaadin.ui.DescriptionGenerator |
NULL_ITEM_DESCRIPTION_GENERATOR |
protected java.util.function.Function<? super V,java.lang.String> |
optionCaptionProvider |
protected java.util.function.Function<? super V,java.lang.String> |
optionDescriptionProvider |
protected java.util.function.Function<? super V,java.lang.String> |
optionIconProvider |
protected OptionsBinding<V> |
optionsBinding |
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
internalValue, uiTestIdsSupport, valueBinding
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
CheckBoxGroupImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected java.util.Collection<V> |
convertToModel(java.util.Set<V> componentRawValue) |
protected java.util.Set<V> |
convertToPresentation(java.util.Collection<V> modelValue) |
void |
focus()
Sets focus to this component
|
protected java.lang.String |
generateDefaultItemCaption(V item) |
protected java.lang.String |
generateItemCaption(V item) |
protected com.vaadin.server.Resource |
generateOptionIcon(V item) |
java.util.function.Function<? super V,java.lang.String> |
getOptionCaptionProvider() |
java.util.function.Function<? super V,java.lang.String> |
getOptionDescriptionProvider() |
java.util.function.Function<? super V,java.lang.String> |
getOptionIconProvider() |
Options<V> |
getOptions() |
HasOrientation.Orientation |
getOrientation() |
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
protected void |
initComponent(JmixCheckBoxGroup<V> component) |
boolean |
isEmpty() |
protected void |
setIconResolver(IconResolver iconResolver) |
protected void |
setItemsToPresentation(java.util.stream.Stream<V> options) |
protected void |
setMetadataTools(io.jmix.core.MetadataTools metadataTools) |
void |
setOptionCaptionProvider(java.util.function.Function<? super V,java.lang.String> optionCaptionProvider)
Sets function that provides caption for option items.
|
void |
setOptionDescriptionProvider(java.util.function.Function<? super V,java.lang.String> optionDescriptionProvider)
Sets the option description provider.
|
void |
setOptionIconProvider(java.util.function.Function<? super V,java.lang.String> optionIconProvider)
Sets a function that provides an icon for options.
|
void |
setOptions(Options<V> options)
Sets options for UI component.
|
void |
setOrientation(HasOrientation.Orientation orientation) |
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
protected void |
valueBindingConnected(ValueSource<java.util.Collection<V>> valueSource) |
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
addValueChangeListener, commit, componentValueChanged, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setOptionsEnum, setOptionsList, setOptionsMap
getValueSource, setValueSource
addValueChangeListener, clear, getEmptyValue, getValue, setValue
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
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
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
addValidator, addValidators, getValidators, removeValidator
getRequiredMessage, isRequired, setRequired, setRequiredMessage
isFocusable, setFocusable
public static final com.vaadin.ui.DescriptionGenerator NULL_ITEM_DESCRIPTION_GENERATOR
protected io.jmix.core.MetadataTools metadataTools
protected IconResolver iconResolver
protected OptionsBinding<V> optionsBinding
protected java.util.function.Function<? super V,java.lang.String> optionDescriptionProvider
protected java.util.function.Function<? super V,java.lang.String> optionCaptionProvider
protected java.util.function.Function<? super V,java.lang.String> optionIconProvider
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected void initComponent(JmixCheckBoxGroup<V> component)
@Autowired protected void setMetadataTools(io.jmix.core.MetadataTools metadataTools)
@Autowired protected void setIconResolver(IconResolver iconResolver)
@Nullable protected java.lang.String generateItemCaption(@Nullable V item)
protected java.lang.String generateDefaultItemCaption(V item)
public void focus()
Component.Focusable
focus
in interface Component.Focusable
public int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
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.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexpublic HasOrientation.Orientation getOrientation()
getOrientation
in interface HasOrientation
public void setOrientation(HasOrientation.Orientation orientation)
setOrientation
in interface HasOrientation
protected java.util.Set<V> convertToPresentation(@Nullable java.util.Collection<V> modelValue) throws ConversionException
convertToPresentation
in class AbstractValueComponent<JmixCheckBoxGroup<V>,java.util.Set<V>,java.util.Collection<V>>
ConversionException
protected java.util.Collection<V> convertToModel(@Nullable java.util.Set<V> componentRawValue) throws ConversionException
convertToModel
in class AbstractValueComponent<JmixCheckBoxGroup<V>,java.util.Set<V>,java.util.Collection<V>>
ConversionException
@Nullable public Options<V> getOptions()
getOptions
in interface OptionsField<java.util.Collection<V>,V>
public void setOptions(@Nullable Options<V> options)
OptionsField
setOptions
in interface OptionsField<java.util.Collection<V>,V>
options
- optionsListOptions
protected void valueBindingConnected(ValueSource<java.util.Collection<V>> valueSource)
valueBindingConnected
in class AbstractValueComponent<JmixCheckBoxGroup<V>,java.util.Set<V>,java.util.Collection<V>>
protected void setItemsToPresentation(java.util.stream.Stream<V> options)
public void setOptionDescriptionProvider(@Nullable java.util.function.Function<? super V,java.lang.String> optionDescriptionProvider)
HasOptionDescriptionProvider
setOptionDescriptionProvider
in interface HasOptionDescriptionProvider<V>
optionDescriptionProvider
- provider which provides descriptions for options@Nullable public java.util.function.Function<? super V,java.lang.String> getOptionDescriptionProvider()
getOptionDescriptionProvider
in interface HasOptionDescriptionProvider<V>
public void setOptionCaptionProvider(@Nullable java.util.function.Function<? super V,java.lang.String> optionCaptionProvider)
HasOptionCaptionProvider
setOptionCaptionProvider
in interface HasOptionCaptionProvider<V>
optionCaptionProvider
- caption provider for options@Nullable public java.util.function.Function<? super V,java.lang.String> getOptionCaptionProvider()
getOptionCaptionProvider
in interface HasOptionCaptionProvider<V>
public void setOptionIconProvider(@Nullable java.util.function.Function<? super V,java.lang.String> optionIconProvider)
HasOptionIconProvider
setOptionIconProvider
in interface HasOptionIconProvider<V>
optionIconProvider
- icon provider for options to set@Nullable public java.util.function.Function<? super V,java.lang.String> getOptionIconProvider()
getOptionIconProvider
in interface HasOptionIconProvider<V>
null
if not defined@Nullable protected com.vaadin.server.Resource generateOptionIcon(V item)