public class ValueBoxBase<T> extends ValueBoxBase<T> implements HasId, HasReadOnly, HasResponsiveness, HasPlaceholder, HasAutoComplete, HasSize<InputSize>, HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator<T>
ValueBoxBase.TextAlignmentUIObject.DebugIdImpl, UIObject.DebugIdImplEnabledEditor.Ignore, Editor.PathHasDirection.DirectionDEBUG_ID_PREFIXPLACEHOLDERAUTO_COMPLETE, OFF, ON| Modifier | Constructor and Description |
|---|---|
protected |
ValueBoxBase(Element elem,
Renderer<T> renderer,
Parser<T> parser)
Creates a value box that wraps the given browser element handle.
|
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
addValidator(Validator<T> validator)
Adds the validator.
|
boolean |
getAllowBlank() |
String |
getAutoComplete()
Get the auto complete attribute from the widget
|
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
String |
getId()
Gets the ID of the widget
|
String |
getPlaceholder() |
InputSize |
getSize()
Get the size of the widget
|
boolean |
getValidateOnBlur()
Gets the validate on blur.
|
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 |
setAutoComplete(boolean autoComplete)
Sets the auto complete property on the widget
|
void |
setErrorHandler(ErrorHandler handler)
Sets the error handler.
|
void |
setErrorHandlerType(ErrorHandlerType type)
Sets the error handler type.
|
void |
setHiddenOn(DeviceSize deviceSize)
Sets the devices that the element is hidden on
|
void |
setId(String id)
Sets the ID on the widget
|
void |
setMaxLength(int maxLength) |
void |
setPlaceholder(String placeHolder) |
void |
setSize(InputSize size)
Set the size of the widget
|
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,
boolean fireEvents) |
void |
setVisibleOn(DeviceSize deviceSize)
Sets the devices that the element is visible on
|
void |
showErrors(List<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.
|
addChangeHandler, addValueChangeHandler, asEditor, cancelKey, getCursorPos, getDirection, getDirectionEstimator, getImpl, getName, getSelectedText, getSelectionLength, getText, getValue, getValueOrThrow, isReadOnly, onBrowserEvent, onLoad, removeChangeListener, selectAll, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setKey, setName, setReadOnly, setSelectionRange, setText, setValueaddBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onUnload, 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, waitisReadOnly, setReadOnlyfireEventaddKeyUpHandlerpublic void setMaxLength(int maxLength)
public void setPlaceholder(String placeHolder)
setPlaceholder in interface HasPlaceholderpublic String getPlaceholder()
getPlaceholder in interface HasPlaceholderpublic void setAutoComplete(boolean autoComplete)
HasAutoCompletesetAutoComplete in interface HasAutoCompleteautoComplete - auto complete setting for the widgetpublic String getAutoComplete()
HasAutoCompletegetAutoComplete in interface HasAutoCompletepublic void setId(String id)
HasIdpublic void setVisibleOn(DeviceSize deviceSize)
HasResponsivenesssetVisibleOn in interface HasResponsivenessdeviceSize - device sizeDeviceSizepublic void setHiddenOn(DeviceSize deviceSize)
HasResponsivenesssetHiddenOn in interface HasResponsivenessdeviceSize - device sizesDeviceSizepublic void setSize(InputSize size)
HasSizepublic InputSize getSize()
HasSizepublic void showErrors(List<EditorError> errors)
showErrors in interface HasEditorErrors<T>public ErrorHandler getErrorHandler()
getErrorHandler in interface HasErrorHandlerpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface HasErrorHandlerhandler - the new error handlerpublic ErrorHandlerType getErrorHandlerType()
getErrorHandlerType in interface HasErrorHandlerpublic void setErrorHandlerType(ErrorHandlerType type)
setErrorHandlerType in interface HasErrorHandlertype - the new error handler typepublic void setAllowBlank(boolean allowBlank)
setAllowBlank in interface HasBlankValidator<T>allowBlank - the new allow blankpublic boolean getAllowBlank()
getAllowBlank in interface HasBlankValidator<T>public void addValidator(Validator<T> validator)
HasValidatorsaddValidator in interface HasValidators<T>validator - the validatorpublic boolean removeValidator(Validator<T> validator)
removeValidator in interface HasValidators<T>validator - the validatorpublic boolean getValidateOnBlur()
HasValidatorsgetValidateOnBlur in interface HasValidators<T>public void setValidateOnBlur(boolean validateOnBlur)
HasValidatorssetValidateOnBlur in interface HasValidators<T>validateOnBlur - the new validate on blurpublic void setValidators(Validator<T>... validators)
HasValidatorssetValidators in interface HasValidators<T>validators - the new validatorspublic boolean validate()
HasValidatorsvalidate in interface HasValidators<T>public boolean validate(boolean show)
HasValidatorsvalidate in interface HasValidators<T>show - the error to the user.public void reset()
HasValidatorsreset in interface HasValidators<T>public HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
ValidationChangedEvent.HasValidationChangedHandlersaddValidationChangedHandler in interface ValidationChangedEvent.HasValidationChangedHandlershandler - the handlerCopyright © 2017. All rights reserved.