public class ObservedField extends com.vaadin.flow.component.Composite<ObservedField.ObservedFieldElement> implements com.vaadin.flow.component.HasStyle, WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean,ObservedField>, WithIdMixin<ObservedField>
| Modifier and Type | Class and Description |
|---|---|
static class |
ObservedField.ObservedFieldElement
This class gives a nice tag name to
ObservedField in the browser. |
| Modifier and Type | Field and Description |
|---|---|
static String |
REQUIRED_INDICATOR_VISIBLE
Class name used when
setRequiredIndicatorVisible(boolean) is set to true. |
| Constructor and Description |
|---|
ObservedField()
Creates a field that will set its value to whether or not it is currently shown on screen.
|
ObservedField(boolean onlyToggleOnce)
Creates a field that will optionally only toggle value once, on first showing.
|
ObservedField(boolean onlyToggleOnce,
com.vaadin.flow.component.HasValue.ValueChangeListener<com.vaadin.flow.component.HasValue.ValueChangeEvent<Boolean>> listener)
Creates a field that will optionally only toggle value once, on first showing.
|
ObservedField(com.vaadin.flow.component.HasValue.ValueChangeListener<com.vaadin.flow.component.HasValue.ValueChangeEvent<Boolean>> listener)
Creates a field that will set its value to whether or not it is currently shown on screen.
|
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>> valueChangeListener) |
protected void |
fireValueChangeEvent(boolean currentValue)
Fires value change to registered listeners.
|
Boolean |
getValue() |
boolean |
isReadOnly() |
boolean |
isRequiredIndicatorVisible() |
void |
setReadOnly(boolean b) |
void |
setRequiredIndicatorVisible(boolean visible) |
void |
setValue(Boolean aBoolean) |
getChildren, getContent, getElement, initContentaddListener, fireEvent, from, get, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, 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, setClassNamewithValueclear, getEmptyValue, getOptionalValue, isEmptywithIdpublic static final String REQUIRED_INDICATOR_VISIBLE
setRequiredIndicatorVisible(boolean) is set to true.public ObservedField()
public ObservedField(com.vaadin.flow.component.HasValue.ValueChangeListener<com.vaadin.flow.component.HasValue.ValueChangeEvent<Boolean>> listener)
HasValue.addValueChangeListener(ValueChangeListener).listener - Listener to add.public ObservedField(boolean onlyToggleOnce)
onlyToggleOnce - Whether or not to trigger value change only once.public ObservedField(boolean onlyToggleOnce,
com.vaadin.flow.component.HasValue.ValueChangeListener<com.vaadin.flow.component.HasValue.ValueChangeEvent<Boolean>> listener)
HasValue.addValueChangeListener(ValueChangeListener).onlyToggleOnce - Whether or not to trigger value change only once.listener - Listener to add.protected void fireValueChangeEvent(boolean currentValue)
currentValue - Current value of the field.public void setValue(Boolean aBoolean)
setValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public Boolean getValue()
getValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public com.vaadin.flow.shared.Registration addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>> valueChangeListener)
addValueChangeListener in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public void setReadOnly(boolean b)
setReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public boolean isReadOnly()
isReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public void setRequiredIndicatorVisible(boolean visible)
setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>public boolean isRequiredIndicatorVisible()
isRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ObservedField,Boolean>,Boolean>Copyright © 2023 Miki. All rights reserved.