List of usage examples for com.google.gwt.editor.client EditorContext asValueAwareEditor
ValueAwareEditor<T> asValueAwareEditor();
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());/* www . j a va2 s . 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:de.csenk.gwt.commons.editor.client.AutoFlushInitializer.java
License:Apache License
/** * @see com.google.gwt.editor.client.impl.Flusher.endVisit(EditorContext<Q> ctx) * @param ctx/*from w w w.j ava 2 s.c o m*/ */ protected <Q> void flush(EditorContext<Q> ctx) { // Flush ValueAware editors final ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); if (asValue != null) { asValue.flush(); } // Pull value from LeafValueEditors and update edited object final LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
From source file:de.csenk.gwt.commons.editor.client.PathFlusher.java
License:Apache License
/** * @see com.google.gwt.editor.client.impl.Flusher.endVisit(EditorContext<Q> ctx) * @param ctx//from w ww .j a va 2s . com */ private <Q> void flush(EditorContext<Q> ctx) { // Flush ValueAware editors final ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); if (asValue != null) { asValue.flush(); } // Pull value from LeafValueEditors and update edited object final LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }