Class SimpleEditor<T>

java.lang.Object
com.google.gwt.editor.client.adapters.SimpleEditor<T>
Type Parameters:
T - the type of data being held
All Implemented Interfaces:
Editor<T>, LeafValueEditor<T>, TakesValue<T>

public class SimpleEditor<T> extends Object implements LeafValueEditor<T>
A trivial implementation of LeafValueEditor than can be used for "hidden" properties when composing UI-based Editors.
  • Constructor Details

    • SimpleEditor

      protected SimpleEditor(T value)
      Constructs a new SimpleEditor that holds the given value.
      Parameters:
      value - a data object of type T
  • Method Details

    • of

      public static <T> SimpleEditor<T> of()
      Returns a new ValueEditor that holds a null value.
      Returns:
      a SimpleEditor instance holding a null value
    • of

      public static <T> SimpleEditor<T> of(T value)
      Returns a new ValueEditor that holds the given value.
      Parameters:
      value - a data object of type T
      Returns:
      a SimpleEditor instance holding the given value
    • getValue

      public T getValue()
      Description copied from interface: TakesValue
      Returns the current value.
      Specified by:
      getValue in interface TakesValue<T>
      Returns:
      the value as an object of type V
      See Also:
    • setValue

      public void setValue(T value)
      Description copied from interface: TakesValue
      Sets the value.
      Specified by:
      setValue in interface TakesValue<T>
      Parameters:
      value - a value object of type V
      See Also: