@Test public void testSetAcceptableValues() { final List<DataColumnDef> acceptableValues = buildAcceptableValues(); presenter.setAcceptableValues(acceptableValues); verify(dataColumnDefEditor, times(1)).isEditMode(false); verify(dataColumnDefDriver, times(1)).initialize(dataColumnDefEditor); verify(dataColumnDefDriver, times(1)).edit(col1); verify(view, times(1)).clear(); verify(view, times(1)).insert(anyInt(), any(DataColumnDefEditor.View.class), anyBoolean(), anyBoolean(), anyString()); verify(view, times(0)).init(presenter); verify(view, times(0)).remove(anyInt()); }
@Override public void setAcceptableValues(final List<DataColumnDef> acceptableValues) { clear(); this.acceptableColumns = new LinkedList<DataColumnDef>(acceptableValues); int index = 0; for (final DataColumnDef columnDef : this.acceptableColumns ) { org.dashbuilder.client.widgets.dataset.editor.column.DataColumnDefEditor editor = createDummyColumnEditor(columnDef); view.insert(index, editor.view, false, true, null); index++; } }
ColumnListEditor implements IsWidget, org.dashbuilder.dataset.client.editor.ColumnListEditor { @Override public void setAcceptableValues(final List<DataColumnDef> acceptableValues) { clear(); this.acceptableColumns = new LinkedList<DataColumnDef>(acceptableValues); int index = 0; for (final DataColumnDef columnDef : this.acceptableColumns ) { org.dashbuilder.client.widgets.dataset.editor.column.DataColumnDefEditor editor = createDummyColumnEditor(columnDef); view.insert(index, editor.view, false, true, null); index++; } } }
ColumnListEditor implements IsWidget, org.dashbuilder.dataset.client.editor.ColumnListEditor { @Override public void setAcceptableValues(final List<DataColumnDef> acceptableValues) { clear(); this.acceptableColumns = new LinkedList<DataColumnDef>(acceptableValues); int index = 0; for (final DataColumnDef columnDef : this.acceptableColumns ) { org.dashbuilder.client.widgets.dataset.editor.column.DataColumnDefEditor editor = createDummyColumnEditor(columnDef); view.insert(index, editor.view, false, true, null); index++; } } @Inject  ColumnListEditor(final SyncBeanManager beanManager,
                            final DataColumnDefDriver dataColumnDefDriver,
                            final Event<ColumnsChangedEvent> columnsChangedEvent,
                            final View view); }
ColumnListEditor implements IsWidget, org.dashbuilder.dataset.client.editor.ColumnListEditor { @Override public void setAcceptableValues(final List<DataColumnDef> acceptableValues) { clear(); this.acceptableColumns = new LinkedList<DataColumnDef>(acceptableValues); int index = 0; for (final DataColumnDef columnDef : this.acceptableColumns ) { org.dashbuilder.client.widgets.dataset.editor.column.DataColumnDefEditor editor = createDummyColumnEditor(columnDef); view.insert(index, editor.view, false, true, null); index++; } } @Inject  ColumnListEditor(final SyncBeanManager beanManager,
                            final DataColumnDefDriver dataColumnDefDriver,
                            final Event<ColumnsChangedEvent> columnsChangedEvent,
                            final View view); @PostConstruct void init(); @Override Widget asWidget(); @Override void setAcceptableValues(final List<DataColumnDef> acceptableValues); @Override void onValueRestricted(final String value); @Override void onValueUnRestricted(final String value); @Override void setProviderType(final DataSetProviderType type); void clear(); @Override DataColumnDefEditor createEditorForTraversal(); @Override String getPathElement(final DataColumnDefEditor subEditor); @Override void setEditorChain(final EditorChain<DataColumnDef, DataColumnDefEditor> chain); @Override void setDelegate(final EditorDelegate<List<DataColumnDef>> delegate); @Override void showErrors(final List<EditorError> errors); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final List<DataColumnDef> value); }
ColumnListEditor implements IsWidget, org.dashbuilder.dataset.client.editor.ColumnListEditor { @Override public void setAcceptableValues(final List<DataColumnDef> acceptableValues) { clear(); this.acceptableColumns = new LinkedList<DataColumnDef>(acceptableValues); int index = 0; for (final DataColumnDef columnDef : this.acceptableColumns ) { org.dashbuilder.client.widgets.dataset.editor.column.DataColumnDefEditor editor = createDummyColumnEditor(columnDef); view.insert(index, editor.view, false, true, null); index++; } } @Inject  ColumnListEditor(final SyncBeanManager beanManager,
                            final DataColumnDefDriver dataColumnDefDriver,
                            final Event<ColumnsChangedEvent> columnsChangedEvent,
                            final View view); @PostConstruct void init(); @Override Widget asWidget(); @Override void setAcceptableValues(final List<DataColumnDef> acceptableValues); @Override void onValueRestricted(final String value); @Override void onValueUnRestricted(final String value); @Override void setProviderType(final DataSetProviderType type); void clear(); @Override DataColumnDefEditor createEditorForTraversal(); @Override String getPathElement(final DataColumnDefEditor subEditor); @Override void setEditorChain(final EditorChain<DataColumnDef, DataColumnDefEditor> chain); @Override void setDelegate(final EditorDelegate<List<DataColumnDef>> delegate); @Override void showErrors(final List<EditorError> errors); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final List<DataColumnDef> value); public View view; }