|
GWT 2.4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.editor.client.adapters.ListEditor<T,E>
T - The type of data being managedE - The type of Editorpublic class ListEditor<T,E extends Editor<T>>
Manages a list of objects and their associated Editors.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.gwt.editor.client.CompositeEditor |
|---|
CompositeEditor.EditorChain<C,E extends Editor<C>> |
| Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor |
|---|
Editor.Ignore, Editor.Path |
| Constructor Summary | |
|---|---|
protected |
ListEditor(EditorSource<E> source)
Create a ListEditor backed by an EditorSource. |
| Method Summary | ||
|---|---|---|
E |
createEditorForTraversal()
Creates a temporary sub-Editor to use for traversal. |
|
void |
flush()
Indicates that the Editor cycle is finished. |
|
java.util.List<E> |
getEditors()
Returns an unmodifiable, live view of the Editors managed by the ListEditor. |
|
java.util.List<T> |
getList()
Returns a live view of the ListEditor's backing data. |
|
java.lang.String |
getPathElement(E subEditor)
Used to implement EditorDelegate.getPath() for the component
Editors. |
|
static
|
of(EditorSource<E> source)
Create a ListEditor backed by an EditorSource. |
|
void |
onPropertyChange(java.lang.String... paths)
Notifies the Editor that one or more value properties have changed. |
|
void |
setDelegate(EditorDelegate<java.util.List<T>> delegate)
Called by the EditorDriver to provide access to the EditorDelegate the Editor is peered with. |
|
void |
setEditorChain(CompositeEditor.EditorChain<T,E> chain)
Called by the Editor framework to provide the CompositeEditor.EditorChain. |
|
void |
setValue(java.util.List<T> value)
Sets the ListEditor's backing data. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ListEditor(EditorSource<E> source)
source - the EditorSource which will create sub-Editors| Method Detail |
|---|
public static <T,E extends Editor<T>> ListEditor<T,E> of(EditorSource<E> source)
T - The type of data being managedE - The type of Editorsource - the EditorSource which will create sub-Editors
public E createEditorForTraversal()
createEditorForTraversal in interface CompositeEditor<java.util.List<T>,T,E extends Editor<T>>Editor of type Epublic void flush()
ValueAwareEditor
flush in interface ValueAwareEditor<java.util.List<T>>public java.util.List<E> getEditors()
Editors of type Epublic java.util.List<T> getList()
getEditors() to avoid data inconsistency.
ListEditor<Foo, MyFooEditor> listEditor = ListEditor.of(...); listEditor.setValue(listOfFoo); // Usually called by EditorDriver listEditor.getList().set(1, new Foo()); listEditor.getEditors().get(1).getFooFieldEditor().setValue(....);
public java.lang.String getPathElement(E subEditor)
CompositeEditorEditorDelegate.getPath() for the component
Editors.
getPathElement in interface CompositeEditor<java.util.List<T>,T,E extends Editor<T>>subEditor - an instance of the Editor type previously passed into
CompositeEditor.EditorChain.attach(C, E)
public void onPropertyChange(java.lang.String... paths)
ValueAwareEditor
onPropertyChange in interface ValueAwareEditor<java.util.List<T>>paths - a list of String pathspublic void setDelegate(EditorDelegate<java.util.List<T>> delegate)
HasEditorDelegate
setDelegate in interface HasEditorDelegate<java.util.List<T>>delegate - an EditorDelegate of type Tpublic void setEditorChain(CompositeEditor.EditorChain<T,E> chain)
CompositeEditorCompositeEditor.EditorChain.
setEditorChain in interface CompositeEditor<java.util.List<T>,T,E extends Editor<T>>chain - an CompositeEditor.EditorChain instancepublic void setValue(java.util.List<T> value)
setValue in interface ValueAwareEditor<java.util.List<T>>value - a List of data objects of type T
|
GWT 2.4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||