use of org.drools.workbench.screens.guided.dtable.client.editor.clipboard.impl.DefaultClipboard in project drools-wb by kiegroup.
the class CellContextMenuTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() {
model = new GuidedDecisionTable52();
uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
clipboard = new DefaultClipboard();
when(dtPresenter.getView()).thenReturn(dtPresenterView);
when(dtPresenter.getAccess()).thenReturn(access);
when(dtPresenterView.getModel()).thenReturn(uiModel);
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendRow(new BaseGridRow());
menu = spy(new CellContextMenu(view, clipboard));
menu.setup();
}
use of org.drools.workbench.screens.guided.dtable.client.editor.clipboard.impl.DefaultClipboard in project drools-wb by kiegroup.
the class EditMenuBuilderTest method setup.
@Before
public void setup() {
model = new GuidedDecisionTable52();
uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
clipboard = new DefaultClipboard();
final MenuItemFactory menuItemFactory = new MenuItemFactory(menuItemViewProducer);
when(dtPresenter.hasEditableColumns()).thenReturn(true);
when(dtPresenter.getView()).thenReturn(dtPresenterView);
when(dtPresenter.getModel()).thenReturn(model);
when(dtPresenter.getAccess()).thenReturn(access);
when(dtPresenterView.getModel()).thenReturn(uiModel);
when(ts.getTranslation(any(String.class))).thenReturn("i18n");
when(menuItemViewProducer.select(any(Annotation.class))).thenReturn(menuItemViewProducer);
when(menuItemViewProducer.get()).thenReturn(menuItemWithIconView);
when(menuItemWithIconView.getElement()).thenReturn(menuItemHTMLElement);
uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
uiModel.appendRow(new BaseGridRow());
builder = spy(new EditMenuBuilder(clipboard, ts, menuItemFactory, popoverUtils));
builder.setup();
}
use of org.drools.workbench.screens.guided.dtable.client.editor.clipboard.impl.DefaultClipboard in project drools-wb by kiegroup.
the class RowContextMenuTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() {
model = new GuidedDecisionTable52();
uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
clipboard = new DefaultClipboard();
when(dtPresenter.getView()).thenReturn(dtPresenterView);
when(dtPresenter.getAccess()).thenReturn(access);
when(dtPresenterView.getModel()).thenReturn(uiModel);
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class), mock(GridColumnRenderer.class), 100));
uiModel.appendRow(new BaseGridRow());
menu = spy(new RowContextMenu(view, clipboard));
menu.setup();
}
Aggregations