T
- the type of valuepublic class ValuePicker<T> extends Composite implements HasConstrainedValue<T>, IsEditor<LeafValueEditor<T>>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
eventsToSink
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR
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(java.util.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, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, 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 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(java.util.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.