Examples of IUndoRedoable


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

    newAtomContainer.add(ring);
    updateAtoms(ring, ring.atoms());
    structureChanged();
    if (undoable && getUndoRedoFactory() != null
        && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAddAtomsAndBondsEdit(getIChemModel(),
              ring.getBuilder().newInstance(IAtomContainer.class,ring), null,
              "Ring" + " " + ringSize, this);
      getUndoRedoHandler().postEdit(undoredo);
    }
View Full Code Here

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

    newAtomContainer.add(ring);
    updateAtoms(ring, ring.atoms());
    structureChanged();
    if (undoable && getUndoRedoFactory() != null
        && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAddAtomsAndBondsEdit(getIChemModel(),
              ring.getBuilder().newInstance(IAtomContainer.class,ring), null,
              "Benzene", this);
      getUndoRedoHandler().postEdit(undoredo);
    }
View Full Code Here

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

          .newInstance(IAtomContainer.class,newRing);
      for (IAtom atom : sharedAtoms.atoms())
        undoRedoContainer.removeAtom(atom);
      for (IBond bond : sharedAtoms.bonds())
        undoRedoContainer.removeBond(bond);
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAddAtomsAndBondsEdit(getIChemModel(),
              undoRedoContainer, null, "Ring" + " " + ringSize,
              this);
      getUndoRedoHandler().postEdit(undoredo);
    }
View Full Code Here

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

  public void removeBond(IBond bond) {
    removeBondWithoutUndo(bond);
    IAtomContainer undAtomContainer = bond.getBuilder().newInstance(IAtomContainer.class);
    undAtomContainer.addBond(bond);
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getRemoveAtomsAndBondsEdit(getIChemModel(),
              undAtomContainer, "Remove Bond", this);
      getUndoRedoHandler().postEdit(undoredo);
    }
  }
View Full Code Here

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

      }
    }
    if (this.getController2DModel().getAutoUpdateImplicitHydrogens())
      updateImplicitHydrogenCounts();
    if (undoredofactory != null && undoredohandler != null) {
      IUndoRedoable undoredo = undoredofactory.getAdjustBondOrdersEdit(
          changedBonds, new HashMap<IBond, IBond.Stereo[]>(),
          "Adjust Bond Order of Molecules", this);
      undoredohandler.postEdit(undoredo);
    }
  }
View Full Code Here

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

      }
    }
    if (this.getController2DModel().getAutoUpdateImplicitHydrogens())
      updateImplicitHydrogenCounts();
    if (undoredofactory != null && undoredohandler != null) {
      IUndoRedoable undoredo = undoredofactory.getAdjustBondOrdersEdit(
          changedBonds, new HashMap<IBond, IBond.Stereo[]>(),
          "Reset Bond Order of Molecules", this);
      undoredohandler.postEdit(undoredo);
    }
  }
View Full Code Here

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

    AtomContainerManipulator.replaceAtomByAtom(relevantContainer, atomold,
        atomnew);
    updateAtom(atomnew);
    structureChanged();
    if (undoredofactory != null && undoredohandler != null) {
      IUndoRedoable undoredo = undoredofactory.getReplaceAtomEdit(
          chemModel, atomold, atomnew, "Replace Atom");
      undoredohandler.postEdit(undoredo);
    }
  }
View Full Code Here

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

        .getRelevantAtomContainer(chemModel, atom);
    ISingleElectron singleElectron = atom.getBuilder().newInstance(ISingleElectron.class,atom);
    relevantContainer.addSingleElectron(singleElectron);
    updateAtom(atom);
    if (undoredofactory != null && undoredohandler != null) {
      IUndoRedoable undoredo = undoredofactory.getSingleElectronEdit(
          relevantContainer, singleElectron, true, this, atom,
          "Add Single Electron");
      undoredohandler.postEdit(undoredo);
    }
  }
View Full Code Here

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

      ISingleElectron removedElectron = relevantContainer
          .removeSingleElectron(relevantContainer
              .getConnectedSingleElectronsCount(atom) - 1);
      updateAtom(atom);
      if (undoredofactory != null && undoredohandler != null) {
        IUndoRedoable undoredo = undoredofactory.getSingleElectronEdit(
            relevantContainer, removedElectron, false, this, atom,
            "Remove Single Electron");
        undoredohandler.postEdit(undoredo);
      }
    }
View Full Code Here

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

      else if (bond.getStereo() == IBond.Stereo.DOWN_INVERTED)
        bond.setStereo(IBond.Stereo.UP_INVERTED);
    }
    coordinatesChanged();
    if (getUndoRedoFactory() != null && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory().getChangeCoordsEdit(
          atomCoordsMap, "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.