T - The type of the RadioGroup valuepublic class RadioGroup<T> extends AbstractValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>
Radio component as one field, only one Radio can be checked
from the this radio group.ValueBox.AutoValidate, ValueBox.AutoValidatorBasicFormElement.FieldHandler<T>BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerHasChangeHandlers.ChangeHandler<V>HasValidation.ValidatorchangeHandlers, changeListener, DISABLED, fieldContainer, fieldGroup, FLOATING, FOCUSED, inputContainer, inputListenerelement| Constructor and Description |
|---|
RadioGroup(String name)
Creates a new group with a name and empty label
|
RadioGroup(String name,
String label)
Creates a new group with a name and a label
|
| Modifier and Type | Method and Description |
|---|---|
RadioGroup<T> |
appendChild(Radio<? extends T> radio) |
RadioGroup<T> |
appendChild(Radio<? extends T> radio,
org.jboss.elemento.IsElement<?> content) |
RadioGroup<T> |
appendChild(Radio<? extends T> radio,
elemental2.dom.Node content) |
RadioGroup<T> |
clear()
Clears the field value and trigger the change handlers
|
protected void |
clearValue(boolean silent)
clear the field value
|
RadioGroup<T> |
condense()
Reduces the vertical spaces for this component to reduce its height
|
static <T> RadioGroup<T> |
create(String name)
Creates a new group with a name and empty label
|
static <T> RadioGroup<T> |
create(String name,
String label)
Creates a new group with a name and a label
|
protected ValueBox.AutoValidator |
createAutoValidator(ValueBox.AutoValidate autoValidate)
Create an AutoValidator that will automatically validate the component when it loses focus
|
protected elemental2.dom.HTMLElement |
createInputElement(String type)
Creates an input element with the specified type
|
RadioGroup<T> |
disable() |
protected void |
doSetValue(T value) |
RadioGroup<T> |
enable() |
String |
getName() |
List<Radio<? extends T>> |
getRadios() |
Radio<? extends T> |
getSelectedRadio() |
protected Optional<Radio<? extends T>> |
getSelectedRadioImpl() |
T |
getValue() |
RadioGroup<T> |
groupBy(FieldsGrouping fieldsGrouping)
Adds the component to the specified fields group
|
RadioGroup<T> |
horizontal()
Aligns the radios in this group horizontally
|
RadioGroup<T> |
invalidate(String errorMessage)
Mark the component as invalid with the specified error message
|
boolean |
isEmpty() |
boolean |
isEmptyIgnoreSpaces() |
boolean |
isEnabled() |
boolean |
isSelected() |
protected elemental2.dom.HTMLLabelElement |
makeErrorLabel(String message)
Creates a label and apply error styles on it
|
RadioGroup<T> |
removeAllRadios(boolean silent) |
RadioGroup<T> |
removeRadio(Radio<? extends T> radio,
boolean silent) |
RadioGroup<T> |
setCondensed(boolean condensed) |
RadioGroup<T> |
setName(String name) |
void |
setValue(Radio<T> value)
Sets the value from the specific Radio.
|
void |
setValue(T value) |
RadioGroup<T> |
spread()
Increase the vertical spaces for this component to increase its height
|
RadioGroup<T> |
ungroup(FieldsGrouping fieldsGrouping)
remove the component from the specified fields group
|
RadioGroup<T> |
vertical()
Aligns the radios in this group vertically
|
getMaxLength, getMinLength, getMinLengthErrorMessage, setMaxLength, setMinLength, setMinLengthErrorMessage, setReadOnly, updateCharacterCount, valueaddChangeHandler, addLeftAddOn, addLeftAddOn, addLeftAddOn, addOnClearHandler, addRightAddOn, addRightAddOn, addRightAddOn, allowEmptyLabel, asTableField, autoValidate, callChangeHandlers, changeLabelFloating, clear, clearInvalid, clearValue, createLabelElement, createMandatoryAddOn, doFocus, doUnfocus, element, floating, floatLabel, focus, getAdditionalInfoContainer, getCountItem, getErrorItem, getErrorsContainer, getFieldContainer, getFieldGroup, getFieldInputContainer, getFieldStyle, getFocusColor, getHelperContainer, getHelpItem, getInputContainer, getInputElement, getLabelElement, getLabelTextElement, getLeftAddonContainer, getLeftAddOnsContainer, getMandatoryAddOn, getNotesContainer, getOnClearHandlers, getPlaceholder, getPostfix, getPostFixItem, getPrefix, getPrefixItem, getRightAddonContainer, getRightAddOnsContainer, getStringValue, hasChangeHandler, hideLabelText, hidePlaceholder, invalidate, isAddFocusColor, isAutoValidation, isFloating, isFocused, isReadOnly, linkLabelToField, nonfloating, onEnterKey, pauseChangeHandlers, pauseFocusValidation, removeChangeHandler, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOns, removeOnClearHandler, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOns, resumeChangeHandlers, resumeFocusValidation, setAutoValidation, setFieldStyle, setFixErrorsPosition, setFloating, setFocusColor, setLabel, setLabel, setLabel, setLabel, setLabelTextVisible, setPauseChangeHandlers, setPlaceholder, setPostFix, setPrefix, setSpellCheck, setTableField, shouldShowPlaceholder, showLabelText, showPlaceholder, unfloatLabel, unfocus, updateLabel, valueaddValidator, getErrorLabels, getErrors, getHelperText, getLabel, getRequiredErrorMessage, hasValidator, isDisabled, isFixErrorsPosition, isRequired, isShowRequiredIndicator, isValidationDisabled, removeValidator, setHelperText, setRequired, setRequired, setRequiredErrorMessage, setShowRequiredIndicator, setValidationDisabled, showErrors, validate, withValidationDisabledadd, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, elevate, elevate, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isEmptyElement, isEqualNode, isForceHidden, isHidden, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateAllisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic RadioGroup(String name)
name - Stringpublic static <T> RadioGroup<T> create(String name)
T - type of the RadioGroup valuename - Stringpublic static <T> RadioGroup<T> create(String name, String label)
T - type of the RadioGroup valuename - Stringlabel - Stringpublic RadioGroup<T> appendChild(Radio<? extends T> radio)
radio - Radiopublic RadioGroup<T> appendChild(Radio<? extends T> radio, elemental2.dom.Node content)
radio - Radiocontent - Node to be appended to the Radio after it is appended to the RadioGrouppublic RadioGroup<T> appendChild(Radio<? extends T> radio, org.jboss.elemento.IsElement<?> content)
radio - Radiocontent - IsElement to be appended to the Radio after it is appended to the
RadioGrouppublic RadioGroup<T> removeRadio(Radio<? extends T> radio, boolean silent)
public RadioGroup<T> removeAllRadios(boolean silent)
public RadioGroup<T> horizontal()
public RadioGroup<T> vertical()
public RadioGroup<T> invalidate(String errorMessage)
invalidate in interface HasValidation<RadioGroup<T>>invalidate in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>errorMessage - Stringprotected elemental2.dom.HTMLLabelElement makeErrorLabel(String message)
makeErrorLabel in class BasicFormElement<RadioGroup<T>,T>message - String error messagepublic List<Radio<? extends T>> getRadios()
Radio that belongs to this RadioGrouppublic boolean isSelected()
public T getValue()
ValueBoxgetValue in interface org.gwtproject.editor.client.LeafValueEditor<T>getValue in interface org.gwtproject.editor.client.TakesValue<T>getValue in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public boolean isEmpty()
isEmpty in interface HasGrouping<RadioGroup<T>>isEmpty in class AbstractValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public boolean isEmptyIgnoreSpaces()
isEmptyIgnoreSpaces in interface HasGrouping<RadioGroup<T>>isEmptyIgnoreSpaces in class AbstractValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public RadioGroup<T> clear()
clear in interface HasGrouping<RadioGroup<T>>clear in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public RadioGroup<T> groupBy(FieldsGrouping fieldsGrouping)
groupBy in interface HasGrouping<RadioGroup<T>>groupBy in class BasicFormElement<RadioGroup<T>,T>fieldsGrouping - FieldsGroupingpublic RadioGroup<T> ungroup(FieldsGrouping fieldsGrouping)
ungroup in interface HasGrouping<RadioGroup<T>>ungroup in class BasicFormElement<RadioGroup<T>,T>fieldsGrouping - FieldsGroupingpublic String getName()
getName in interface HasName<RadioGroup<T>>getName in class BasicFormElement<RadioGroup<T>,T>public RadioGroup<T> setName(String name)
setName in interface HasName<RadioGroup<T>>setName in class BasicFormElement<RadioGroup<T>,T>name - String component namepublic RadioGroup<T> enable()
enable in interface Switchable<RadioGroup<T>>enable in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public RadioGroup<T> disable()
disable in interface Switchable<RadioGroup<T>>disable in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public boolean isEnabled()
isEnabled in interface Switchable<RadioGroup<T>>isEnabled in class BasicFormElement<RadioGroup<T>,T>public void setValue(Radio<T> value)
value - Radiopublic void setValue(T value)
setValue in interface org.gwtproject.editor.client.LeafValueEditor<T>setValue in interface org.gwtproject.editor.client.TakesValue<T>setValue in class BasicFormElement<RadioGroup<T>,T>protected elemental2.dom.HTMLElement createInputElement(String type)
createInputElement in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>type - String the input element typeprotected ValueBox.AutoValidator createAutoValidator(ValueBox.AutoValidate autoValidate)
createAutoValidator in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>autoValidate - ValueBox.AutoValidatepublic RadioGroup<T> condense()
condense in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public RadioGroup<T> spread()
spread in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>public RadioGroup<T> setCondensed(boolean condensed)
condensed - boolean. if true delegate to condense(), otherwise delegate to spread()protected void clearValue(boolean silent)
clearValue in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>protected void doSetValue(T value)
doSetValue in class ValueBox<RadioGroup<T>,elemental2.dom.HTMLElement,T>value - V the value to set for this fieldCopyright © 2019–2022 Dominokit. All rights reserved.