public abstract class AbstractValueWidget<V> extends MaterialWidget implements com.google.gwt.user.client.ui.HasValue<V>, com.google.gwt.editor.client.LeafValueEditor<V>, com.google.gwt.editor.client.HasEditorErrors<V>, HasErrorHandler, HasError, HasValidators<V>
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledcom.google.gwt.editor.client.Editor.Ignore, com.google.gwt.editor.client.Editor.Path$this| Constructor and Description |
|---|
AbstractValueWidget(com.google.gwt.dom.client.Element element) |
AbstractValueWidget(com.google.gwt.dom.client.Element element,
String... initialClass) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
addValidator(Validator<V> validator)
Adds the validator.
|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<V> handler) |
void |
clearErrorOrSuccess()
Clear the error or success states.
|
protected BlankValidator<V> |
createBlankValidator()
Hook for custom blank validators.
|
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
protected ErrorHandlerMixin<V> |
getErrorHandlerMixin() |
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
protected ErrorMixin<AbstractValueWidget,?> |
getErrorMixin() |
protected ValidatorMixin<AbstractValueWidget<V>,V> |
getValidatorMixin() |
boolean |
isAllowBlank()
Will this widget allow blank values upon validation.
|
boolean |
isValidateOnBlur()
Gets the validate on blur.
|
boolean |
removeValidator(Validator<V> validator)
Removes the validator.
|
void |
reset()
Reset the form element to blank and clear error messages.
|
void |
setAllowBlank(boolean allowBlank)
Enable or disable the default blank validator.
|
void |
setError(String error)
Errors occur when an app fails to complete what is expected, such as:
- The app does not understand user input
- The system or app fails
- A user intends to run incompatible operations concurrently
|
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the error handler.
|
void |
setErrorHandlerType(ErrorHandlerType errorHandlerType)
Sets the error handler type.
|
void |
setHelperText(String helperText)
Apply a widgets help text.
|
void |
setSuccess(String success)
Set the success message marking a widget as success.
|
protected void |
setupBlurValidation() |
void |
setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur.
|
void |
setValidators(Validator<V>... validators)
The validators used to validate this object.
|
void |
setValue(V value) |
void |
setValue(V value,
boolean fireEvents) |
void |
setValue(V value,
boolean fireEvents,
boolean reload) |
void |
showErrors(List<com.google.gwt.editor.client.EditorError> errors) |
boolean |
validate()
Validate the field's value using the supplied validators.
|
boolean |
validate(boolean show)
Validate the field's value using the supplied validators.
|
$this, add, add, addAttachHandler, addBlurHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addOrientationChangeHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, body, clearActiveClass, enableFeature, getBackfaceVisibility, getBackgroundColor, getBorder, getBorderBottom, getBorderLeft, getBorderMixin, getBorderRadius, getBorderRight, getBorderTop, getCenterOn, getCenterOnMixin, getChildren, getChildrenList, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getDimensionMixin, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHandlerRegistry, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getLayoutPosition, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOrientation, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isEnabled, isFeatureEnabled, isHoverable, isSeparator, isTruncate, onLoad, onUnload, registerHandler, removeHandler, setAccessKey, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, setDisplay, setEnabled, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffset, setOpacity, setOrientation, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic AbstractValueWidget(com.google.gwt.dom.client.Element element)
public AbstractValueWidget(com.google.gwt.dom.client.Element element, String... initialClass)
public void setValue(V value, boolean fireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<V>public void setError(String error)
HasErrorpublic void setSuccess(String success)
HasErrorsetSuccess in interface HasErrorpublic void setHelperText(String helperText)
HasErrorsetHelperText in interface HasErrorpublic void clearErrorOrSuccess()
HasErrorclearErrorOrSuccess in interface HasErrorpublic void showErrors(List<com.google.gwt.editor.client.EditorError> errors)
showErrors in interface com.google.gwt.editor.client.HasEditorErrors<V>public ErrorHandler getErrorHandler()
HasErrorHandlergetErrorHandler in interface HasErrorHandlerpublic void setErrorHandler(ErrorHandler errorHandler)
HasErrorHandlersetErrorHandler in interface HasErrorHandlererrorHandler - the new error handlerpublic ErrorHandlerType getErrorHandlerType()
HasErrorHandlergetErrorHandlerType in interface HasErrorHandlerpublic void setErrorHandlerType(ErrorHandlerType errorHandlerType)
HasErrorHandlersetErrorHandlerType in interface HasErrorHandlererrorHandlerType - the new error handler typepublic void addValidator(Validator<V> validator)
HasValidatorsaddValidator in interface HasValidators<V>validator - the validatorpublic boolean isValidateOnBlur()
HasValidatorsisValidateOnBlur in interface HasValidators<V>public boolean removeValidator(Validator<V> validator)
HasValidatorsremoveValidator in interface HasValidators<V>validator - the validatorpublic void reset()
HasValidatorsreset in interface HasValidators<V>public void setValidateOnBlur(boolean validateOnBlur)
HasValidatorssetValidateOnBlur in interface HasValidators<V>validateOnBlur - the new validate on blurpublic void setValidators(Validator<V>... validators)
HasValidatorssetValidators in interface HasValidators<V>validators - the new validatorspublic boolean validate()
HasValidatorsvalidate in interface HasValidators<V>validate in class MaterialWidgetpublic boolean validate(boolean show)
HasValidatorsvalidate in interface HasValidators<V>show - the error to the user.public void setAllowBlank(boolean allowBlank)
public boolean isAllowBlank()
protected BlankValidator<V> createBlankValidator()
protected void setupBlurValidation()
public com.google.gwt.event.shared.HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
ValidationChangedEvent.HasValidationChangedHandlersaddValidationChangedHandler in interface ValidationChangedEvent.HasValidationChangedHandlershandler - the handlerpublic com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<V> handler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<V>protected ValidatorMixin<AbstractValueWidget<V>,V> getValidatorMixin()
protected ErrorMixin<AbstractValueWidget,?> getErrorMixin()
protected ErrorHandlerMixin<V> getErrorHandlerMixin()
Copyright © 2018. All rights reserved.