public class RadioButtonGroup<T> extends GeneratedVaadinRadioGroup<RadioButtonGroup<T>,T> implements HasItemsAndComponents<T>, SingleSelect<RadioButtonGroup<T>,T>, HasDataProvider<T>
This is a server side Java integration for the vaadin-radio-group
element.
Usage examples, see the demo in vaadin.com.
AbstractField.ComponentValueChangeEvent<C extends Component,V>HasItemsAndComponents.ItemComponent<T>HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>| Constructor and Description |
|---|
RadioButtonGroup() |
| Modifier and Type | Method and Description |
|---|---|
DataProvider<T,?> |
getDataProvider()
Gets the data provider.
|
SerializablePredicate<T> |
getItemEnabledProvider()
Returns the item enabled predicate.
|
ComponentRenderer<? extends Component,T> |
getItemRenderer()
Returns the item component renderer.
|
protected boolean |
hasValidValue()
Checks whether the element property has a value that can be converted to
the model type.
|
boolean |
isReadOnly()
Returns whether this
HasValue is in read-only mode or not. |
void |
onEnabledStateChanged(boolean enabled)
Handle component enable state when the enabled state changes.
|
void |
setDataProvider(DataProvider<T,?> dataProvider)
Sets the data provider for this listing.
|
void |
setItemEnabledProvider(SerializablePredicate<T> itemEnabledProvider)
Sets the item enabled predicate for this radio button group.
|
void |
setReadOnly(boolean readOnly)
Sets the read-only mode of this
HasValue to given mode. |
void |
setRenderer(ComponentRenderer<? extends Component,T> renderer)
Sets the item renderer for this radio button group.
|
isDisabledBoolean, setDisabledsetPresentationValue, setSynchronizedEventaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddComponents, getItemPosition, prependComponentsadd, remove, removeAllisRequiredIndicatorVisible, setRequiredIndicatorVisibleaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValueisEnabled, setEnabledsetItemsaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddAttachListeneraddDetachListenerprotected boolean hasValidValue()
AbstractSinglePropertyFieldfalse. The default implementation always
return true.hasValidValue in class AbstractSinglePropertyField<RadioButtonGroup<T>,T>true if the element property value can be converted
to the model type; otherwise falsepublic void setDataProvider(DataProvider<T,?> dataProvider)
HasDataProvidersetDataProvider in interface HasDataProvider<T>dataProvider - the data provider, not nullpublic DataProvider<T,?> getDataProvider()
nullpublic SerializablePredicate<T> getItemEnabledProvider()
setItemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<T>)public void setItemEnabledProvider(SerializablePredicate<T> itemEnabledProvider)
true) or disabled (false). Disabled items are
displayed as grayed out and the user cannot select them. The default
predicate always returns true (all the items are enabled).itemEnabledProvider - the item enable predicate, not nullpublic ComponentRenderer<? extends Component,T> getItemRenderer()
setRenderer(ComponentRenderer)public void setRenderer(ComponentRenderer<? extends Component,T> renderer)
renderer - the item renderer, not nullpublic void onEnabledStateChanged(boolean enabled)
ComponentBy default this sets or removes the 'disabled' attribute from the element. This can be overridden to have custom handling.
onEnabledStateChanged in class Componentenabled - the new enabled state of the componentpublic void setReadOnly(boolean readOnly)
HasValueHasValue to given mode. The user
can't change the value when in read-only mode.
A HasValue with a visual component in read-only mode typically
looks visually different to signal to the user that the value cannot be
edited.
setReadOnly in interface HasValue<AbstractField.ComponentValueChangeEvent<RadioButtonGroup<T>,T>,T>setReadOnly in interface HasValueAndElement<AbstractField.ComponentValueChangeEvent<RadioButtonGroup<T>,T>,T>readOnly - a boolean value specifying whether the component is put
read-only mode or notpublic boolean isReadOnly()
HasValueHasValue is in read-only mode or not.isReadOnly in interface HasValue<AbstractField.ComponentValueChangeEvent<RadioButtonGroup<T>,T>,T>isReadOnly in interface HasValueAndElement<AbstractField.ComponentValueChangeEvent<RadioButtonGroup<T>,T>,T>false if the user can modify the value, true if
not.Copyright © 2019. All rights reserved.