Example usage for com.google.gwt.editor.client EditorContext getEditor

List of usage examples for com.google.gwt.editor.client EditorContext getEditor

Introduction

In this page you can find the example usage for com.google.gwt.editor.client EditorContext getEditor.

Prototype

Editor<T> getEditor();

Source Link

Document

Returns the associated Editor.

Usage

From source file:com.google.gwt.editor.client.testing.EditorHierarchyPrinter.java

License:Apache License

@Override
public <T> boolean visit(EditorContext<T> ctx) {
    println(ctx.getAbsolutePath());/*  w  w w  . j a  va  2s.  c om*/
    data(ctx.getEditedType().getName());
    data(ctx.getEditor().getClass().getName());
    data("Implements: " //
            + ctx.asCompositeEditor() == null ? ""
                    : "CompositeEditor " //
                            + ctx.asHasEditorDelegate() == null ? ""
                                    : "HasEditorDelegate " //
                                            + ctx.asHasEditorErrors() == null ? ""
                                                    : "HasEditorErrors " //
                                                            + ctx.asLeafValueEditor() == null
                                                                    ? ""
                                                                    : "LeafValueEditor " //
                                                                            + ctx.asValueAwareEditor() == null
                                                                                    ? ""
                                                                                    : "ValueAwareEditor ");
    level++;
    return true;
}

From source file:com.google.web.bindery.requestfactory.gwt.client.impl.Initializer.java

License:Apache License

@Override
public <T> boolean visit(EditorContext<T> ctx) {
    RequestFactoryEditorDelegate<?, ?> delegate = (RequestFactoryEditorDelegate<?, ?>) ctx.getEditorDelegate();
    if (delegate != null) {
        delegate.setRequestContext(request);
    }/*  ww w  .  j  a va2s .c o m*/
    Editor<T> editor = ctx.getEditor();
    if (editor instanceof HasRequestContext) {
        ((HasRequestContext<T>) editor).setRequestContext(request);
    }

    return super.visit(ctx);
}

From source file:de.csenk.gwt.commons.editor.client.AutoFlushInitializer.java

License:Apache License

/**
 * {@inheritDoc}/* ww w . j  a va2s . c  o m*/
 */
@Override
public <Q> boolean visit(EditorContext<Q> ctx) {
    final HasValueChangeHandlers<Q> editor = asHasValueChangeHandlers(ctx.getEditor());
    if (editor != null) {
        handlerRegistrations.add(editor.addValueChangeHandler(createValueChangeHandler(ctx)));
    }

    return super.visit(ctx);
}