T
- the base type being editedC
- the component type to be editedE
- the type of Editor that will edit the component typepublic interface CompositeEditor<T,C,E extends Editor<? super C>> extends ValueAwareEditor<T>
For example, the ListEditor
type is a
CompositeEditor<List<T>, T, E extends Editor<T>>
; that
is, ListEditor will accept a List<T> and will edit some unknown number of
T
's using the Editor type E
. Another example might
be:
class WorkgroupEditor implements CompositeEditor<Workgroup, Person, PersonSummaryEditor>{ public void setValue(Workgroup workgroup) { // Assuming Workgroup implements Iterable<Person> for (Person p : workgroup) { PersonSummaryEditor editor = new PersonSummaryEditor(); // Attach editor to DOM somePanel.add(editor); // Let the generated code drive the sub-editor editorChain.attach(p, editor); } } }
Modifier and Type | Interface and Description |
---|---|
static interface |
CompositeEditor.EditorChain<C,E extends Editor<? super C>>
Allows instances of the component type to be attached to the Editor
framework.
|
Editor.Ignore, Editor.Path
Modifier and Type | Method and Description |
---|---|
E |
createEditorForTraversal()
Returns an canonical sub-editor instance that will be used by the driver
for computing all edited paths.
|
String |
getPathElement(E subEditor)
Used to implement
EditorDelegate.getPath() for the component
Editors. |
void |
setEditorChain(CompositeEditor.EditorChain<C,E> chain)
Called by the Editor framework to provide the
CompositeEditor.EditorChain . |
flush, onPropertyChange, setValue
setDelegate
E createEditorForTraversal()
String getPathElement(E subEditor)
EditorDelegate.getPath()
for the component
Editors.subEditor
- an instance of the Editor type previously passed into
CompositeEditor.EditorChain.attach(C, E)
void setEditorChain(CompositeEditor.EditorChain<C,E> chain)
CompositeEditor.EditorChain
.chain
- an CompositeEditor.EditorChain
instanceCopyright © 2018. All rights reserved.