@Override public <T> void endVisit(EditorContext<T> ctx) { LeafValueEditor<T> editor = ctx.asLeafValueEditor(); if (editor != null) { leafValues.put(editor, editor.getValue()); } @SuppressWarnings("unchecked") AbstractEditorDelegate<T, ?> delegate = (AbstractEditorDelegate<T, ?>) ctx.getEditorDelegate(); if (delegate != null) { dirty |= delegate.isDirty(); } }
@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
private void flushCheckBoxes(EntityModelValueCheckBoxEditor<ConsoleModel>... checkBoxes) { for (EntityModelValueCheckBoxEditor<ConsoleModel> checkBox : checkBoxes) { checkBox.asEditor().getSubEditor().getValue(); } }
@Override public <T> void endVisit(EditorContext<T> ctx) { LeafValueEditor<T> editor = ctx.asLeafValueEditor(); if (editor != null) { leafValues.put(editor, editor.getValue()); } @SuppressWarnings("unchecked") AbstractEditorDelegate<T, ?> delegate = (AbstractEditorDelegate<T, ?>) ctx.getEditorDelegate(); if (delegate != null) { dirty |= delegate.isDirty(); } }
@Override public <T> void endVisit(EditorContext<T> ctx) { LeafValueEditor<T> editor = ctx.asLeafValueEditor(); if (editor != null) { leafValues.put(editor, editor.getValue()); } @SuppressWarnings("unchecked") AbstractEditorDelegate<T, ?> delegate = (AbstractEditorDelegate<T, ?>) ctx.getEditorDelegate(); if (delegate != null) { dirty |= delegate.isDirty(); } }
@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
setInModel(ctx, editor, editor.getValue());