public void setMolecule(Molecule molecule) { GeometryTools.translateAllPositive(molecule); GeometryTools.center( molecule, new Dimension(renderer.getCanvas().getWidth(), renderer.getCanvas().getHeight())); this.molecule = molecule; calcAverageBondLength(); renderer.paintNewMolecule(molecule); // renderer.getTransformer().dumpMatrix(); }
public void zoomInOut(double factor) { renderer.getRendererModel().setZoomFactor(renderer.getRendererModel().getZoomFactor() * factor); renderer.paintNewMolecule(molecule); }