Package com.storedobject.vaadin
Class RadioField<T>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,T>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,T>
com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>
com.storedobject.vaadin.RadioField<T>
- Type Parameters:
T- Item type
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasAriaLabel,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasHelper,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValidation,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,,T>, T> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,,T>, T> com.vaadin.flow.component.shared.HasClientValidation,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.radiobutton.RadioGroupVariant>,com.vaadin.flow.component.shared.HasTooltip,com.vaadin.flow.component.shared.HasValidationProperties,com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,,T>, T> com.vaadin.flow.data.binder.HasValidator<T>,com.vaadin.flow.data.provider.HasDataView<T,,Void, com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,,com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupListDataView<T>> com.vaadin.flow.data.selection.SingleSelect<com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>,,T> Serializable
public class RadioField<T>
extends com.vaadin.flow.component.radiobutton.RadioButtonGroup<T>
Radio field of choices from a list of items.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.radiobutton.RadioButtonGroup
com.vaadin.flow.component.radiobutton.RadioButtonGroup.RadioButtonGroupI18nNested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.shared.HasClientValidation
com.vaadin.flow.component.shared.HasClientValidation.ClientValidatedEventNested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Constructor Summary
ConstructorsConstructorDescriptionRadioField(Iterable<T> choices) Constructor.RadioField(String label, Iterable<T> choices) Constructor.RadioField(String label, Collection<T> choices) Constructor.RadioField(String label, T[] choices) Constructor.RadioField(T[] choices) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Get the index of the current value.intGet the index of a value.getValue(int index) Get the value corresponding to an index.voidDisplay the items horizontally.voidsetIndex(int index) Set the index as the current value.com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupListDataView<T> setItems(Collection<T> items) voidDisplay the items vertically.Methods inherited from class com.vaadin.flow.component.radiobutton.RadioButtonGroup
getAriaLabel, getAriaLabelledBy, getDataProvider, getDefaultValidator, getGenericDataView, getI18n, getItemEnabledProvider, getItemLabelGenerator, getItemRenderer, getLabel, getListDataView, getSelectionPreservationMode, hasValidValue, isReadOnly, isRequired, isRequiredIndicatorVisible, onAttach, onDetach, onEnabledStateChanged, setAriaLabel, setAriaLabelledBy, setDataProvider, setI18n, setItemEnabledProvider, setItemLabelGenerator, setItems, setItems, setItems, setLabel, setManualValidation, setReadOnly, setRenderer, setRequired, setRequiredIndicatorVisible, setSelectionPreservationMode, setValue, validate, valueEqualsMethods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValueMethods 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, 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.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.shared.HasClientValidation
addClientValidatedEventListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.data.provider.HasListDataView
setItemsMethods 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.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.data.binder.HasValidator
addValidationStatusChangeListenerMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty
-
Constructor Details
-
RadioField
-
RadioField
-
RadioField
-
RadioField
Constructor.- Parameters:
label- Labelchoices- Choices
-
RadioField
-
-
Method Details
-
setItems
public com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupListDataView<T> setItems(Collection<T> items) -
getIndex
public int getIndex()Get the index of the current value.- Returns:
- Index of the current value.
-
getIndex
Get the index of a value.- Parameters:
value- Value for which index need to be retrieved- Returns:
- Index of a value.
-
getValue
Get the value corresponding to an index.- Parameters:
index- Index- Returns:
- Value for the index.
-
setIndex
public void setIndex(int index) Set the index as the current value.- Parameters:
index- Index
-
setVertical
public void setVertical()Display the items vertically. -
setHorizontal
public void setHorizontal()Display the items horizontally. (This is the default).
-