@Tag(value="vaadin-checkbox-group") @NpmPackage(value="@vaadin/vaadin-checkbox", version="20.0.0") @JsModule(value="@vaadin/vaadin-checkbox/src/vaadin-checkbox-group.js") public abstract class GeneratedVaadinCheckboxGroup<R extends GeneratedVaadinCheckboxGroup<R,T>,T> extends AbstractSinglePropertyField<R,T> implements HasStyle, HasTheme
Description copied from corresponding location in WebComponent:
 <vaadin-checkbox-group> is a Polymer element for grouping
 vaadin-checkboxes.
 
<vaadin-checkbox-group label="Preferred language of contact:"> <vaadin-checkbox value="en">English</vaadin-checkbox> <vaadin-checkbox value="fr">Français</vaadin-checkbox> <vaadin-checkbox value="de">Deutsch</vaadin-checkbox> </vaadin-checkbox-group>
The following shadow DOM parts are available for styling:
| Part name | Description | 
|---|---|
label | 
 The label element | 
group-field | 
 The element that wraps checkboxes | 
error-message | 
 The error message element | 
The following state attributes are available for styling:
| Attribute | Description | Part name | 
|---|---|---|
disabled | 
 Set when the checkbox group and its children are disabled. | :host | 
has-label | 
 Set when the element has a label | :host | 
has-value | 
 Set when the element has a value | :host | 
required | 
 Set when the element is required | :host | 
invalid | 
 Set when the element is invalid | :host | 
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
GeneratedVaadinCheckboxGroup.InvalidChangeEvent<R extends GeneratedVaadinCheckboxGroup<R,?>>  | 
AbstractField.ComponentValueChangeEvent<C extends Component,V>HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>| Constructor and Description | 
|---|
GeneratedVaadinCheckboxGroup()
Default constructor. 
 | 
GeneratedVaadinCheckboxGroup(T initialValue,
                            T defaultValue,
                            boolean acceptNullValues)
Constructs a new GeneratedVaadinCheckboxGroup component with the given
 arguments. 
 | 
GeneratedVaadinCheckboxGroup(T initialValue,
                            T defaultValue,
                            Class<P> elementPropertyType,
                            SerializableBiFunction<R,P,T> presentationToModel,
                            SerializableBiFunction<R,T,P> modelToPresentation)
Constructs a new GeneratedVaadinCheckboxGroup component with the given
 arguments. 
 | 
GeneratedVaadinCheckboxGroup(T initialValue,
                            T defaultValue,
                            Class<P> elementPropertyType,
                            SerializableBiFunction<R,P,T> presentationToModel,
                            SerializableBiFunction<R,T,P> modelToPresentation,
                            boolean isInitialValueOptional)
Constructs a new GeneratedVaadinCheckboxGroup component with the given
 arguments. 
 | 
GeneratedVaadinCheckboxGroup(T initialValue,
                            T defaultValue,
                            Class<P> elementPropertyType,
                            SerializableFunction<P,T> presentationToModel,
                            SerializableFunction<T,P> modelToPresentation)
Constructs a new GeneratedVaadinCheckboxGroup component with the given
 arguments. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected Registration | 
addInvalidChangeListener(ComponentEventListener<GeneratedVaadinCheckboxGroup.InvalidChangeEvent<R>> listener)
Adds a listener for  
invalid-changed events fired by the
 webcomponent. | 
void | 
addThemeVariants(CheckboxGroupVariant... variants)
Adds theme variants to the component. 
 | 
protected String | 
getErrorMessageString()
 Description copied from corresponding location in WebComponent: 
 | 
protected String | 
getLabelString()
 Description copied from corresponding location in WebComponent: 
 | 
protected boolean | 
isDisabledBoolean()
 Description copied from corresponding location in WebComponent: 
 | 
protected boolean | 
isInvalidBoolean()
 Description copied from corresponding location in WebComponent: 
 | 
protected boolean | 
isRequiredBoolean()
 Description copied from corresponding location in WebComponent: 
 | 
void | 
removeThemeVariants(CheckboxGroupVariant... variants)
Removes theme variants from the component. 
 | 
protected void | 
setDisabled(boolean disabled)
 Description copied from corresponding location in WebComponent: 
 | 
protected void | 
setErrorMessage(String errorMessage)
 Description copied from corresponding location in WebComponent: 
 | 
protected void | 
setInvalid(boolean invalid)
 Description copied from corresponding location in WebComponent: 
 | 
protected void | 
setLabel(String label)
 Description copied from corresponding location in WebComponent: 
 | 
protected void | 
setRequired(boolean required)
 Description copied from corresponding location in WebComponent: 
 | 
protected void | 
validate()
 Description copied from corresponding location in WebComponent: 
 | 
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNamegetElementisReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisibleclear, getOptionalValueisEnabled, setEnabledaddAttachListeneraddDetachListenerpublic GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableFunction<P,T> presentationToModel, SerializableFunction<T,P> modelToPresentation)
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that converts a string value to a model valuemodelToPresentation - a function that converts a model value to a string valuepublic GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, boolean acceptNullValues)
initialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedacceptNullValues - whether null is accepted as a model valuepublic GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableBiFunction<R,P,T> presentationToModel, SerializableBiFunction<R,T,P> modelToPresentation, boolean isInitialValueOptional)
 If isInitialValueOptional is true then the initial value
 is used only if element has no "value" property value, otherwise
 element "value" property is ignored and the initial value is set.
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that accepts this component and a property value
            and returns a model valuemodelToPresentation - a function that accepts this component and a model value and
            returns a property valueisInitialValueOptional - if isInitialValueOptional is true then the
            initial value is used only if element has no "value"
            property value, otherwise element "value" property is
            ignored and the initial value is setpublic GeneratedVaadinCheckboxGroup(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableBiFunction<R,P,T> presentationToModel, SerializableBiFunction<R,T,P> modelToPresentation)
 If isInitialValueOptional is true then the initial value
 is used only if element has no "value" property value, otherwise
 element "value" property is ignored and the initial value is set.
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that accepts this component and a property value
            and returns a model valuemodelToPresentation - a function that accepts this component and a model value and
            returns a property valuepublic GeneratedVaadinCheckboxGroup()
public void addThemeVariants(CheckboxGroupVariant... variants)
variants - theme variants to addpublic void removeThemeVariants(CheckboxGroupVariant... variants)
variants - theme variants to removeprotected boolean isDisabledBoolean()
Description copied from corresponding location in WebComponent:
The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
disabled property from the webcomponentprotected void setDisabled(boolean disabled)
Description copied from corresponding location in WebComponent:
The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled.
disabled - the boolean value to setprotected String getLabelString()
Description copied from corresponding location in WebComponent:
String used for the label element.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
label property from the webcomponentprotected void setLabel(String label)
Description copied from corresponding location in WebComponent:
String used for the label element.
label - the String value to setprotected String getErrorMessageString()
Description copied from corresponding location in WebComponent:
Error to show when the input value is invalid.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
errorMessage property from the webcomponentprotected void setErrorMessage(String errorMessage)
Description copied from corresponding location in WebComponent:
Error to show when the input value is invalid.
errorMessage - the String value to setprotected boolean isRequiredBoolean()
Description copied from corresponding location in WebComponent:
Specifies that the user must fill in a value.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
required property from the webcomponentprotected void setRequired(boolean required)
Description copied from corresponding location in WebComponent:
Specifies that the user must fill in a value.
required - the boolean value to set@Synchronize(property="invalid", value="invalid-changed") protected boolean isInvalidBoolean()
Description copied from corresponding location in WebComponent:
This property is set to true when the control value is invalid.
This property is synchronized automatically from client side when a 'invalid-changed' event happens.
invalid property from the webcomponentprotected void setInvalid(boolean invalid)
Description copied from corresponding location in WebComponent:
This property is set to true when the control value is invalid.
invalid - the boolean value to set@NotSupported protected void validate()
Description copied from corresponding location in WebComponent:
 Returns true if value is valid. <iron-form> uses this to
 check the validity or all its elements.
 
 This function is not supported by Flow because it returns a
 boolean. Functions with return types different than void are
 not supported at this moment.
protected Registration addInvalidChangeListener(ComponentEventListener<GeneratedVaadinCheckboxGroup.InvalidChangeEvent<R>> listener)
invalid-changed events fired by the
 webcomponent.listener - the listenerRegistration for removing the event listenerCopyright © 2021. All rights reserved.