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

## com.google.gwt.editor.client
Interface EditorContext<T>

Type Parameters:
  `T` - The type of data edited by the Editor

All Known Implementing Classes:
  FakeEditorContext

    public interface EditorContext<T>

Describes an Editor within an Editor hierarchy.

See Also:
  `FakeEditorContext`

Field Summary
`static java.lang.String` | `ROOT_PATH`

Method Summary
`CompositeEditor<T,?,?>` | `asCompositeEditor()` Returns a non-null value if the editor returned by `getEditor()` implements `CompositeEditor`.
`HasEditorDelegate<T>` | `asHasEditorDelegate()` Returns a non-null value if the editor returned by `getEditor()` implements `HasEditorDelegate`.
`HasEditorErrors<T>` | `asHasEditorErrors()` Returns a non-null value if the editor returned by `getEditor()` implements `HasEditorErrors`.
`LeafValueEditor<T>` | `asLeafValueEditor()` Returns a non-null value if the editor returned by `getEditor()` implements `LeafValueEditor`.
`ValueAwareEditor<T>` | `asValueAwareEditor()` Returns a non-null value if the editor returned by `getEditor()` implements `ValueAwareEditor`.
`boolean` | `canSetInModel()` Returns `true` if `setInModel(Object)` can be called successfully.
`T` | `checkAssignment(java.lang.Object value)` Returns `value` cast to the type accepted by the Editor or throws a `ClassCastException`.
`java.lang.String` | `getAbsolutePath()` Returns the absolute path of the Editor within the hierarchy.
`java.lang.Class<T>` | `getEditedType()` Returns the `T` type.
`Editor<T>` | `getEditor()` Returns the associated Editor.
`EditorDelegate<T>` | `getEditorDelegate()` Returns the `EditorDelegate` associated with the current Editor, which may be `null` for `LeafValueEditors`.
`T` | `getFromModel()` Returns the value to be edited by the current editor.
`void` | `setInModel(T data)` Sets a new value in the data hierarchy being edited.
`void` | `traverseSyntheticCompositeEditor(EditorVisitor visitor)` Traverse an editor created by `CompositeEditor.createEditorForTraversal()` that reflects an uninitialized instance of a composite sub-editor.

Field Detail

### ROOT_PATH

    static final java.lang.String ROOT_PATH

See Also:
  Constant Field Values

Method Detail

### asCompositeEditor

    CompositeEditor<T,?,?> asCompositeEditor()

  Returns a non-null value if the editor returned by `getEditor()` implements `CompositeEditor`.

### asHasEditorDelegate

    HasEditorDelegate<T> asHasEditorDelegate()

  Returns a non-null value if the editor returned by `getEditor()` implements `HasEditorDelegate`.

### asHasEditorErrors

    HasEditorErrors<T> asHasEditorErrors()

  Returns a non-null value if the editor returned by `getEditor()` implements `HasEditorErrors`.

### asLeafValueEditor

    LeafValueEditor<T> asLeafValueEditor()

  Returns a non-null value if the editor returned by `getEditor()` implements `LeafValueEditor`.

### asValueAwareEditor

    ValueAwareEditor<T> asValueAwareEditor()

  Returns a non-null value if the editor returned by `getEditor()` implements `ValueAwareEditor`.

### canSetInModel

    boolean canSetInModel()

  Returns `true` if `setInModel(Object)` can be called successfully.

### checkAssignment

    T checkAssignment(java.lang.Object value)

  Returns `value` cast to the type accepted by the Editor or throws a `ClassCastException`.

  Parameters:
    `value` - any value, including `null`
  Returns:
    `value` cast to the `T` type
  Throws:
    `java.lang.ClassCastException` - if `` value is not assignable to the type `T`

### getAbsolutePath

    java.lang.String getAbsolutePath()

  Returns the absolute path of the Editor within the hierarchy. This method should be preferred to calling `getEditorDelegate().getPath()` becasue not all `LeafValueEditors` are guaranteed to have an associated delegate.

### getEditedType

    java.lang.Class<T> getEditedType()

  Returns the `T` type.

### getEditor

    Editor<T> getEditor()

  Returns the associated Editor.

### getEditorDelegate

    EditorDelegate<T> getEditorDelegate()

  Returns the `EditorDelegate` associated with the current Editor, which may be `null` for `LeafValueEditors`.

### getFromModel

    T getFromModel()

  Returns the value to be edited by the current editor.

### setInModel

    void setInModel(T data)

  Sets a new value in the data hierarchy being edited. The `checkAssignment(Object)` method may be used to avoid an unsafe generic cast.

### traverseSyntheticCompositeEditor

    void traverseSyntheticCompositeEditor(EditorVisitor visitor)

  Traverse an editor created by `CompositeEditor.createEditorForTraversal()` that reflects an uninitialized instance of a composite sub-editor. This can be used to examine the internal structure of a `CompositeEditor` even if there are no data elements being edited by that editor.

  Throws:
    `java.lang.IllegalStateException` - if the current Editor is not a CompositeEditor

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