Examples of UndoableEdit


Examples of javax.swing.undo.UndoableEdit

      final boolean movable = furnitureGroup.isMovable();
     
      doGroupFurniture(groupPieces, new HomeFurnitureGroup [] {furnitureGroup},
          new int [] {furnitureGroupIndex}, basePlanLocked);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
            @Override
            public void undo() throws CannotUndoException {
              super.undo();
              doUngroupFurniture(groupPieces, groupPiecesIndex,
                  new HomeFurnitureGroup [] {furnitureGroup}, basePlanLocked);
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

     
      final boolean newBasePlanLocked = basePlanLocked;

      doUngroupFurniture(groupPieces, groupPiecesIndex, furnitureGroups, newBasePlanLocked);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
            @Override
            public void undo() throws CannotUndoException {
              super.undo();
              doGroupFurniture(groupPieces, furnitureGroups, furnitureGroupsIndex, oldBasePlanLocked);
              home.setSelectedItems(oldSelection);
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      final HomePieceOfFurniture leadPiece = this.leadSelectedPieceOfFurniture;
      final AlignedPieceOfFurniture [] alignedFurniture =
          AlignedPieceOfFurniture.getAlignedFurniture(selectedFurniture, leadPiece, false);
      doAlignFurnitureOnTop(alignedFurniture, leadPiece);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
          @Override
          public void undo() throws CannotUndoException {
            super.undo();
            undoAlignFurniture(alignedFurniture, false);
          }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      final HomePieceOfFurniture leadPiece = this.leadSelectedPieceOfFurniture;
      final AlignedPieceOfFurniture [] alignedFurniture =
          AlignedPieceOfFurniture.getAlignedFurniture(selectedFurniture, leadPiece, false);
      doAlignFurnitureOnBottom(alignedFurniture, leadPiece);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
          @Override
          public void undo() throws CannotUndoException {
            super.undo();
            undoAlignFurniture(alignedFurniture, false);
          }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      final HomePieceOfFurniture leadPiece = this.leadSelectedPieceOfFurniture;
      final AlignedPieceOfFurniture [] alignedFurniture =
          AlignedPieceOfFurniture.getAlignedFurniture(selectedFurniture, leadPiece, true);
      doAlignFurnitureOnLeft(alignedFurniture, leadPiece);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
          @Override
          public void undo() throws CannotUndoException {
            super.undo();
            undoAlignFurniture(alignedFurniture, true);
          }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      final HomePieceOfFurniture leadPiece = this.leadSelectedPieceOfFurniture;
      final AlignedPieceOfFurniture [] alignedFurniture =
          AlignedPieceOfFurniture.getAlignedFurniture(selectedFurniture, leadPiece, true);
      doAlignFurnitureOnRight(alignedFurniture, leadPiece);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new AbstractUndoableEdit() {
          @Override
          public void undo() throws CannotUndoException {
            super.undo();
            undoAlignFurniture(alignedFurniture, true);
          }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      Label label = new Label(text, x, y);
      // Unlock base plan if label is a part of it
      boolean newBasePlanLocked = basePlanLocked && !isLabelPartOfBasePlan(label);
      doAddLabel(this.home, label, newBasePlanLocked);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new LabelCreationUndoableEdit(
            this.home, this.preferences, oldSelection, basePlanLocked, label, newBasePlanLocked);
        this.undoSupport.postEdit(undoableEdit);
      }
    }
  }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

        modifiedLabels [i] = new ModifiedLabel(selectedLabels.get(i));
      }
      // Apply modification
      doModifyLabels(modifiedLabels, text);
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new LabelModificationUndoableEdit(this.home,
            this.preferences, oldSelection, modifiedLabels, text);
        this.undoSupport.postEdit(undoableEdit);
      }
    }
  }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

    int pieceIndex = this.home.getFurniture().size();
   
    this.home.addPieceOfFurniture(piece, pieceIndex);
    this.home.setSelectedItems(Arrays.asList(piece));
    if (this.undoSupport != null) {
      UndoableEdit undoableEdit = new PieceOfFurnitureImportationUndoableEdit(
          this.home, this.preferences, oldSelection, piece, pieceIndex);
      this.undoSupport.postEdit(undoableEdit);
    }
  }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

    boolean visible = isVisible();
    float northDirection = (float)Math.toRadians(getNorthDirectionInDegrees());
    float latitude = (float)Math.toRadians(getLatitudeInDegrees());
    float longitude = (float)Math.toRadians(getLongitudeInDegrees());
    String timeZone = getTimeZone();
    UndoableEdit undoableEdit =
        new CompassUndoableEdit(this.home.getCompass(), this.preferences,
            x, y, diameter, visible, northDirection, latitude, longitude, timeZone);
    doModifyCompass(this.home.getCompass(), x, y, diameter, visible, northDirection, latitude, longitude, timeZone);
    this.undoSupport.postEdit(undoableEdit);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.