@Override @SuppressWarnings("unchecked") public void setInModel(T data) { ((AbstractEditorDelegate<T, ?>) getEditorDelegate()).setObject(data); } }
protected void doEdit(T object) { checkEditor(); object = delegate.ensureMutable(object); this.object = object; delegate.setObject(object); accept(createInitializerVisitor()); DirtCollector c = new DirtCollector(); accept(c); leafValueMap = c.getLeafValues(); }
@Override public <Q> boolean visit(EditorContext<Q> ctx) { Q toSet = ctx.getFromModel(); @SuppressWarnings("unchecked") AbstractEditorDelegate<Q, ?> delegate = (AbstractEditorDelegate<Q, ?>) ctx.getEditorDelegate(); if (delegate != null) { delegate.setObject(delegate.ensureMutable(toSet)); delegate.setDirty(false); } ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); if (asValue != null) { // Call setValue for ValueAware, non-leaf editors asValue.setValue(toSet); } else { LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (asLeaf != null) { // Call setvalue for LeafValueEditors. asLeaf.setValue(toSet); } } // CompositeEditor's setValue should create sub-editors and attach them to // the EditorChain, which will traverse them. Returning true here for a // CompositeEditor would then traverse it twice. See issue 7038. return ctx.asCompositeEditor() == null; } }
@Override @SuppressWarnings("unchecked") public void setInModel(T data) { ((AbstractEditorDelegate<T, ?>) getEditorDelegate()).setObject(data); } }
@Override @SuppressWarnings("unchecked") public void setInModel(T data) { ((AbstractEditorDelegate<T, ?>) getEditorDelegate()).setObject(data); } }
protected void doEdit(T object) { checkEditor(); object = delegate.ensureMutable(object); this.object = object; delegate.setObject(object); accept(createInitializerVisitor()); DirtCollector c = new DirtCollector(); accept(c); leafValueMap = c.getLeafValues(); }
protected void doEdit(T object) { checkEditor(); object = delegate.ensureMutable(object); this.object = object; delegate.setObject(object); accept(createInitializerVisitor()); DirtCollector c = new DirtCollector(); accept(c); leafValueMap = c.getLeafValues(); }
@Override public <Q> boolean visit(EditorContext<Q> ctx) { Q toSet = ctx.getFromModel(); @SuppressWarnings("unchecked") AbstractEditorDelegate<Q, ?> delegate = (AbstractEditorDelegate<Q, ?>) ctx.getEditorDelegate(); if (delegate != null) { delegate.setObject(delegate.ensureMutable(toSet)); delegate.setDirty(false); } ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); if (asValue != null) { // Call setValue for ValueAware, non-leaf editors asValue.setValue(toSet); } else { LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (asLeaf != null) { // Call setvalue for LeafValueEditors. asLeaf.setValue(toSet); } } // CompositeEditor's setValue should create sub-editors and attach them to // the EditorChain, which will traverse them. Returning true here for a // CompositeEditor would then traverse it twice. See issue 7038. return ctx.asCompositeEditor() == null; } }
@Override public <Q> boolean visit(EditorContext<Q> ctx) { Q toSet = ctx.getFromModel(); @SuppressWarnings("unchecked") AbstractEditorDelegate<Q, ?> delegate = (AbstractEditorDelegate<Q, ?>) ctx.getEditorDelegate(); if (delegate != null) { delegate.setObject(delegate.ensureMutable(toSet)); delegate.setDirty(false); } ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); if (asValue != null) { // Call setValue for ValueAware, non-leaf editors asValue.setValue(toSet); } else { LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (asLeaf != null) { // Call setvalue for LeafValueEditors. asLeaf.setValue(toSet); } } // CompositeEditor's setValue should create sub-editors and attach them to // the EditorChain, which will traverse them. Returning true here for a // CompositeEditor would then traverse it twice. See issue 7038. return ctx.asCompositeEditor() == null; } }