コード例 #1
0
  @Override
  public void undo() throws CannotUndoException {
    super.undo();

    if (imageEdit != null) {
      imageEdit.undo();
    }
    if (translationEdit != null) {
      translationEdit.undo();
    }
    // it is important to undo the canvas change edit
    // after the image and translation edits because
    // of the image covers canvas checks
    if (canvasChangeEdit != null) {
      canvasChangeEdit.undo();
    }
    if (selectionChangeEdit != null) {
      selectionChangeEdit.undo();
    }
    if (deselectEdit != null) {
      deselectEdit.undo();
    }

    updateGUI();
  }
コード例 #2
0
  @Override
  public void die() {
    super.die();

    if (imageEdit != null) {
      imageEdit.die();
    }
    if (translationEdit != null) {
      translationEdit.die();
    }
    if (canvasChangeEdit != null) {
      canvasChangeEdit.die();
    }
    if (selectionChangeEdit != null) {
      selectionChangeEdit.die();
    }
    if (deselectEdit != null) {
      deselectEdit.die();
    }
  }