Examples of UndoableEdit


Examples of javax.swing.undo.UndoableEdit

   */
  private void postCompassResize(final Compass compass,
                                 final float oldDiameter) {
    final float newDiameter = compass.getDiameter();
    if (newDiameter != oldDiameter) {
      UndoableEdit undoableEdit = new AbstractUndoableEdit() {     
        @Override
        public void undo() throws CannotUndoException {
          super.undo();
          compass.setDiameter(oldDiameter);
          selectAndShowItems(Arrays.asList(new Compass [] {compass}));
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      doModifyWalls(modifiedWalls, xStart, yStart, xEnd, yEnd,
          leftSideColor, leftSideTexture, leftSideShininess,
          rightSideColor, rightSideTexture, rightSideShininess,
          height, heightAtEnd, thickness, arcExtent);     
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new WallsModificationUndoableEdit(this.home,
            this.preferences, oldSelection,
            modifiedWalls, xStart, yStart, xEnd, yEnd,
            leftSideColor, leftSideTexture, leftSideShininess,
            rightSideColor, rightSideTexture, rightSideShininess,
            height, heightAtEnd, thickness, arcExtent);
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

  /**
   * 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

Examples of javax.swing.undo.UndoableEdit

   * 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

Examples of javax.swing.undo.UndoableEdit

        getScaleDistance(), scaleDistancePoints [0][0], scaleDistancePoints [0][1],
        scaleDistancePoints [1][0], scaleDistancePoints [1][1],
        getXOrigin(), getYOrigin());
    this.home.setBackgroundImage(image);
    boolean modification = oldImage == null;
    UndoableEdit undoableEdit =
        new BackgroundImageUndoableEdit(this.home, this.preferences,modification, oldImage, image);
    this.undoSupport.postEdit(undoableEdit);
  }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

   
    // Apply modification
    doModify3DAttributes(home, observerCameraFieldOfView, observerCameraZ,
        groundColor, groundTexture, skyColor, skyTexture, lightColor, wallsAlpha);
    if (this.undoSupport != null) {
      UndoableEdit undoableEdit = new Home3DAttributesModificationUndoableEdit(
          this.home, this.preferences,
          oldObserverCameraFieldOfView, oldObserverCameraZ,
          oldGroundColor, oldGroundTexture, oldSkyColor,
          oldSkyTexture, oldLightColor, oldWallsAlpha, observerCameraFieldOfView,
          observerCameraZ, groundColor, groundTexture, skyColor,
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      // Apply modification
      doModifyFurniture(modifiedFurniture, name, nameVisible, x, y, elevation, angle, basePlanItem, width, depth, height,
          defaultColorsAndTextures, color, texture, defaultShininess, shininess, visible, modelMirrored, lightPower);
      List<Selectable> newSelection = this.home.getSelectedItems();
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new FurnitureModificationUndoableEdit(
            this.home, this.preferences, oldSelection, newSelection, modifiedFurniture,
            name, nameVisible, x, y, elevation, angle, basePlanItem, width, depth, height,
            defaultColorsAndTextures, color, texture, defaultShininess, shininess, visible, modelMirrored, lightPower);
        this.undoSupport.postEdit(undoableEdit);
      }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

      // Apply modification
      doModifyRooms(modifiedRooms, name, areaVisible,
          floorVisible, floorColor, floorTexture, floorShininess,
          ceilingVisible, ceilingColor, ceilingTexture, ceilingShininess);      
      if (this.undoSupport != null) {
        UndoableEdit undoableEdit = new RoomsModificationUndoableEdit(
            this.home, this.preferences, oldSelection, modifiedRooms, name, areaVisible,
            floorColor, floorTexture, floorVisible, floorShininess,
            ceilingColor, ceilingTexture, ceilingVisible, ceilingShininess);
        this.undoSupport.postEdit(undoableEdit);
      }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit

   
    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

Examples of javax.swing.undo.UndoableEdit

    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
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.