T
- the return value type of the radio group.public class RadioGroupBase<T> extends FlowPanel implements HasName, HasValue<T>, LeafValueEditor<T>, HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator<T>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Editor.Ignore, Editor.Path
InsertPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
RadioGroupBase(String name,
Parser<T> parser)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Widget w) |
HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
addValidator(Validator<T> validator)
Adds the validator.
|
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<T> handler) |
void |
clear() |
boolean |
getAllowBlank() |
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
String |
getName() |
Set<Radio> |
getRadioChildren() |
protected Set<Radio> |
getRadioChildren(Widget widget,
Set<Radio> c)
Gets the radio children.
|
boolean |
getValidateOnBlur()
Gets the validate on blur.
|
T |
getValue() |
void |
insert(IsWidget w,
int beforeIndex) |
void |
insert(Widget w,
int beforeIndex) |
boolean |
remove(Widget w) |
boolean |
removeValidator(Validator<T> validator)
Removes the validator.
|
void |
reset()
Reset the form element to blank and clear error messages.
|
void |
setAllowBlank(boolean allowBlank) |
void |
setErrorHandler(ErrorHandler handler)
Sets the error handler.
|
void |
setErrorHandlerType(ErrorHandlerType type)
Sets the error handler type.
|
void |
setName(String name) |
void |
setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur.
|
void |
setValidators(Validator<T>... validators)
The validators used to validate this object.
|
void |
setValue(T value) |
void |
setValue(T value,
boolean fireEvents) |
void |
showErrors(List<EditorError> errors) |
protected void |
updateChildren()
Update the radio children names.
|
boolean |
validate()
Validate the field's value using the supplied validators.
|
boolean |
validate(boolean show)
Validate the field's value using the supplied validators.
|
getDataSpy, getDataTarget, getId, setDataSpy, setDataTarget, setDataTargetWidget, setDataTargetWidgets, setHiddenOn, setId, setVisibleOn
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
add
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
forEach, spliterator
public RadioGroupBase(String name, Parser<T> parser)
name
- the nameparser
- the parserpublic void add(Widget w)
add
in interface HasWidgets
add
in interface InsertPanel
add
in class FlowPanel
public HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
ValidationChangedEvent.HasValidationChangedHandlers
addValidationChangedHandler
in interface ValidationChangedEvent.HasValidationChangedHandlers
handler
- the handlerpublic void addValidator(Validator<T> validator)
HasValidators
addValidator
in interface HasValidators<T>
validator
- the validatorpublic HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
addValueChangeHandler
in interface HasValueChangeHandlers<T>
public void clear()
clear
in interface HasWidgets
clear
in class FlowPanel
public boolean getAllowBlank()
getAllowBlank
in interface HasBlankValidator<T>
public ErrorHandler getErrorHandler()
getErrorHandler
in interface HasErrorHandler
public ErrorHandlerType getErrorHandlerType()
getErrorHandlerType
in interface HasErrorHandler
public Set<Radio> getRadioChildren()
protected Set<Radio> getRadioChildren(Widget widget, Set<Radio> c)
widget
- the widgetc
- the current childrenpublic boolean getValidateOnBlur()
getValidateOnBlur
in interface HasValidators<T>
public void insert(IsWidget w, int beforeIndex)
insert
in interface InsertPanel.ForIsWidget
insert
in class FlowPanel
public void insert(Widget w, int beforeIndex)
insert
in interface InsertPanel
insert
in class FlowPanel
public boolean removeValidator(Validator<T> validator)
removeValidator
in interface HasValidators<T>
validator
- the validatorpublic void reset()
reset
in interface HasValidators<T>
public void setAllowBlank(boolean allowBlank)
setAllowBlank
in interface HasBlankValidator<T>
allowBlank
- the new allow blankpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler
in interface HasErrorHandler
handler
- the new error handlerpublic void setErrorHandlerType(ErrorHandlerType type)
setErrorHandlerType
in interface HasErrorHandler
type
- the new error handler typepublic void setValidateOnBlur(boolean validateOnBlur)
HasValidators
setValidateOnBlur
in interface HasValidators<T>
validateOnBlur
- the new validate on blurpublic void setValidators(Validator<T>... validators)
HasValidators
setValidators
in interface HasValidators<T>
validators
- the new validatorspublic void showErrors(List<EditorError> errors)
showErrors
in interface HasEditorErrors<T>
protected void updateChildren()
public boolean validate()
validate
in interface HasValidators<T>
public boolean validate(boolean show)
validate
in interface HasValidators<T>
show
- the error to the user.public boolean remove(Widget w)
remove
in interface HasWidgets
remove
in class ComplexPanel
Copyright © 2017. All rights reserved.