Class ListEditorWrapper<T,E extends Editor<? super T>>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
com.google.gwt.editor.client.adapters.ListEditorWrapper<T,E>
- Type Parameters:
T- the type of data being editedE- the type of Editor
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,SequencedCollection<T>
Synchronizes a list of objects and a list of Editors.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionListEditorWrapper(List<T> backing, CompositeEditor.EditorChain<T, E> chain, EditorSource<E> editorSource) -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) voidattach()Must be called after construction.(package private) voiddetach()(package private) voidflush()get(int index) For testing only.(package private) booleanisSameValue(List<T> value) Checks whether that ListEditorWrapper can be reused for the passed list.(package private) voidrefresh()Refresh the editors in case the backing list has been modified from outside the ListEditorWrapper list.remove(int index) intsize()Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Constructor Details
-
ListEditorWrapper
public ListEditorWrapper(List<T> backing, CompositeEditor.EditorChain<T, E> chain, EditorSource<E> editorSource)
-
-
Method Details
-
add
-
get
-
remove
-
set
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<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 callListEditor.getList() -
detach
void detach() -
flush
void flush() -
getEditors
-
isSameValue
-
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.
-