Class ListEditorWrapper<T,E extends Editor<? super T>>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
com.google.gwt.editor.client.adapters.ListEditorWrapper<T,E>
Type Parameters:
T - the type of data being edited
E - the type of Editor
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>

class ListEditorWrapper<T,E extends Editor<? super T>> extends AbstractList<T>
Synchronizes a list of objects and a list of Editors.
  • Constructor Details

  • Method Details

    • add

      public void add(int index, T element)
      Specified by:
      add in interface List<T>
      Overrides:
      add in class AbstractList<T>
    • get

      public T get(int index)
      Specified by:
      get in interface List<T>
      Specified by:
      get in class AbstractList<T>
    • remove

      public T remove(int index)
      Specified by:
      remove in interface List<T>
      Overrides:
      remove in class AbstractList<T>
    • set

      public T set(int index, T element)
      Specified by:
      set in interface List<T>
      Overrides:
      set in class AbstractList<T>
    • size

      public int size()
      Specified by:
      size in interface Collection<T>
      Specified by:
      size in interface List<T>
      Specified by:
      size in class AbstractCollection<T>
    • attach

      void attach()
      Must be called after construction. This is a two-phase initialization so that ListEditor can assign its list field before any sub-editors might call ListEditor.getList()
    • detach

      void detach()
    • flush

      void flush()
    • getEditors

      List<? extends E> getEditors()
      For testing only.
    • isSameValue

      boolean isSameValue(List<T> value)
      Checks whether that ListEditorWrapper can be reused for the passed list.

      The ListEditorWrapper can be reused if and only if the backing list is the same instance as the passed list.

    • refresh

      void refresh()
      Refresh the editors in case the backing list has been modified from outside the ListEditorWrapper list.

      This is basically the opposite from flush(). It's used to reuse sub-editors instead of recreating a ListEditorWrapper from scratch.