Module io.github.mmm.ui.api.core
Interface UiRadioChoice<V>
- All Superinterfaces:
AttributeReadAttached
,AttributeReadEnabled
,AttributeReadId
,AttributeReadValid
,AttributeReadValue<V>
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWritePrefix
,AttributeWriteReadOnly
,AttributeWriteSuffix
,AttributeWriteTooltip
,AttributeWriteValidationFailure
,AttributeWriteValue<V>
,AttributeWriteValueForUser<V>
,AttributeWriteVisible
,EventSource<UiEvent,
,UiEventListener> UiAbstractChoice<V,
,V> UiAbstractInput<V>
,UiAbstractSingleChoice<V>
,UiInput<V>
,UiNativeWidget
,UiRegularWidget
,UiValidatableWidget<V>
,UiValuedWidget<V>
,UiWidget
UiAbstractSingleChoice
to select a value from a group of UiRadioButton
s. You should only use this
input widget when you have a small number of options
with rather short text (2-5 options not
longer than 10 characters each). Otherwise you should use alternatives such as UiComboBox
for better UX. Example:
Matrimony: single married divorced
ATTENTION: Initially no option is selected and the
value
may be null
. You can set
a reasonable initial value as default. However, it is often better to force the end-user to make his choice. As
null
is not a good choice in most cases you typically want to
set a validator
that is
mandatory
then. NOTICE: Depending on the implementation you may receive a focus loss event immediately followed by a focus gain event in case the end-user changes focus from one option to another. However, other implementations may not send events in this case.
- Since:
- 1.0.0
-
Field Summary
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWritePrefix
STYLE_PREFIX, STYLE_WITH_PREFIX
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSuffix
STYLE_SUFFIX, STYLE_WITH_SUFFIX
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
STYLE_INVALID
Fields inherited from interface io.github.mmm.ui.api.widget.input.UiInput
STYLE_INPUT
Fields inherited from interface io.github.mmm.ui.api.widget.value.UiValidatableWidget
STYLE_MANDATORY
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <V> UiRadioChoice<V>
static <V> UiRadioChoice<V>
static <V extends Enum<?>>
UiRadioChoice<V>Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadAttached
isAttached
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadId
getId
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteId
setId
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWritePrefix
getPrefix, setPrefix
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSuffix
getSuffix, setSuffix
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteTooltip
getTooltip, setTooltip
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
getValidationFailure, setValidationFailure, setValidationFailure
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
Methods inherited from interface io.github.mmm.ui.api.widget.input.UiAbstractChoice
format, getFormatter, getOptions, setFormatter, setOptions, setOptions
Methods inherited from interface io.github.mmm.ui.api.widget.input.UiAbstractInput
getName, setName
Methods inherited from interface io.github.mmm.ui.api.widget.input.UiInput
getContainerWidget, getNameWidget, hasContainerWidget, hasNameWidget
Methods inherited from interface io.github.mmm.ui.api.widget.value.UiValidatableWidget
getOriginalValue, getValidator, getValue, getValueOrThrow, isValid, reset, setOriginalValue, setValidator, setValue, setValue, setValueForUser
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getModificationTimestamp, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isVisible, isVisible, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
Method Details
-
of
-
ofEnum
-
of
-