public class ValueBoxBase<T> extends com.google.gwt.user.client.ui.ValueBoxBase<T> implements HasId, HasColors, HasGrid, HasPlaceholder, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.editor.client.HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator
com.google.gwt.user.client.ui.ValueBoxBase.TextAlignmentcom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Constructor and Description |
|---|
ValueBoxBase(com.google.gwt.dom.client.Element elem,
com.google.gwt.text.shared.Renderer<T> renderer,
com.google.gwt.text.shared.Parser<T> parser) |
| Modifier and Type | Method and Description |
|---|---|
com.google.web.bindery.event.shared.HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
addValidator(Validator<T> validator)
Adds the validator.
|
String |
getBackgroundColor() |
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
String |
getId() |
String |
getPlaceholder() |
String |
getTextColor() |
boolean |
isAllowBlank() |
boolean |
isValidateOnBlur()
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 |
setBackgroundColor(String bgColor)
Sets the background color of material components, for example:
|
void |
setEnabled(boolean enabled) |
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the error handler.
|
void |
setErrorHandlerType(ErrorHandlerType errorHandlerType)
Sets the error handler type.
|
void |
setGrid(String grid)
Setting the grid for responsiveness don't forget to build rows first before setting
the grid on each material widgets.
|
void |
setId(String id) |
void |
setOffset(String offset)
Setting the offset.
|
void |
setPlaceholder(String placeHolder) |
void |
setTextColor(String textColor)
Set the text color of material components, for example:
|
void |
setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur.
|
void |
setValidators(Validator<T>... validators)
The validators used to validate this object.
|
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.
|
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, setValue, 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, 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, toStringpublic ValueBoxBase(com.google.gwt.dom.client.Element elem, com.google.gwt.text.shared.Renderer<T> renderer, com.google.gwt.text.shared.Parser<T> parser)
public void setBackgroundColor(String bgColor)
HasColorspanel.setBackgroundColor("blue");setBackgroundColor in interface HasColorspublic String getBackgroundColor()
getBackgroundColor in interface HasColorspublic void setTextColor(String textColor)
HasColorspanel.setTextColor("blue darken-2");setTextColor in interface HasColorspublic String getTextColor()
getTextColor in interface HasColorspublic void setGrid(String grid)
HasGridpublic void setOffset(String offset)
HasGridpublic void setPlaceholder(String placeHolder)
setPlaceholder in interface HasPlaceholderpublic String getPlaceholder()
getPlaceholder in interface HasPlaceholderpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class com.google.gwt.user.client.ui.FocusWidgetpublic boolean isAllowBlank()
isAllowBlank in interface HasBlankValidatorpublic void setAllowBlank(boolean allowBlank)
setAllowBlank in interface HasBlankValidatorallowBlank - the new allow blankpublic void showErrors(List<com.google.gwt.editor.client.EditorError> errors)
showErrors in interface com.google.gwt.editor.client.HasEditorErrors<T>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<T> validator)
HasValidatorsaddValidator in interface HasValidators<T>validator - the validatorpublic boolean isValidateOnBlur()
HasValidatorsisValidateOnBlur in interface HasValidators<T>public boolean removeValidator(Validator<T> validator)
HasValidatorsremoveValidator in interface HasValidators<T>validator - the validatorpublic void reset()
HasValidatorsreset 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 com.google.web.bindery.event.shared.HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
ValidationChangedEvent.HasValidationChangedHandlersaddValidationChangedHandler in interface ValidationChangedEvent.HasValidationChangedHandlershandler - the handlerCopyright © 2016. All rights reserved.