Package javax.swing.undo

Examples of javax.swing.undo.AbstractUndoableEdit


  /**
   * Toggles visibility of the background image and posts an undoable operation.
   */
  private void toggleBackgroundImageVisibility(final String presentationName) {
    doToggleBackgroundImageVisibility();
    UndoableEdit undoableEdit = new AbstractUndoableEdit() {
      @Override
      public void undo() throws CannotUndoException {
        super.undo();
        doToggleBackgroundImageVisibility();
      }
View Full Code Here


   * Deletes home background image and posts and posts an undoable operation.
   */
  public void deleteBackgroundImage() {
    final BackgroundImage oldImage = this.home.getBackgroundImage();
    this.home.setBackgroundImage(null);
    UndoableEdit undoableEdit = new AbstractUndoableEdit() {
      @Override
      public void undo() throws CannotUndoException {
        super.undo();
        home.setBackgroundImage(oldImage);
      }
View Full Code Here

   
    final boolean newBasePlanLocked = basePlanLocked;
   
    doAddFurniture(newFurniture, furnitureIndex, newBasePlanLocked);
    if (this.undoSupport != null) {
      UndoableEdit undoableEdit = new AbstractUndoableEdit() {
        @Override
        public void undo() throws CannotUndoException {
          super.undo();
          doDeleteFurniture(newFurniture, oldBasePlanLocked);
          home.setSelectedItems(oldSelection);
View Full Code Here

    for (int index : sortedMap.keySet()) {
      furnitureIndex [i++] = index;
    }
    doDeleteFurniture(furniture, basePlanLocked);
    if (this.undoSupport != null) {
      UndoableEdit undoableEdit = new AbstractUndoableEdit() {
        @Override
        public void undo() throws CannotUndoException {
          super.undo();
          doAddFurniture(furniture, furnitureIndex, basePlanLocked);
        }
View Full Code Here

      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

     
      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

      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

      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

      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

      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

TOP

Related Classes of javax.swing.undo.AbstractUndoableEdit

Copyright © 2018 www.massapicom. 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.