Class 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 java.lang.Object
    implements LeafValueEditor<T>
    A trivial implementation of LeafValueEditor than can be used for "hidden" properties when composing UI-based Editors.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SimpleEditor​(T value)
      Constructs a new SimpleEditor that holds the given value.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Returns the current value.
      static <T> SimpleEditor<T> of()
      Returns a new ValueEditor that holds a null value.
      static <T> SimpleEditor<T> of​(T value)
      Returns a new ValueEditor that holds the given value.
      void setValue​(T value)
      Sets the value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleEditor

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

      • 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