Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.editor.client.adapters
Class EditorSource<E extends Editor<?>>

    java.lang.Object
      com.google.gwt.editor.client.adapters.EditorSource<E>

Type Parameters:
  `E` - the type of Editor required

Direct Known Subclasses:
  FakeEditorSource, HasDataEditor.HasDataEditorSource

    public abstract class EditorSource<E extends Editor<?>>

extends java.lang.Object

An entity capable of creating and destroying instances of Editors. This type is used by Editors which operate on ordered data, such as `ListEditor`.

See Also:
  `FakeEditorSource`

Constructor Summary
`EditorSource()`

Method Summary
`abstract E` | `create(int index)` Create a new Editor.
`java.util.List<E>` | `create(int count, int index)` Create multiple Editors.
`E` | `createEditorForTraversal()` Creates a temporary sub-Editor to use for traversal.
`void` | `dispose(E subEditor)` Called when an Editor no longer requires a sub-Editor.
`void` | `setIndex(E editor, int index)` Re-order a sub-Editor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EditorSource

    public EditorSource()

Method Detail

### create

    public abstract E create(int index)

  Create a new Editor.

  Parameters:
    `index` - the position at which the new Editor should be displayed
  Returns:
    an `Editor` of type E

### create

    public java.util.List<E> create(int count,
                                    int index)

  Create multiple Editors. This method may be optionally overridden to provide a more efficient means of creating Editors in bulk.

  Parameters:
    `count` - the number of Editors desired
    `index` - the position at which the new Editors should be displayed
  Returns:
    a List of `Editor`s of type E

### createEditorForTraversal

    public E createEditorForTraversal()

  Creates a temporary sub-Editor to use for traversal.

  For backwards compatibility with GWT 2.5.0 and earlier, the default implementation calls `create(0)` and `disposes` the editor right away.

  Returns:
    an `Editor` of type E
  See Also:
    `ListEditor.createEditorForTraversal()`, `EditorContext.traverseSyntheticCompositeEditor(com.google.gwt.editor.client.EditorVisitor)`

### dispose

    public void dispose(E subEditor)

  Called when an Editor no longer requires a sub-Editor. The default implementation is a no-op.

  Parameters:
    `subEditor` - an `Editor` of type E

### setIndex

    public void setIndex(E editor,
                         int index)

  Re-order a sub-Editor. The default implementation is a no-op.

  Parameters:
    `editor` - an `Editor` of type E
    `index` - the index of the Editor

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD