Class SuperCheckbox
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.AbstractField<C,T>
-
- com.vaadin.flow.component.AbstractSinglePropertyField<R,T>
-
- com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox<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 regularCheckboxthat 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 onlyLabelPosition#BEFORE_*, thus allowing the label to be positioned on the other side of the actual checkbox).- Since:
- 2022-09-14
- Author:
- miki
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox
com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox.ChangeEvent<R extends com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox<R,?>>, com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox.CheckedChangeEvent<R extends com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox<R,?>>, com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox.IndeterminateChangeEvent<R extends com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox<R,?>>
-
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 Constructor Description SuperCheckbox()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisReallyEnabled()voidsetEnabled(boolean enabled)voidsetReadOnly(boolean readOnly)-
Methods inherited from class com.vaadin.flow.component.checkbox.Checkbox
getLabel, isAutofocus, isIndeterminate, setAriaLabel, setAutofocus, setIndeterminate, setLabel, setLabelAsHtml, setLabelComponent
-
Methods inherited from class com.vaadin.flow.component.checkbox.GeneratedVaadinCheckbox
addChangeListener, addCheckedChangeListener, addIndeterminateChangeListener, getNameString, isAutofocusBoolean, isDisabledBoolean, isIndeterminateBoolean, setDisabled, setName
-
Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent
-
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEquals
-
Methods 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, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut
-
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
-
Methods inherited from interface org.vaadin.miki.markers.HasLabelPositionable
getLabelPosition, setLabelPosition
-
Methods 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, setWidthFull
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValue
-
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
-
Methods inherited from interface org.vaadin.miki.markers.WithIdMixin
withId
-
Methods inherited from interface org.vaadin.miki.markers.WithLabelMixin
withLabel
-
Methods inherited from interface org.vaadin.miki.markers.WithLabelPositionableMixin
withLabelPosition
-
Methods inherited from interface org.vaadin.miki.markers.WithTooltipMixin
withTooltipText
-
Methods inherited from interface org.vaadin.miki.markers.WithValueMixin
withValue
-
-
-
-
Method Detail
-
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
-
-