@Test public void testMoveRowsTo() { uiModel.moveRowsTo(0, Collections.singletonList(gridRow)); verify(sessionCommandManager).execute(eq(canvasHandler), any(MoveRowsCommand.class)); }
@Override public void moveRowsTo(final int index, final List<GridRow> rows) { expression.get().ifPresent(invocation -> { final AbstractCanvasHandler handler = (AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(); sessionCommandManager.execute(handler, new MoveRowsCommand(invocation, delegate, index, rows, canvasOperation)); }); }
InvocationGridData extends DelegatingGridData { @Override public void moveRowsTo(final int index, final List<GridRow> rows) { expression.get().ifPresent(invocation -> { final AbstractCanvasHandler handler = (AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(); sessionCommandManager.execute(handler, new MoveRowsCommand(invocation, delegate, index, rows, canvasOperation)); }); } }
InvocationGridData extends DelegatingGridData { @Override public void moveRowsTo(final int index, final List<GridRow> rows) { expression.get().ifPresent(invocation -> { final AbstractCanvasHandler handler = (AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(); sessionCommandManager.execute(handler, new MoveRowsCommand(invocation, delegate, index, rows, canvasOperation)); }); } InvocationGridData(final DMNGridData delegate,
                              final SessionManager sessionManager,
                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                              final Supplier<Optional<Invocation>> expression,
                              final Command canvasOperation); }
InvocationGridData extends DelegatingGridData { @Override public void moveRowsTo(final int index, final List<GridRow> rows) { expression.get().ifPresent(invocation -> { final AbstractCanvasHandler handler = (AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(); sessionCommandManager.execute(handler, new MoveRowsCommand(invocation, delegate, index, rows, canvasOperation)); }); } InvocationGridData(final DMNGridData delegate,
                              final SessionManager sessionManager,
                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                              final Supplier<Optional<Invocation>> expression,
                              final Command canvasOperation); @Override void moveRowTo(final int index,
                          final GridRow row); @Override void moveRowsTo(final int index,
                           final List<GridRow> rows); }
InvocationGridData extends DelegatingGridData { @Override public void moveRowsTo(final int index, final List<GridRow> rows) { expression.get().ifPresent(invocation -> { final AbstractCanvasHandler handler = (AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(); sessionCommandManager.execute(handler, new MoveRowsCommand(invocation, delegate, index, rows, canvasOperation)); }); } InvocationGridData(final DMNGridData delegate,
                              final SessionManager sessionManager,
                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                              final Supplier<Optional<Invocation>> expression,
                              final Command canvasOperation); @Override void moveRowTo(final int index,
                          final GridRow row); @Override void moveRowsTo(final int index,
                           final List<GridRow> rows);  }