Examples of IUndoRedoable


Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

        IAtomContainer undoRedoContainer = chemModel.getBuilder()
            .newInstance(IAtomContainer.class);
        undoRedoContainer.addAtom(atom);
        Vector2d end = new Vector2d();
        end.sub(worldCoords, atom.getPoint2d());
        IUndoRedoable undoredo = getUndoRedoFactory().getMoveAtomEdit(
            undoRedoContainer, end, "Move atom");
        getUndoRedoHandler().postEdit(undoredo);
      }
      moveToWithoutUndo(atom, worldCoords);
    }
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

            .newInstance(IAtomContainer.class);
        undoRedoContainer.addAtom(bond.getAtom(0));
        undoRedoContainer.addAtom(bond.getAtom(1));
        Vector2d end = new Vector2d();
        end.sub(point, bond.getAtom(0).getPoint2d());
        IUndoRedoable undoredo = getUndoRedoFactory().getMoveAtomEdit(
            undoRedoContainer, end, "Move atom");
        getUndoRedoHandler().postEdit(undoredo);
      }
      moveToWithoutUndo(bond, point);
    }
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

  }

  // OK
  public void setCharge(IAtom atom, int charge) {
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory().getChangeChargeEdit(
          atom, atom.getFormalCharge(), charge,
          "Change charge to " + charge, this);
      getUndoRedoHandler().postEdit(undoredo);
    }
    atom.setFormalCharge(charge);
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

  }

  // OK
  public void setMassNumber(IAtom atom, int massNumber) {
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory().getChangeIsotopeEdit(
          atom, atom.getMassNumber(), massNumber,
          "Change Atomic Mass to " + massNumber);
      getUndoRedoHandler().postEdit(undoredo);
    }
    atom.setMassNumber(massNumber);
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

    updateAtom(bond.getAtom(0));
    updateAtom(bond.getAtom(1));
    structurePropertiesChanged();

    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAdjustBondOrdersEdit(
              changedBonds,
              changedStereo,
              "Changed Bond Order/Stereo to " + order + "/"
                  + stereo, this);
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

   * If an exception happens, the massNumber is set to null.
   * @see org.openscience.jchempaint.controller.IAtomBondEdits#setSymbol(org.openscience.cdk.interfaces.IAtom, java.lang.String)
   */
  public void setSymbol(IAtom atom, String symbol) {
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getChangeAtomSymbolEdit(atom, atom.getSymbol(), symbol,
              "Change Atom Symbol to " + symbol, this);
      getUndoRedoHandler().postEdit(undoredo);
    }
    if (atom instanceof IPseudoAtom) {
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

          }
        }
      }
    }
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getChangeHydrogenCountEdit(atomHydrogenCountsMap,
              "Update implicit hydrogen count");
      getUndoRedoHandler().postEdit(undoredo);
    }
    structurePropertiesChanged();
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

    structurePropertiesChanged();
  }

  public void zap() {
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory().getClearAllEdit(
          chemModel, chemModel.getMoleculeSet(),
          chemModel.getReactionSet(), "Clear Panel");
      getUndoRedoHandler().postEdit(undoredo);
    }
    if (chemModel.getMoleculeSet() != null) {
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

    changedBondsStereo.put(bond, stereos);
    updateAtom(bond.getAtom(0));
    updateAtom(bond.getAtom(1));
    structureChanged();
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAdjustBondOrdersEdit(changedBonds, changedBondsStereo,
              "Adjust Bond Stereo", this);
      getUndoRedoHandler().postEdit(undoredo);
    }
  }
View Full Code Here

Examples of org.openscience.jchempaint.controller.undoredo.IUndoRedoable

      }
    }
    avoidOverlap(chemModel);
    coordinatesChanged();
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory().getChangeCoordsEdit(
          coords, "Clean Up");
      getUndoRedoHandler().postEdit(undoredo);
    }
  }
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.