Interface HasConstrainedValue<T>

Type Parameters:
T - the type of value
All Superinterfaces:
HasHandlers, HasValue<T>, HasValueChangeHandlers<T>, TakesValue<T>
All Known Implementing Classes:
ValueListBox, ValuePicker

public interface HasConstrainedValue<T> extends HasValue<T>
Implemented by widgets that pick from a set of values.

It is up to the implementation to decide (and document) how to behave when HasValue.setValue(Object) is called with a value that is not in the acceptable set. For example, throwing an IllegalArgumentException, or quietly adding the value to the acceptable set, are both reasonable choices.

  • Method Details

    • setAcceptableValues

      void setAcceptableValues(Collection<T> values)
      Set the acceptable values.
      Parameters:
      values - the acceptible values