Class MergeAndUnmergeOperation

All Implemented Interfaces:
IBmPostUndoRedoHandler, IBmTask<Void>

public class MergeAndUnmergeOperation extends NotifyingOperation
Операция объединения ячеек / снятия объединения.
  • Constructor Details

    • MergeAndUnmergeOperation

      public MergeAndUnmergeOperation(String label, SheetAccessor sheet_, Selection selection_, boolean merge_, PositionHolder positionHolder, boolean nested)
      Parameters:
      label -
      undoContext -
      sheet_ -
  • Method Details

    • prepareRectForRemoveMerge

      public static void prepareRectForRemoveMerge(org.eclipse.swt.graphics.Rectangle mergeRect, SheetAccessor sheet)
      Prepare rectangle for removing merge
      Parameters:
      mergeRect -
      sheet -
    • execute

      public Void execute(IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: IBmTask

      The method called by the task executor with an active transaction. The method code must not commit or rollback the transaction.

      If the task is not supposed to return a result, then it may be parameterized with Void and return null.

      Parameters:
      transaction - The active transaction. May not be null.
      progressMonitor - The monitor to indicate the progress. May not be null.
      Returns:
      execution result, may be null.
    • postExecute

      protected void postExecute()
      Description copied from class: NotifyingOperation
      Subclasses override this method to provide post-execute logic.
      Overrides:
      postExecute in class NotifyingOperation
    • postUndo

      protected void postUndo()
      Description copied from class: NotifyingOperation
      Subclasses override this method to provide post-undo logic.
      Overrides:
      postUndo in class NotifyingOperation
    • postRedo

      protected void postRedo()
      Description copied from class: NotifyingOperation
      Subclasses override this method to provide post-redo logic.
      Overrides:
      postRedo in class NotifyingOperation