Class SuperCheckbox
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<C,T>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.checkbox.Checkbox,Boolean>
com.vaadin.flow.component.checkbox.Checkbox
org.vaadin.miki.superfields.checkbox.SuperCheckbox
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.checkbox.Checkbox>,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.checkbox.Checkbox>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.checkbox.Checkbox>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.checkbox.Checkbox>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,,Boolean>, Boolean> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,,Boolean>, Boolean> com.vaadin.flow.component.shared.HasTooltip,Serializable,HasId,HasLabelPositionable,WithIdMixin<SuperCheckbox>,WithLabelMixin<SuperCheckbox>,WithLabelPositionableMixin<SuperCheckbox>,WithTooltipMixin<SuperCheckbox>,WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,Boolean>, Boolean, SuperCheckbox>
@CssImport(value="./styles/label-positions-checkbox.css",
themeFor="vaadin-checkbox")
public class SuperCheckbox
extends com.vaadin.flow.component.checkbox.Checkbox
implements WithLabelMixin<SuperCheckbox>, WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,Boolean>,Boolean,SuperCheckbox>, WithIdMixin<SuperCheckbox>, WithLabelPositionableMixin<SuperCheckbox>, WithTooltipMixin<SuperCheckbox>
A regular
Checkbox that can be made read-only (it becomes disabled when set to read-only).
While this exists mostly as a workaround for a known issue of Vaadin,
it also supports label position (though only LabelPosition#BEFORE_*, thus allowing
the label to be positioned on the other side of the actual checkbox).- Since:
- 2022-09-14
- Author:
- miki
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Field Summary
Fields inherited from interface org.vaadin.miki.markers.HasLabelPositionable
LABEL_POSITION_ATTRIBUTE, LABEL_POSITION_DETAILS_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidsetEnabled(boolean enabled) voidsetReadOnly(boolean readOnly) Methods inherited from class com.vaadin.flow.component.checkbox.Checkbox
getLabel, isAutofocus, isIndeterminate, setAriaLabel, setAutofocus, setIndeterminate, setLabel, setLabelComponentMethods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcutMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabledMethods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabelMethods inherited from interface org.vaadin.miki.markers.HasLabelPositionable
getLabelPosition, setLabelPositionMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisibleMethods inherited from interface org.vaadin.miki.markers.WithIdMixin
withIdMethods inherited from interface org.vaadin.miki.markers.WithLabelMixin
withLabelMethods inherited from interface org.vaadin.miki.markers.WithLabelPositionableMixin
withLabelPositionMethods inherited from interface org.vaadin.miki.markers.WithTooltipMixin
withTooltipTextMethods inherited from interface org.vaadin.miki.markers.WithValueMixin
withValue
-
Constructor Details
-
SuperCheckbox
public SuperCheckbox()
-
-
Method Details
-
isReallyEnabled
protected boolean isReallyEnabled() -
setReadOnly
public void setReadOnly(boolean readOnly) - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,Boolean>, Boolean> - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox,Boolean>, Boolean>
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfacecom.vaadin.flow.component.HasEnabled
-