@Test public void testCanvasCommandAllow() { setupCommand(0, uiModel.getColumns().get(0)); final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.allow(handler)); }
@Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(index, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(oldIndex, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; }
MoveColumnsCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                              VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(index, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(oldIndex, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } }
MoveColumnsCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                              VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(index, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(oldIndex, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } MoveColumnsCommand(final Relation relation,
                              final DMNGridData uiModel,
                              final int index,
                              final java.util.List<GridColumn<?>> columns,
                              final org.uberfire.mvp.Command canvasOperation); }
MoveColumnsCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                              VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(index, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(oldIndex, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } MoveColumnsCommand(final Relation relation,
                              final DMNGridData uiModel,
                              final int index,
                              final java.util.List<GridColumn<?>> columns,
                              final org.uberfire.mvp.Command canvasOperation); void updateParentInformation(); }
MoveColumnsCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                              VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(index, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { uiModel.moveColumnsTo(oldIndex, columns); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } MoveColumnsCommand(final Relation relation,
                              final DMNGridData uiModel,
                              final int index,
                              final java.util.List<GridColumn<?>> columns,
                              final org.uberfire.mvp.Command canvasOperation); void updateParentInformation();  }