T
- the type of valuepublic class ValuePicker<T> extends Composite implements HasConstrainedValue<T>, IsEditor<LeafValueEditor<T>>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Constructor and Description |
---|
ValuePicker() |
ValuePicker(CellList<T> cellList) |
ValuePicker(Renderer<? super T> renderer) |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<T> handler)
Adds a
ValueChangeEvent handler. |
LeafValueEditor<T> |
asEditor()
Returns a
TakesValueEditor backed by the ValuePicker. |
ValuePicker<T> |
asWidget()
Returns this view.
|
int |
getPageSize() |
T |
getValue()
Gets this object's value.
|
void |
setAcceptableValues(Collection<T> values)
Set the acceptable values.
|
void |
setPageSize(int size) |
void |
setValue(T value)
Sets this object's value without firing any events.
|
void |
setValue(T value,
boolean fireEvents)
Sets this object's value.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, 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
fireEvent
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
HasValueChangeHandlers
ValueChangeEvent
handler.addValueChangeHandler
in interface HasValueChangeHandlers<T>
handler
- the handlerpublic LeafValueEditor<T> asEditor()
TakesValueEditor
backed by the ValuePicker.asEditor
in interface IsEditor<LeafValueEditor<T>>
Editor
of type Epublic ValuePicker<T> asWidget()
public int getPageSize()
public T getValue()
HasValue
getValue
in interface TakesValue<T>
getValue
in interface HasValue<T>
TakesValue.setValue(V)
public void setAcceptableValues(Collection<T> values)
HasConstrainedValue
setAcceptableValues
in interface HasConstrainedValue<T>
values
- the acceptible valuespublic void setPageSize(int size)
public void setValue(T value)
HasValue
It is acceptable to fail assertions or throw (documented) unchecked exceptions in response to bad values.
Widgets must accept null as a valid value. By convention, setting a widget to
null clears value, calling getValue() on a cleared widget returns null. Widgets
that can not be cleared (e.g. CheckBox
) must find another valid meaning
for null input.
setValue
in interface TakesValue<T>
setValue
in interface HasValue<T>
value
- the object's new valueTakesValue.getValue()
public void setValue(T value, boolean fireEvents)
HasValue
ValueChangeEvent
when
fireEvents is true and the new value does not equal the existing value.
It is acceptable to fail assertions or throw (documented) unchecked exceptions in response to bad values.
Copyright © 2018. All rights reserved.