T
- the value typepublic class ValueListBox<T> extends ValueListBox<T> implements HasName, HasId, HasResponsiveness, HasPlaceholder, HasSize<InputSize>, HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator<T>
HasConstrainedValue
based on a
SelectElement
.
A Renderer
is used to get user-presentable strings to
display in the select element.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Editor.Ignore, Editor.Path
DEBUG_ID_PREFIX
PLACEHOLDER
Constructor and Description |
---|
ValueListBox(Renderer<T> renderer) |
ValueListBox(Renderer<T> renderer,
ProvidesKey<T> keyProvider) |
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() |
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
String |
getId()
Gets the ID of the widget
|
String |
getName() |
String |
getPlaceholder() |
InputSize |
getSize()
Get the size of the widget
|
boolean |
getValidateOnBlur()
Gets the validate on blur.
|
protected void |
initWidget(Widget widget) |
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 |
setHiddenOn(DeviceSize deviceSize)
Sets the devices that the element is hidden on
|
void |
setId(String id)
Sets the ID on the widget
|
void |
setName(String name) |
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 |
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.
|
addValueChangeHandler, asEditor, getTabIndex, getValue, isEnabled, setAcceptableValues, setAccessKey, setEnabled, setFocus, setTabIndex, setValue, setValue
claimElement, getWidget, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, 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
public ValueListBox(Renderer<T> renderer)
public ValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider)
protected void initWidget(Widget widget)
initWidget
in class Composite
public void setVisibleOn(DeviceSize deviceSize)
setVisibleOn
in interface HasResponsiveness
deviceSize
- device sizeDeviceSize
public void setHiddenOn(DeviceSize deviceSize)
setHiddenOn
in interface HasResponsiveness
deviceSize
- device sizesDeviceSize
public void setPlaceholder(String placeHolder)
setPlaceholder
in interface HasPlaceholder
public String getPlaceholder()
getPlaceholder
in interface HasPlaceholder
public HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
addValidationChangedHandler
in interface ValidationChangedEvent.HasValidationChangedHandlers
handler
- the handlerpublic boolean getAllowBlank()
getAllowBlank
in interface HasBlankValidator<T>
public void setAllowBlank(boolean allowBlank)
setAllowBlank
in interface HasBlankValidator<T>
allowBlank
- the new allow blankpublic void addValidator(Validator<T> validator)
addValidator
in interface HasValidators<T>
validator
- the validatorpublic boolean removeValidator(Validator<T> validator)
removeValidator
in interface HasValidators<T>
validator
- the validatorpublic boolean getValidateOnBlur()
getValidateOnBlur
in interface HasValidators<T>
public void reset()
reset
in interface HasValidators<T>
public void setValidateOnBlur(boolean validateOnBlur)
setValidateOnBlur
in interface HasValidators<T>
validateOnBlur
- the new validate on blurpublic void setValidators(Validator<T>... validators)
setValidators
in interface HasValidators<T>
validators
- the new validatorspublic boolean validate()
validate
in interface HasValidators<T>
public boolean validate(boolean show)
validate
in interface HasValidators<T>
show
- the error to the user.public ErrorHandler getErrorHandler()
getErrorHandler
in interface HasErrorHandler
public void setErrorHandler(ErrorHandler handler)
setErrorHandler
in interface HasErrorHandler
handler
- the new error handlerpublic ErrorHandlerType getErrorHandlerType()
getErrorHandlerType
in interface HasErrorHandler
public void setErrorHandlerType(ErrorHandlerType type)
setErrorHandlerType
in interface HasErrorHandler
type
- the new error handler typepublic void showErrors(List<EditorError> errors)
showErrors
in interface HasEditorErrors<T>
Copyright © 2017. All rights reserved.