public class

ValuePicker

extends Composite
implements IsEditor<E extends Editor<?>> HasConstrainedValue<T>
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Composite
         ↳ com.google.gwt.user.client.ui.ValuePicker<T>

Class Overview

Allows the user to pick a single value from a list.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
ValuePicker(CellList<T> cellList)
ValuePicker(Renderer<T> renderer)
Public Methods
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> places)
Set the acceptable values.
void setPageSize(int size)
void setValue(T value, boolean fireEvents)
Sets this object's value.
void setValue(T value)
Sets this object's value without firing any events.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.Composite
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.editor.client.IsEditor
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.logical.shared.HasValueChangeHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.TakesValue
From interface com.google.gwt.user.client.ui.HasConstrainedValue
From interface com.google.gwt.user.client.ui.HasValue
From interface com.google.gwt.user.client.ui.IsWidget

Public Constructors

public ValuePicker (CellList<T> cellList)

public ValuePicker (Renderer<T> renderer)

Public Methods

public HandlerRegistration addValueChangeHandler (ValueChangeHandler<T> handler)

Adds a ValueChangeEvent handler.

Parameters
handler the handler
Returns
  • the registration for the event

public LeafValueEditor<T> asEditor ()

Returns a TakesValueEditor backed by the ValuePicker.

Returns

public ValuePicker<T> asWidget ()

Returns this view.

public int getPageSize ()

public T getValue ()

Gets this object's value.

Returns
  • the object's value

public void setAcceptableValues (Collection<T> places)

Set the acceptable values.

Parameters
places the acceptible values

public void setPageSize (int size)

public void setValue (T value, boolean fireEvents)

Sets this object's value. Fires 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.

Parameters
value the object's new value
fireEvents fire events if true and value is new

public void setValue (T value)

Sets this object's value without firing any events. This should be identical to calling setValue(value, false).

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.

Parameters
value the object's new value