@Test public void testRemoveDecisionTableWhenNotPinned() { final Command callback = mock(Command.class); view.removeDecisionTable(dtableView, callback); verify(callback, times(1)).execute(); }
@Override public void removeDecisionTable(final GuidedDecisionTableView gridWidget, final Command afterRemovalCommand) { if (gridWidget == null) { return; } final Command remove = () -> { gridLayer.remove(gridWidget); afterRemovalCommand.execute(); gridLayer.batch(); }; if (gridLayer.isGridPinned()) { final GridPinnedModeManager.PinnedContext context = gridLayer.getPinnedContext(); if (gridWidget.equals(context.getGridWidget())) { gridLayer.exitPinnedMode(remove); } } else { remove.execute(); } }
GuidedDecisionTableModellerViewImpl extends Composite implements GuidedDecisionTableModellerView { @Override public void removeDecisionTable(final GuidedDecisionTableView gridWidget, final Command afterRemovalCommand) { if (gridWidget == null) { return; } final Command remove = () -> { gridLayer.remove(gridWidget); afterRemovalCommand.execute(); gridLayer.batch(); }; if (gridLayer.isGridPinned()) { final GridPinnedModeManager.PinnedContext context = gridLayer.getPinnedContext(); if (gridWidget.equals(context.getGridWidget())) { gridLayer.exitPinnedMode(remove); } } else { remove.execute(); } } }
GuidedDecisionTableModellerViewImpl extends Composite implements GuidedDecisionTableModellerView { @Override public void removeDecisionTable(final GuidedDecisionTableView gridWidget, final Command afterRemovalCommand) { if (gridWidget == null) { return; } final Command remove = () -> { gridLayer.remove(gridWidget); afterRemovalCommand.execute(); gridLayer.batch(); }; if (gridLayer.isGridPinned()) { final GridPinnedModeManager.PinnedContext context = gridLayer.getPinnedContext(); if (gridWidget.equals(context.getGridWidget())) { gridLayer.exitPinnedMode(remove); } } else { remove.execute(); } } GuidedDecisionTableModellerViewImpl(); @Inject  GuidedDecisionTableModellerViewImpl(final TranslationService translationService); }
GuidedDecisionTableModellerViewImpl extends Composite implements GuidedDecisionTableModellerView { @Override public void removeDecisionTable(final GuidedDecisionTableView gridWidget, final Command afterRemovalCommand) { if (gridWidget == null) { return; } final Command remove = () -> { gridLayer.remove(gridWidget); afterRemovalCommand.execute(); gridLayer.batch(); }; if (gridLayer.isGridPinned()) { final GridPinnedModeManager.PinnedContext context = gridLayer.getPinnedContext(); if (gridWidget.equals(context.getGridWidget())) { gridLayer.exitPinnedMode(remove); } } else { remove.execute(); } } GuidedDecisionTableModellerViewImpl(); @Inject  GuidedDecisionTableModellerViewImpl(final TranslationService translationService); @Override void init(final GuidedDecisionTableModellerView.Presenter presenter); @PostConstruct void setup(); @Override void onResize(); @Override HandlerRegistration addKeyDownHandler(final KeyDownHandler handler); @Override HandlerRegistration addContextMenuHandler(final ContextMenuHandler handler); @Override HandlerRegistration addMouseDownHandler(final MouseDownHandler handler); @Override void clear(); @Override void addDecisionTable(final GuidedDecisionTableView gridWidget); @Override void removeDecisionTable(final GuidedDecisionTableView gridWidget,
                                    final Command afterRemovalCommand); @Override void refreshScrollPosition(); @Override void setZoom(final int zoom); @Override GridLayer getGridLayerView(); @Override GridLienzoPanel getGridPanel(); @Override Bounds getBounds(); @Override void select(final GridWidget selectedGridWidget); @Override void selectLinkedColumn(final GridColumn<?> link); @Override Set<GridWidget> getGridWidgets(); @Override void setPinnedModeIndicatorVisibility(final boolean visibility, final double headerCaptionWidth); @Override void showGenericVetoMessage(); @Override void showUnableToDeleteColumnMessage(final ConditionCol52 column); @Override void showUnableToDeleteColumnMessage(final ActionCol52 column); }
GuidedDecisionTableModellerViewImpl extends Composite implements GuidedDecisionTableModellerView { @Override public void removeDecisionTable(final GuidedDecisionTableView gridWidget, final Command afterRemovalCommand) { if (gridWidget == null) { return; } final Command remove = () -> { gridLayer.remove(gridWidget); afterRemovalCommand.execute(); gridLayer.batch(); }; if (gridLayer.isGridPinned()) { final GridPinnedModeManager.PinnedContext context = gridLayer.getPinnedContext(); if (gridWidget.equals(context.getGridWidget())) { gridLayer.exitPinnedMode(remove); } } else { remove.execute(); } } GuidedDecisionTableModellerViewImpl(); @Inject  GuidedDecisionTableModellerViewImpl(final TranslationService translationService); @Override void init(final GuidedDecisionTableModellerView.Presenter presenter); @PostConstruct void setup(); @Override void onResize(); @Override HandlerRegistration addKeyDownHandler(final KeyDownHandler handler); @Override HandlerRegistration addContextMenuHandler(final ContextMenuHandler handler); @Override HandlerRegistration addMouseDownHandler(final MouseDownHandler handler); @Override void clear(); @Override void addDecisionTable(final GuidedDecisionTableView gridWidget); @Override void removeDecisionTable(final GuidedDecisionTableView gridWidget,
                                    final Command afterRemovalCommand); @Override void refreshScrollPosition(); @Override void setZoom(final int zoom); @Override GridLayer getGridLayerView(); @Override GridLienzoPanel getGridPanel(); @Override Bounds getBounds(); @Override void select(final GridWidget selectedGridWidget); @Override void selectLinkedColumn(final GridColumn<?> link); @Override Set<GridWidget> getGridWidgets(); @Override void setPinnedModeIndicatorVisibility(final boolean visibility, final double headerCaptionWidth); @Override void showGenericVetoMessage(); @Override void showUnableToDeleteColumnMessage(final ConditionCol52 column); @Override void showUnableToDeleteColumnMessage(final ActionCol52 column);  }