@Test public void testSetValue() { final DataColumnDef col1 = mock(DataColumnDef.class); when(col1.getId()).thenReturn("col1"); when(col1.getColumnType()).thenReturn(ColumnType.LABEL); presenter.setValue(col1); verify(columnType, times(1)).setEntries(any(Collection.class)); verify(columnType, times(0)).isEditMode(anyBoolean()); verify(columnType, times(1)).setHelpContent(anyString(), anyString(), any(Placement.class)); verify(columnType, times(0)).setImageSize(anyString(), anyString()); }
@Override public void setValue(final DataColumnDef value) { final ColumnType ct = originalColumnType != null ? originalColumnType : (value != null ? value.getColumnType() : null); String columnTypeDescr = getColumnTypeDescription(ct); final Collection<ImageListEditor<ColumnType>.Entry> acceptableEntries = getAcceptableEntries(ct); columnType.setEntries(acceptableEntries); columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(), columnTypeDescr, Placement.RIGHT); }
ColumnTypeEditor implements IsWidget,
                                         org.dashbuilder.dataset.client.editor.ColumnTypeEditor { @Override public void setValue(final DataColumnDef value) { final ColumnType ct = originalColumnType != null ? originalColumnType : (value != null ? value.getColumnType() : null); String columnTypeDescr = getColumnTypeDescription(ct); final Collection<ImageListEditor<ColumnType>.Entry> acceptableEntries = getAcceptableEntries(ct); columnType.setEntries(acceptableEntries); columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(), columnTypeDescr, Placement.RIGHT); } }
ColumnTypeEditor implements IsWidget,
                                         org.dashbuilder.dataset.client.editor.ColumnTypeEditor { @Override public void setValue(final DataColumnDef value) { final ColumnType ct = originalColumnType != null ? originalColumnType : (value != null ? value.getColumnType() : null); String columnTypeDescr = getColumnTypeDescription(ct); final Collection<ImageListEditor<ColumnType>.Entry> acceptableEntries = getAcceptableEntries(ct); columnType.setEntries(acceptableEntries); columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(), columnTypeDescr, Placement.RIGHT); } @Inject  ColumnTypeEditor(final DropDownImageListEditor<ColumnType> columnType); }
ColumnTypeEditor implements IsWidget,
                                         org.dashbuilder.dataset.client.editor.ColumnTypeEditor { @Override public void setValue(final DataColumnDef value) { final ColumnType ct = originalColumnType != null ? originalColumnType : (value != null ? value.getColumnType() : null); String columnTypeDescr = getColumnTypeDescription(ct); final Collection<ImageListEditor<ColumnType>.Entry> acceptableEntries = getAcceptableEntries(ct); columnType.setEntries(acceptableEntries); columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(), columnTypeDescr, Placement.RIGHT); } @Inject  ColumnTypeEditor(final DropDownImageListEditor<ColumnType> columnType); @PostConstruct void init(); @Override Widget asWidget(); void addHelpContent(final String title,
                               final String content,
                               final Placement placement); @Override void setOriginalColumnType(final ColumnType columnType); @Override DropDownImageListEditor<ColumnType> columnType(); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final DataColumnDef value); @Override void setDelegate(final EditorDelegate<DataColumnDef> delegate); @Override void isEditMode(final boolean isEdit); }
ColumnTypeEditor implements IsWidget,
                                         org.dashbuilder.dataset.client.editor.ColumnTypeEditor { @Override public void setValue(final DataColumnDef value) { final ColumnType ct = originalColumnType != null ? originalColumnType : (value != null ? value.getColumnType() : null); String columnTypeDescr = getColumnTypeDescription(ct); final Collection<ImageListEditor<ColumnType>.Entry> acceptableEntries = getAcceptableEntries(ct); columnType.setEntries(acceptableEntries); columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(), columnTypeDescr, Placement.RIGHT); } @Inject  ColumnTypeEditor(final DropDownImageListEditor<ColumnType> columnType); @PostConstruct void init(); @Override Widget asWidget(); void addHelpContent(final String title,
                               final String content,
                               final Placement placement); @Override void setOriginalColumnType(final ColumnType columnType); @Override DropDownImageListEditor<ColumnType> columnType(); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final DataColumnDef value); @Override void setDelegate(final EditorDelegate<DataColumnDef> delegate); @Override void isEditMode(final boolean isEdit);  }