You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(16) |
Jul
|
Aug
(9) |
Sep
(18) |
Oct
(10) |
Nov
(8) |
Dec
(7) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(53) |
Feb
(76) |
Mar
(74) |
Apr
(38) |
May
(22) |
Jun
|
Jul
(50) |
Aug
(123) |
Sep
(51) |
Oct
(49) |
Nov
(8) |
Dec
(27) |
| 2004 |
Jan
(63) |
Feb
(79) |
Mar
(56) |
Apr
(49) |
May
(42) |
Jun
(44) |
Jul
(12) |
Aug
(37) |
Sep
(5) |
Oct
(10) |
Nov
(34) |
Dec
(84) |
| 2005 |
Jan
(34) |
Feb
(9) |
Mar
(23) |
Apr
(74) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: seb <te...@us...> - 2005-04-28 13:42:21
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7934/src/org/openscience/jchempaint Modified Files: Tag: release-2-0-branch JChemPaintModel.java JChemPaintPanel.java Log Message: moved updateBackgroundDimension from JCPModel to JCPPanel. Fixed problem with first object misplaced painted. Index: JChemPaintModel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintModel.java,v retrieving revision 1.37.2.9 retrieving revision 1.37.2.10 diff -u -r1.37.2.9 -r1.37.2.10 --- JChemPaintModel.java 28 Apr 2005 09:55:24 -0000 1.37.2.9 +++ JChemPaintModel.java 28 Apr 2005 13:42:12 -0000 1.37.2.10 @@ -197,8 +197,8 @@ public void fireChange(Object source) { logger.debug("Firering change"); logger.debug(" current model: ", getChemModel()); - if (!chemModelIsEmpty()) - updateBackgroundDimension(); + /*if (!chemModelIsEmpty()) + updateBackgroundDimension();*/ // Create the event: ChangeEvent c = new ChangeEvent(source); // Get the listener list @@ -430,26 +430,6 @@ isModified = true; } - public void updateBackgroundDimension() - { - AtomContainer ac = ChemModelManipulator.getAllInOneContainer(model); - GeometryTools.translateAllPositive(ac); - - Dimension dimension = GeometryTools.get2DDimension(ac); - // returned dimension to small -> offset - dimension.setSize(dimension.width * 1.1, (dimension.height + 58) * 1.1); - if (dimension.height > 400 || dimension.width > 500) - { - rendererModel.setBackgroundDimension(dimension); - GeometryTools.center(ac, dimension); - } - else - { - dimension.setSize(500, 400); - rendererModel.setBackgroundDimension(dimension); - } - } - public boolean chemModelIsEmpty() { AtomContainer ac = ChemModelManipulator.getAllInOneContainer(getChemModel()); Index: JChemPaintPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintPanel.java,v retrieving revision 1.36.2.4 retrieving revision 1.36.2.5 diff -u -r1.36.2.4 -r1.36.2.5 --- JChemPaintPanel.java 25 Apr 2005 07:36:26 -0000 1.36.2.4 +++ JChemPaintPanel.java 28 Apr 2005 13:42:12 -0000 1.36.2.5 @@ -35,6 +35,8 @@ import java.awt.Image; import java.util.EventObject; import javax.swing.JPanel; +import javax.swing.event.ChangeListener; +import javax.swing.event.ChangeEvent; import org.openscience.cdk.Atom; import org.openscience.cdk.AtomContainer; import org.openscience.cdk.Bond; @@ -99,7 +101,7 @@ { double scaleFactor = GeometryTools.getScaleFactor(ac, rendererModel.getBondLength()); GeometryTools.scaleMolecule(ac, scaleFactor); - jcpm.updateBackgroundDimension(); + updateBackgroundDimension(); // layoutInTable(oneMoleculeDimension, jcpm.getChemModel()); ??? } setOpaque(true); @@ -163,6 +165,14 @@ inputAdapter = new PopupController2D(jcpm.getChemModel(), jcpm.getRendererModel(), jcpm.getControllerModel()); jcpm.getRendererModel().addCDKChangeListener(this); + jcpm.addChangeListener(new ChangeListener() + { + public void stateChanged(ChangeEvent e) { + updateBackgroundDimension(); + } + } + ); + inputAdapter.addCDKChangeListener(jcpm); addMouseListener(inputAdapter); addMouseMotionListener(inputAdapter); @@ -360,6 +370,8 @@ System.out.println(ex.toString()); ex.printStackTrace(); } + if (e.getSource() instanceof JChemPaintModel) + updateBackgroundDimension(); repaint(); } @@ -397,6 +409,25 @@ } } } + + public void updateBackgroundDimension() + { + AtomContainer ac = ChemModelManipulator.getAllInOneContainer(jcpm.getChemModel()); + Dimension dimension = GeometryTools.get2DDimension(ac); + Dimension panelDim = getSize(); + Renderer2DModel rendererModel = jcpm.getRendererModel(); + // returned dimension to small -> offset + if ((dimension.height + 10) > panelDim.height || (dimension.width + 10) > panelDim.width) + { + dimension.setSize(dimension.width + 70, dimension.height + 58 ); + rendererModel.setBackgroundDimension(dimension); + GeometryTools.center(ac, dimension); + } + else + { + rendererModel.setBackgroundDimension(panelDim); + } + } } |
|
From: seb <te...@us...> - 2005-04-28 09:55:49
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15140/src/org/openscience/jchempaint Modified Files: Tag: release-2-0-branch JChemPaintModel.java Log Message: fixed paint problems in a new document. Added chemModelIsEmpty(). Index: JChemPaintModel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintModel.java,v retrieving revision 1.37.2.8 retrieving revision 1.37.2.9 diff -u -r1.37.2.8 -r1.37.2.9 --- JChemPaintModel.java 25 Apr 2005 07:36:25 -0000 1.37.2.8 +++ JChemPaintModel.java 28 Apr 2005 09:55:24 -0000 1.37.2.9 @@ -113,6 +113,7 @@ controllerModel = new Controller2DModel(); controllerModel.setDrawMode(Controller2DModel.LASSO); rendererModel = new Renderer2DModel(); + rendererModel.setBackgroundDimension(new Dimension(500,400)); rendererModel.setShowAromaticity(true); // overwrite CDK default } @@ -196,7 +197,8 @@ public void fireChange(Object source) { logger.debug("Firering change"); logger.debug(" current model: ", getChemModel()); - updateBackgroundDimension(); + if (!chemModelIsEmpty()) + updateBackgroundDimension(); // Create the event: ChangeEvent c = new ChangeEvent(source); // Get the listener list @@ -436,9 +438,27 @@ Dimension dimension = GeometryTools.get2DDimension(ac); // returned dimension to small -> offset dimension.setSize(dimension.width * 1.1, (dimension.height + 58) * 1.1); - rendererModel.setBackgroundDimension(dimension); - GeometryTools.center(ac, dimension); + if (dimension.height > 400 || dimension.width > 500) + { + rendererModel.setBackgroundDimension(dimension); + GeometryTools.center(ac, dimension); + } + else + { + dimension.setSize(500, 400); + rendererModel.setBackgroundDimension(dimension); + } + } + + public boolean chemModelIsEmpty() + { + AtomContainer ac = ChemModelManipulator.getAllInOneContainer(getChemModel()); + if(ac.getAtomCount() == 0) + return true; + else + return false; } + } |
|
From: Egon W. <eg...@us...> - 2005-04-27 10:37:56
|
Update of /cvsroot/jchempaint/JCPCDK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16266 Modified Files: Tag: release-2-0-branch CHANGELOG.txt build.props build.xml Log Message: Trying to get JCP 2.0.12 released Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/CHANGELOG.txt,v retrieving revision 1.121.2.32 retrieving revision 1.121.2.33 diff -u -r1.121.2.32 -r1.121.2.33 --- CHANGELOG.txt 15 Apr 2005 13:57:28 -0000 1.121.2.32 +++ CHANGELOG.txt 27 Apr 2005 10:36:44 -0000 1.121.2.33 @@ -1,7 +1,7 @@ CHANGELOG ----------------------- -new in CVS +version 2.0.12 ---------------------- * Sum formula of ChemModel and Molecule is displayed with charge, sub- and superscripts Index: build.props =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/build.props,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- build.props 8 Apr 2005 17:57:25 -0000 1.1.2.7 +++ build.props 27 Apr 2005 10:36:44 -0000 1.1.2.8 @@ -6,4 +6,4 @@ # The dot version is increased for bug fixes, CDK lib updates, # new plugins, etc. # --> -version=2.0.12.pre +version=2.0.12.rc1 Index: build.xml =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/build.xml,v retrieving revision 1.68.2.23 retrieving revision 1.68.2.24 diff -u -r1.68.2.23 -r1.68.2.24 --- build.xml 15 Apr 2005 12:50:34 -0000 1.68.2.23 +++ build.xml 27 Apr 2005 10:36:44 -0000 1.68.2.24 @@ -130,52 +130,18 @@ </java> </target> - <target name="check.appletjars" id="check.appletjars"> - <uptodate property="appletjars.uptodate" - targetfile="${appletjars.dir}"> - <srcfiles dir="${lib.dir}" includes="cdk-data.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-core.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-standard.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-io.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-extra.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-render.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-experimental.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-apps.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-qsar.jar"/> - <srcfiles dir="${lib.dir}" includes="vecmath1.2-1.14.jar"/> - <srcfiles dir="${lib.dir}" includes="jgrapht-0.5.3.jar"/> - <srcfiles dir="${lib.dir}" includes="jmolApis.jar"/> - <srcfiles dir="${lib.dir}" includes="jmolIO.jar"/> - <srcfiles dir="${lib.dir}" includes="commons-cli-1.0.jar"/> - <srcfiles dir="${lib.dir}" includes="gnujaxp.jar"/> - </uptodate> - </target> - - <target name="check.viewerappletjars" id="check.viewerappletjars"> - <uptodate property="viewerappletjars.uptodate" - targetfile="${appletjars.dir}"> - <srcfiles dir="${lib.dir}" includes="cdk-data.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-core.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-standard.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-io.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-extra.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-render.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-qsar.jar"/> - <srcfiles dir="${lib.dir}" includes="vecmath1.2-1.14.jar"/> - <srcfiles dir="${lib.dir}" includes="jgrapht-0.5.3.jar"/> - </uptodate> - </target> - <target name="check.cdkjars" id="check.cdkjars"> <uptodate property="cdkjars.uptodate" targetfile="${appjars.dir}/org/openscience/cdk/applications"> <srcfiles dir="${lib.dir}" includes="cdk-data.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-core.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-standard.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-io.jar"/> + <srcfiles dir="${lib.dir}" includes="cdk-interfaces.jar"/> + <srcfiles dir="${lib.dir}" includes="cdk-libio-cml.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-extra.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-render.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-experimental.jar"/> - <srcfiles dir="${lib.dir}" includes="cdk-apps.jar"/> + <srcfiles dir="${lib.dir}" includes="cdk-applications.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-qsar.jar"/> </uptodate> </target> @@ -213,37 +179,6 @@ </uptodate> </target> - <target name="appletjars" id="appletjars" depends="check.appletjars" unless="appletjars.uptodate"> - <mkdir dir="${appletjars.dir}"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-data.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-core.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-standard.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-io.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-extra.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-render.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-experimental.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-apps.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/vecmath1.2-1.14.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/jmolApis.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/jmolIO.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/jgrapht-0.5.3.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/commons-cli-1.0.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/gnujaxp.jar"/> - </target> - - <target name="viewerappletjars" id="viewerappletjars" depends="check.viewerappletjars" - unless="viewerappletjars.uptodate"> - <mkdir dir="${appletjars.dir}"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-data.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-core.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-standard.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-io.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-extra.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/cdk-render.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/vecmath1.2-1.14.jar"/> - <unjar dest="${appletjars.dir}" src="${lib.dir}/jgrapht-0.5.3.jar"/> - </target> - <target name="appjars" id="appjars" depends="libjars, pluginjars, cdkjars"/> <target name="cdkjars" id="cdkjars" depends="check.cdkjars" unless="cdkjars.uptodate"> @@ -252,10 +187,12 @@ <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-core.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-standard.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-io.jar"/> + <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-interfaces.jar"/> + <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-libio-cml.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-extra.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-render.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-experimental.jar"/> - <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-apps.jar"/> + <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-applications.jar"/> <unjar dest="${appjars.dir}" src="${lib.dir}/cdk-qsar.jar"/> </target> @@ -324,96 +261,6 @@ </jar> </target> - <target name="applet-jar" id="applet-jar" depends="init,compile,appletjars" description="creates the applet jar"> - <mkdir dir="${build.dir}/org/openscience/jchempaint/resources" /> - <copy todir="${build.dir}/org/openscience/jchempaint/resources" > - <fileset dir="${source.dir}/org/openscience/jchempaint/resources"> - <include name="*" /> - </fileset> - </copy> - - <jar jarfile="jcpapplet.jar"> - <manifest> - <attribute name="Main-Class" value="JChemPaintApplet"/> - <section name="org/openscience/jchempaint/"> - <attribute name="Specification-Title" value="JChemPaint"/> - <attribute name="Specification-Version" value="2.0"/> - <attribute name="Specification-Vendor" value="The JChemPaint Project"/> - <attribute name="Implementation-Title" value="${package}"/> - <attribute name="Implementation-Version" value="${version}"/> - <attribute name="Implementation-Vendor" value="The JChemPaint Project"/> - </section> - </manifest> - <fileset dir="${build.dir}" > - <include name="org/**" /> - <include name="*.class" /> - <excludesfile name="${source.dir}/appletDoesNotNeed.classfiles"/> - </fileset> - <fileset dir="${appletjars.dir}"> - <include name="**/*" /> - <exclude name="org/openscience/cdk/applications/*" /> - <exclude name="org/openscience/cdk/math/qm/**/*" /> - <exclude name="org/openscience/cdk/database/**/*" /> - <excludesfile name="${source.dir}/appletDoesNotNeed.classfiles"/> - </fileset> - </jar> - </target> - - <target name="viewerapplet-jar" id="viewerapplet-jar" depends="init,compile,viewerappletjars" - description="creates the viewer applet jar"> - <mkdir dir="${build.dir}/org/openscience/jchempaint/resources" /> - <copy todir="${build.dir}/org/openscience/jchempaint/resources" > - <fileset dir="${source.dir}/org/openscience/jchempaint/resources"> - <include name="*" /> - </fileset> - </copy> - - <jar jarfile="jcpviewerapplet.jar"> - <manifest> - <attribute name="Main-Class" value="JChemPaintApplet"/> - <section name="org/openscience/jchempaint/"> - <attribute name="Specification-Title" value="JChemPaint"/> - <attribute name="Specification-Version" value="2.0"/> - <attribute name="Specification-Vendor" value="The JChemPaint Project"/> - <attribute name="Implementation-Title" value="${package}"/> - <attribute name="Implementation-Version" value="${version}"/> - <attribute name="Implementation-Vendor" value="The JChemPaint Project"/> - </section> - </manifest> - <fileset dir="${build.dir}" > - <include name="org/**" /> - <include name="*.class" /> - <exclude name="org/openscience/jchempaint/action/**/*" /> - <exclude name="org/openscience/jchempaint/dialogs/**/*" /> - <exclude name="org/openscience/jchempaint/dnd/**/*" /> - <exclude name="org/openscience/jchempaint/resources/**/*" /> - <excludesfile name="${source.dir}/viewerAppletDoesNotNeed.classfiles"/> - </fileset> - <fileset dir="${appletjars.dir}"> - <include name="**/*" /> - <exclude name="org/openscience/cdk/applications/*" /> - <exclude name="org/openscience/cdk/charges/**/*" /> - <exclude name="org/openscience/cdk/database/**/*" /> - <exclude name="org/openscience/cdk/dict/**/*" /> - <exclude name="org/openscience/cdk/fingerprint/**/*" /> - <exclude name="org/openscience/cdk/graph/rebond/**/*" /> - <exclude name="org/openscience/cdk/io/program/**/*" /> - <exclude name="org/openscience/cdk/io/chemrss/**/*" /> - <exclude name="org/openscience/cdk/internet/**/*" /> - <exclude name="org/openscience/cdk/iupac/**/*" /> - <exclude name="org/openscience/cdk/math/qm/**/*" /> - <exclude name="org/openscience/cdk/modeling/**/*" /> - <exclude name="org/openscience/cdk/qsar/**/*" /> - <exclude name="org/openscience/cdk/smiles/smarts/**/*" /> - <exclude name="org/openscience/cdk/structgen/**/*" /> - <exclude name="org/openscience/cdk/test/**/*" /> - <exclude name="org/openscience/cdk/validate/*Validator.class" /> - <exclude name="org/openscience/cdk/validate/Validation*.class" /> - <excludesfile name="${source.dir}/viewerAppletDoesNotNeed.classfiles"/> - </fileset> - </jar> - </target> - <target name="old-jar" id="old-jar" depends="init,userGuide,compile"> <mkdir dir="${build.dir}/org/openscience/jchempaint/resources" /> <copy todir="${build.dir}/org/openscience/jchempaint/resources" > @@ -425,7 +272,7 @@ <jar jarfile="jchempaint.jar"> <manifest> <attribute name="Main-Class" value="org.openscience.jchempaint.JChemPaint"/> - <attribute name="Class-Path" value="jar/cdk-data.jar jar/cdk-core.jar jar/cdk-standard.jar jar/cdk-io.jar jar/cdk-extra.jar jar/cdk-experimental.jar jar/cdk-render.jar jar/cdk-apps.jar jar/batik-awt-util.jar jar/batik-dom.jar jar/log4j-core.jar jar/log4j.jar jar/batik-svggen.jar jar/batik-util.jar jar/batik-xml.jar jar/gnujaxp.jar jar/jai_codec.jar jar/jai_core.jar jar/jcpcdk.jar jar/stmml.jar jar/vecmath1.2-1.14.jar jar/xerces-2.6.2.jar jar/xmlApis-2.6.2.jar jar/castor-0.9.5-xml.jar jar/commons-cli-1.0.jar jar/base.jar jar/pmrlib.jar jar/cmlAll.jar jar/jmolIO.jar jar/jmolApis.jar jar/jfontchooser.jar jar/jgrapht-0.5.3.jar plugin/dirbrowser.jar"/> + <attribute name="Class-Path" value="jar/cdk-data.jar jar/cdk-core.jar jar/cdk-standard.jar jar/cdk-io.jar jar/cdk-extra.jar jar/cdk-experimental.jar jar/cdk-render.jar jar/cdk-applications.jar jar/batik-awt-util.jar jar/batik-dom.jar jar/log4j-core.jar jar/log4j.jar jar/batik-svggen.jar jar/batik-util.jar jar/batik-xml.jar jar/gnujaxp.jar jar/jai_codec.jar jar/jai_core.jar jar/jcpcdk.jar jar/stmml.jar jar/vecmath1.2-1.14.jar jar/xerces-2.6.2.jar jar/xmlApis-2.6.2.jar jar/castor-0.9.5-xml.jar jar/commons-cli-1.0.jar jar/base.jar jar/pmrlib.jar jar/cmlAll.jar jar/jmolIO.jar jar/jmolApis.jar jar/jfontchooser.jar jar/jgrapht-0.5.3.jar plugin/dirbrowser.jar"/> <section name="org/openscience/jchempaint/"> <attribute name="Specification-Title" value="JChemPaint"/> <attribute name="Specification-Version" value="2.0"/> |
|
From: seb <te...@us...> - 2005-04-25 07:36:34
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8163/src/org/openscience/jchempaint/action Modified Files: Tag: release-2-0-branch EditAction.java ZoomAction.java Log Message: otimized fitInScreen. Activated SelectReactants SelectProducts. Index: EditAction.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action/EditAction.java,v retrieving revision 1.16.2.4 retrieving revision 1.16.2.5 diff -u -r1.16.2.4 -r1.16.2.5 --- EditAction.java 12 Apr 2005 23:44:47 -0000 1.16.2.4 +++ EditAction.java 25 Apr 2005 07:36:26 -0000 1.16.2.5 @@ -119,7 +119,7 @@ } else { logger.warn("Cannot select everything in : ", object); } - } else if (type.equals("selectReactionReactants")) { + } else if (type.equals("selectReactionReactants")) { ChemObject object = getSource(event); if (object instanceof Reaction) { Reaction reaction = (Reaction)object; @@ -128,6 +128,7 @@ } else { logger.warn("Cannot select reactants from : ", object); } + jcpModel.fireChange(); } else if (type.equals("selectReactionProducts")) { ChemObject object = getSource(event); if (object instanceof Reaction) { @@ -137,6 +138,7 @@ } else { logger.warn("Cannot select reactants from : ", object); } + jcpModel.fireChange(); } else { logger.warn("Unsupported EditAction: " + type); } Index: ZoomAction.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action/ZoomAction.java,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -u -r1.8.2.3 -r1.8.2.4 --- ZoomAction.java 15 Apr 2005 13:57:30 -0000 1.8.2.3 +++ ZoomAction.java 25 Apr 2005 07:36:26 -0000 1.8.2.4 @@ -28,8 +28,11 @@ package org.openscience.jchempaint.action; import java.awt.event.ActionEvent; +import java.awt.Container; import java.awt.Dimension; +import javax.swing.JScrollPane; + import org.openscience.cdk.renderer.Renderer2DModel; import org.openscience.jchempaint.JChemPaintModel; @@ -46,16 +49,19 @@ } else if (type.equals("original")) { renderModel.setZoomFactor(1.0); } else if (type.equals("fitInScreen")) { - int scrollWidth = 20; - // shouldn't be needed. Without it this doesn't work proper every 2nd time. + /* if not set to 1.0 the object would be resized to normal size + cause the ratio of frame and model dimension would be 1, if + the model is already fitted.*/ renderModel.setZoomFactor(1.0); Dimension dimModel = renderModel.getBackgroundDimension(); - Dimension dimFrame = jcp.getCurrentFrame().getSize(); - double widthRatio = dimModel.width/(double)(dimFrame.width - scrollWidth); - double heightRatio = dimModel.height/(double)(dimFrame.height - scrollWidth); + Container frameContent = jcp.getCurrentFrame().getContentPane(); + // needs to be changed. need function that always returns view size without scrollers + Dimension dimFrame = ((JScrollPane)frameContent.getComponent(0)).getViewport().getExtentSize(); + double widthRatio = dimModel.width/(double)(dimFrame.width); + double heightRatio = dimModel.height/(double)(dimFrame.height); if (widthRatio >= heightRatio) { renderModel.setZoomFactor(1/widthRatio); - } else { + } else if (widthRatio < heightRatio) { renderModel.setZoomFactor(1/heightRatio); } } else { |
|
From: seb <te...@us...> - 2005-04-25 07:36:34
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8163/src/org/openscience/jchempaint Modified Files: Tag: release-2-0-branch JChemPaintModel.java JChemPaintPanel.java Log Message: otimized fitInScreen. Activated SelectReactants SelectProducts. Index: JChemPaintModel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintModel.java,v retrieving revision 1.37.2.7 retrieving revision 1.37.2.8 diff -u -r1.37.2.7 -r1.37.2.8 --- JChemPaintModel.java 15 Apr 2005 13:57:29 -0000 1.37.2.7 +++ JChemPaintModel.java 25 Apr 2005 07:36:25 -0000 1.37.2.8 @@ -196,7 +196,7 @@ public void fireChange(Object source) { logger.debug("Firering change"); logger.debug(" current model: ", getChemModel()); - + updateBackgroundDimension(); // Create the event: ChangeEvent c = new ChangeEvent(source); // Get the listener list @@ -221,7 +221,6 @@ * model. */ public void fireChange() { - updateBackgroundDimension(); fireChange(this); } @@ -431,15 +430,12 @@ public void updateBackgroundDimension() { - int offset = 50; AtomContainer ac = ChemModelManipulator.getAllInOneContainer(model); GeometryTools.translateAllPositive(ac); - double scaleFactor = GeometryTools.getScaleFactor(ac, rendererModel.getBondLength()); - GeometryTools.scaleMolecule(ac, scaleFactor); - + Dimension dimension = GeometryTools.get2DDimension(ac); // returned dimension to small -> offset - dimension.setSize(dimension.width + offset, dimension.height + offset); + dimension.setSize(dimension.width * 1.1, (dimension.height + 58) * 1.1); rendererModel.setBackgroundDimension(dimension); GeometryTools.center(ac, dimension); } Index: JChemPaintPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintPanel.java,v retrieving revision 1.36.2.3 retrieving revision 1.36.2.4 diff -u -r1.36.2.3 -r1.36.2.4 --- JChemPaintPanel.java 15 Apr 2005 13:57:29 -0000 1.36.2.3 +++ JChemPaintPanel.java 25 Apr 2005 07:36:26 -0000 1.36.2.4 @@ -97,6 +97,8 @@ Renderer2DModel rendererModel = jcpm.getRendererModel(); if (ac.getAtomCount() != 0) { + double scaleFactor = GeometryTools.getScaleFactor(ac, rendererModel.getBondLength()); + GeometryTools.scaleMolecule(ac, scaleFactor); jcpm.updateBackgroundDimension(); // layoutInTable(oneMoleculeDimension, jcpm.getChemModel()); ??? } |
|
From: Egon W. <eg...@us...> - 2005-04-22 05:51:24
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24539/src/org/openscience/jchempaint Modified Files: JChemPaintEditorPanel.java Log Message: Uploaded fixes to get the frame of reasonable size, so that one can see something Index: JChemPaintEditorPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintEditorPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- JChemPaintEditorPanel.java 20 Apr 2005 13:05:13 -0000 1.15 +++ JChemPaintEditorPanel.java 22 Apr 2005 05:51:06 -0000 1.16 @@ -61,7 +61,6 @@ import java.io.*; import javax.swing.*; import javax.swing.text.*; -import javax.swing.JInternalFrame.*; import javax.swing.border.*; import javax.swing.event.*; import org.openscience.cdk.*; @@ -130,10 +129,10 @@ setLayout(new BorderLayout()); setJChemPaintModel(jcpm); - - Renderer2DModel rendererModel = jcpm.getRendererModel(); - if (ac.getAtomCount() != 0) - { + + Renderer2DModel rendererModel = jcpm.getRendererModel(); + if (ac.getAtomCount() != 0) { + logger.info("ChemModel is already non-empty! Sizing things to get it visible!"); // do some magic to get it all in one page Dimension oneMoleculeDimension = new Dimension(700, 400); // should be based on molecule/reaction size! @@ -169,14 +168,15 @@ JPanel chemtoolbar = new JPanel(); chemtoolbar.add(createToolbar(HORIZONTAL, "chemtoolbar")); toolbarsPanel.add(chemtoolbar, BorderLayout.CENTER); - add(toolbarsPanel, BorderLayout.NORTH); - - drawingPanel = new JPanel(); - add(drawingPanel, BorderLayout.CENTER); + add(toolbarsPanel, BorderLayout.NORTH); + + drawingPanel = new JPanel(); drawingPanel.setOpaque(true); - drawingPanel.setBackground(Color.white); - - setPreferredSize(new Dimension(500, 400)); + drawingPanel.setBackground(Color.white); + JScrollPane scrollPane = new JScrollPane(drawingPanel); + add(scrollPane, BorderLayout.CENTER); + + setPreferredSize(new Dimension(500, 400)); logger.debug("JCPPanel set and done..."); } @@ -291,21 +291,18 @@ * *@param g the Graphics object to paint to */ - public void paint(Graphics g) - { - drawingNow = true; - super.paint(g); - Graphics2D g2d = (Graphics2D) g; - Renderer2DModel model = jcpm.getRendererModel(); - if (model.getUseAntiAliasing()) - { - g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - } - // model.setBackgroundDimension(this.getSize()); - r2d.paintChemModel(jcpm.getChemModel(), g2d); - drawingNow = false; - } - + public void paint(Graphics g) { + drawingNow = true; + super.paint(g); + Graphics2D g2d = (Graphics2D)g; + Renderer2DModel model = jcpm.getRendererModel(); + if (model.getUseAntiAliasing()) { + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + } + model.setBackgroundDimension(drawingPanel.getSize()); + r2d.paintChemModel(jcpm.getChemModel(), g2d); + drawingNow = false; + } /** * Description of the Method @@ -350,7 +347,7 @@ System.out.println(ex.toString()); ex.printStackTrace(); } - repaint(); + if (!drawingNow) repaint(); } |
|
From: Egon W. <eg...@us...> - 2005-04-22 05:51:24
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24539/src/org/openscience/jchempaint/application Modified Files: JChemPaintFrame.java Log Message: Uploaded fixes to get the frame of reasonable size, so that one can see something Index: JChemPaintFrame.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application/JChemPaintFrame.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- JChemPaintFrame.java 20 Apr 2005 13:03:21 -0000 1.12 +++ JChemPaintFrame.java 22 Apr 2005 05:51:06 -0000 1.13 @@ -89,7 +89,7 @@ undoStack = new UndoStack(undoStackSize); undoStack.push(cloneModel(jcpm)); jcpm.addChangeListener(this); - // setPreferredSize(new Dimension(500, 400)); + setSize(new Dimension(600, 400)); setBackground(Color.white); jcpp = new JChemPaintEditorPanel(jcpm); |
|
From: Egon W. <eg...@us...> - 2005-04-22 05:36:20
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15868/src/org/openscience/jchempaint/action Modified Files: InsertSmilesAction.java Log Message: Trying to get the SMILES insert to work again Index: InsertSmilesAction.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action/InsertSmilesAction.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- InsertSmilesAction.java 18 Jan 2005 08:53:29 -0000 1.11 +++ InsertSmilesAction.java 22 Apr 2005 05:36:11 -0000 1.12 @@ -35,9 +35,11 @@ public class InsertSmilesAction extends JCPAction { public void actionPerformed(ActionEvent e) { + logger.debug("Gonna show the InsertFromSmiles dialog..."); InsertFromSmiles ifs = new InsertFromSmiles(JChemPaint.getInstance()); ifs.pack(); ifs.show(); + logger.debug("Should be visible now!..."); } } |
|
From: Egon W. <eg...@us...> - 2005-04-22 05:36:19
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15868/src/org/openscience/jchempaint/dialogs Modified Files: InsertFromSmiles.java Log Message: Trying to get the SMILES insert to work again Index: InsertFromSmiles.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/dialogs/InsertFromSmiles.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- InsertFromSmiles.java 18 Jan 2005 08:53:31 -0000 1.5 +++ InsertFromSmiles.java 22 Apr 2005 05:36:09 -0000 1.6 @@ -127,6 +127,8 @@ jcpm.setTitle("Created from SMILES: " + SMILES); JChemPaintFrame jcpf = jcp.getNewFrame(jcpm); jcp.addAndShowJChemPaintFrame(jcpf); + jcpf.show(); + System.out.println("Should show a new JCPFrame windows now!"); closeFrame(); } catch (InvalidSmilesException ise) { JOptionPane.showMessageDialog(jcp, "Invalid SMILES String."); |
|
From: Christoph S. <ste...@us...> - 2005-04-20 13:05:37
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17593/src/org/openscience/jchempaint Modified Files: JChemPaintEditorPanel.java Log Message: and more cleanups... Index: JChemPaintEditorPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintEditorPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- JChemPaintEditorPanel.java 20 Apr 2005 13:03:19 -0000 1.14 +++ JChemPaintEditorPanel.java 20 Apr 2005 13:05:13 -0000 1.15 @@ -107,10 +107,11 @@ private static DictionaryDatabase dictdb = null; private static ValidatorEngine engine = null; - - private static LoggingTool logger; - - private boolean drawingNow; + + private static LoggingTool logger; + + private boolean drawingNow; + /** * sets configurations for the layout of the panel, adds several listeners @@ -120,15 +121,19 @@ public JChemPaintEditorPanel(JChemPaintModel jcpm) { super(); - if (logger == null) logger = new LoggingTool(this); - drawingNow = false; + if (logger == null) + { + logger = new LoggingTool(this); + } + drawingNow = false; AtomContainer ac = ChemModelManipulator.getAllInOneContainer(jcpm.getChemModel()); setLayout(new BorderLayout()); setJChemPaintModel(jcpm); - - Renderer2DModel rendererModel = jcpm.getRendererModel(); - if (ac.getAtomCount() != 0) { + + Renderer2DModel rendererModel = jcpm.getRendererModel(); + if (ac.getAtomCount() != 0) + { // do some magic to get it all in one page Dimension oneMoleculeDimension = new Dimension(700, 400); // should be based on molecule/reaction size! @@ -155,8 +160,8 @@ // set the drag-n-drop/copy-paste handler this.setTransferHandler(new JCPTransferHandler("JCPPanel")); - JPanel toolbarsPanel = new JPanel(); - toolbarsPanel.setLayout(new BorderLayout()); + JPanel toolbarsPanel = new JPanel(); + toolbarsPanel.setLayout(new BorderLayout()); JPanel toolbar1 = new JPanel(); toolbar1.add(createToolbar(HORIZONTAL, "toolbar")); toolbarsPanel.add(toolbar1, BorderLayout.LINE_START); @@ -164,10 +169,10 @@ JPanel chemtoolbar = new JPanel(); chemtoolbar.add(createToolbar(HORIZONTAL, "chemtoolbar")); toolbarsPanel.add(chemtoolbar, BorderLayout.CENTER); - add(toolbarsPanel, BorderLayout.NORTH); - - drawingPanel = new JPanel(); - add(drawingPanel, BorderLayout.CENTER); + add(toolbarsPanel, BorderLayout.NORTH); + + drawingPanel = new JPanel(); + add(drawingPanel, BorderLayout.CENTER); drawingPanel.setOpaque(true); drawingPanel.setBackground(Color.white); @@ -255,7 +260,6 @@ /** * Description of the Method - * */ public void setupPopupMenus() { @@ -287,18 +291,21 @@ * *@param g the Graphics object to paint to */ - public void paint(Graphics g) { - drawingNow = true; - super.paint(g); - Graphics2D g2d = (Graphics2D)g; - Renderer2DModel model = jcpm.getRendererModel(); - if (model.getUseAntiAliasing()) { - g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - } - // model.setBackgroundDimension(this.getSize()); - r2d.paintChemModel(jcpm.getChemModel(), g2d); - drawingNow = false; - } + public void paint(Graphics g) + { + drawingNow = true; + super.paint(g); + Graphics2D g2d = (Graphics2D) g; + Renderer2DModel model = jcpm.getRendererModel(); + if (model.getUseAntiAliasing()) + { + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + } + // model.setBackgroundDimension(this.getSize()); + r2d.paintChemModel(jcpm.getChemModel(), g2d); + drawingNow = false; + } + /** * Description of the Method @@ -333,10 +340,13 @@ *@param e The EventObject containing information on the nature and source of * the event */ - public void stateChanged(EventObject e) { - try { + public void stateChanged(EventObject e) + { + try + { logger.debug("State Change."); - } catch (Exception ex) { + } catch (Exception ex) + { System.out.println(ex.toString()); ex.printStackTrace(); } |
|
From: Christoph S. <ste...@us...> - 2005-04-20 13:04:36
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16771/src/org/openscience/jchempaint/application Modified Files: JChemPaint.java Log Message: Javastyle cleanup of the previously commited files Index: JChemPaint.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application/JChemPaint.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- JChemPaint.java 20 Apr 2005 13:03:20 -0000 1.12 +++ JChemPaint.java 20 Apr 2005 13:04:28 -0000 1.13 @@ -148,15 +148,16 @@ * Description of the Field */ public static URL jcplogo; - /** - * This is used for counting the jcp intances in order to be able to close - * the whole vm when the last window of a sdi application is closed - */ - private static int jcpcounter=0; + /** + * This is used for counting the jcp intances in order to be able to close the + * whole vm when the last window of a sdi application is closed + */ + private static int jcpcounter = 0; private LoggingTool logger; - boolean embedded = false; + boolean embedded = false; + /** * The main program for the JChemPaint class @@ -235,37 +236,45 @@ System.exit(0); } - // Process command line arguments - String modelFilename = ""; - FileReader contentToOpen = null; - args = line.getArgs(); - if (args.length > 0) { - modelFilename = args[0]; - File file = new File(modelFilename); - if (!file.exists()) { - System.err.println("File does not exist: " + modelFilename); - System.exit(-1); - } - // ok, file exists - contentToOpen = new FileReader(file); - } - - JChemPaint jcp = JChemPaint.getInstance(); - - if (contentToOpen != null) { - jcp.getCurrentFrame().getJChemPaintPanel().showChemFile(contentToOpen); - } + // Process command line arguments + String modelFilename = ""; + FileReader contentToOpen = null; + args = line.getArgs(); + if (args.length > 0) + { + modelFilename = args[0]; + File file = new File(modelFilename); + if (!file.exists()) + { + System.err.println("File does not exist: " + modelFilename); + System.exit(-1); + } + // ok, file exists + contentToOpen = new FileReader(file); + } + + JChemPaint jcp = JChemPaint.getInstance(); - } catch (Throwable t) { + if (contentToOpen != null) + { + jcp.getCurrentFrame().getJChemPaintPanel().showChemFile(contentToOpen); + } + } catch (Throwable t) + { System.err.println("uncaught exception: " + t); t.printStackTrace(System.err); } } - private JChemPaint() { - String locale = null; - + /** + * Constructor for the JChemPaint object + */ + private JChemPaint() + { + + String locale = null; + // configure Logger logger = new LoggingTool(this); logger.dumpSystemProperties(); @@ -277,20 +286,29 @@ logger.debug(" ++++ ++++ ++++ ++++ ++++ "); JChemPaintFrame jcpf = getEmptyFrameWithModel(); addAndShowJChemPaintFrame(jcpf); - logger.debug(" ++++ ++++ ++++ ++++ "); - /* if (addPluginMenu) { - setupPluginManager(jcpf); - } */ - logger.debug(" ++++ ++++ ++++ "); - setupWorkingDirectory(); - logger.debug(" ++++ ++++ "); - - logger.debug("End of JCP constructor"); + logger.debug(" ++++ ++++ ++++ ++++ "); + /* + * if (addPluginMenu) { + * setupPluginManager(jcpf); + * } + */ + logger.debug(" ++++ ++++ ++++ "); + setupWorkingDirectory(); + logger.debug(" ++++ ++++ "); + + logger.debug("End of JCP constructor"); } - private void setupWorkingDirectory() { - try { - if (System.getProperty("user.dir") != null) { + + /** + * Description of the Method + */ + private void setupWorkingDirectory() + { + try + { + if (System.getProperty("user.dir") != null) + { currentWorkDirectory = new File(System.getProperty("user.dir")); } } catch (Exception exc) @@ -511,28 +529,43 @@ return pluginManager; } - public void exitJChemPaint() { - jcpcounter--; - // first shut down the plugins - // pluginManager.closePlugins(); - // close JVM - System.exit(0); - } - - /** - * Action that will close JChemPaint. - * - * @author steinbeck - * @created February 18, 2004 - */ - public final static class AppCloser extends WindowAdapter { - - private static JChemPaint jcp; - - public AppCloser(JChemPaint jcp) { - this.jcp = jcp; - } - + + /** + * Description of the Method + */ + public void exitJChemPaint() + { + jcpcounter--; + // first shut down the plugins + // pluginManager.closePlugins(); + // close JVM + System.exit(0); + } + + + /** + * Action that will close JChemPaint. + * + *@author steinbeck + *@created February 18, 2004 + */ + public final static class AppCloser extends WindowAdapter + { + + private static JChemPaint jcp; + + + /** + * Constructor for the AppCloser object + * + *@param jcp Description of the Parameter + */ + public AppCloser(JChemPaint jcp) + { + this.jcp = jcp; + } + + /** * Terminates the currently running Java Virtual Machine. @ param e Window * closing Event @@ -563,10 +596,19 @@ return (frame.getModel().getRendererModel().getSelectedPart()); } - public static JChemPaint getInstance() { - if (jchempaintInstance == null) { - jchempaintInstance = new JChemPaint(); - } - return jchempaintInstance; - } + + /** + * Gets the instance attribute of the JChemPaint class + * + *@return The instance value + */ + public static JChemPaint getInstance() + { + if (jchempaintInstance == null) + { + jchempaintInstance = new JChemPaint(); + } + return jchempaintInstance; + } } + |
|
From: Christoph S. <ste...@us...> - 2005-04-20 13:03:31
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16150/src/org/openscience/jchempaint Modified Files: JChemPaintEditorPanel.java JChemPaintPanel.java Log Message: removed all my conflicts after update Index: JChemPaintEditorPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintEditorPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- JChemPaintEditorPanel.java 14 Apr 2005 19:24:47 -0000 1.13 +++ JChemPaintEditorPanel.java 20 Apr 2005 13:03:19 -0000 1.14 @@ -1,4 +1,5 @@ -/* $RCSfile$ +/* + * $RCSfile$ * $Author$ * $Date$ * $Revision$ @@ -7,23 +8,23 @@ * * Contact: jch...@li... * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * All we ask is that proper credit is given for our work, which includes - * - but is not limited to - adding the above copyright notice to the beginning - * of your source code files, and to any copyright notice that you may distribute - * with programs based on this work. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * All we ask is that proper credit is given for our work, which includes + * - but is not limited to - adding the above copyright notice to the beginning + * of your source code files, and to any copyright notice that you may distribute + * with programs based on this work. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.openscience.jchempaint; @@ -76,29 +77,37 @@ import org.openscience.jchempaint.application.JChemPaint; /** - * This class implements an editing JChemPaintPanel. + * This class implements an editing JChemPaintPanel. * - * @see JChemPaintViewerPanel + *@author steinbeck + *@created 16. Februar 2005 + *@see JChemPaintViewerPanel */ public class JChemPaintEditorPanel extends JChemPaintPanel - implements ChangeListener, CDKChangeListener, SwingConstants, CDKEditBus + implements ChangeListener, CDKChangeListener, SwingConstants, CDKEditBus { String recentSymbol = "C"; Renderer2D r2d; PopupController2D inputAdapter; - JPanel drawingPanel; + JPanel drawingPanel; GridBagLayout gridbag = null; GridBagConstraints gridBagConstraints = null; private JToolBar toolbar2; - public JButton selectButton; - + /** + * Description of the Field + */ + public JButton selectButton; + + /** + * Description of the Field + */ public final static String TIPSUFFIX = "Tooltip"; private static DictionaryDatabase dictdb = null; private static ValidatorEngine engine = null; - + private static LoggingTool logger; private boolean drawingNow; @@ -107,19 +116,17 @@ * sets configurations for the layout of the panel, adds several listeners * *@param jcpm The JChemPaintModel - *@param jcp Description of the Parameter */ public JChemPaintEditorPanel(JChemPaintModel jcpm) { super(); if (logger == null) logger = new LoggingTool(this); drawingNow = false; - AtomContainer ac = ChemModelManipulator.getAllInOneContainer(jcpm.getChemModel()); setLayout(new BorderLayout()); setJChemPaintModel(jcpm); - + Renderer2DModel rendererModel = jcpm.getRendererModel(); if (ac.getAtomCount() != 0) { // do some magic to get it all in one page @@ -145,8 +152,8 @@ jcpm.getControllerModel().setBondPointerLength(rendererModel.getBondLength()); jcpm.getControllerModel().setRingPointerLength(rendererModel.getBondLength()); - // set the drag-n-drop/copy-paste handler - this.setTransferHandler(new JCPTransferHandler("JCPPanel")); + // set the drag-n-drop/copy-paste handler + this.setTransferHandler(new JCPTransferHandler("JCPPanel")); JPanel toolbarsPanel = new JPanel(); toolbarsPanel.setLayout(new BorderLayout()); @@ -162,28 +169,42 @@ drawingPanel = new JPanel(); add(drawingPanel, BorderLayout.CENTER); drawingPanel.setOpaque(true); - drawingPanel.setBackground(Color.white); - - setPreferredSize(new Dimension(500, 400)); + drawingPanel.setBackground(Color.white); + + setPreferredSize(new Dimension(500, 400)); logger.debug("JCPPanel set and done..."); } - /** - * Overwrites the default background color and returns the color taken from - * the Renderer2DModel. - */ - public Color getBackground() { - if (jcpm != null) { - return jcpm.getRendererModel().getBackColor(); - } else { - return Color.WHITE; - } - } - public JToolBar getToolBar() { - return this.toolbar2; - } - + /** + * Overwrites the default background color and returns the color taken from + * the Renderer2DModel. + * + *@return The background value + */ + public Color getBackground() + { + if (jcpm != null) + { + return jcpm.getRendererModel().getBackColor(); + } else + { + return Color.WHITE; + } + } + + + /** + * Gets the toolBar attribute of the JChemPaintEditorPanel object + * + *@return The toolBar value + */ + public JToolBar getToolBar() + { + return this.toolbar2; + } + + /** * Gets the preferredSize attribute of the JChemPaintPanel object * @@ -207,10 +228,9 @@ try { property = System.getProperty("renderer", "default"); - } - catch(Exception exc) + } catch (Exception exc) { - logger.info("Could not read System property. I might be in a sandbox"); + logger.info("Could not read System property. I might be in a sandbox"); } r2d = new Renderer2D(jcpm.getRendererModel()); inputAdapter = new PopupController2D(jcpm.getChemModel(), jcpm.getRendererModel(), @@ -236,26 +256,36 @@ /** * Description of the Method * - *@param jcp Description of the Parameter */ - public void setupPopupMenus() { + public void setupPopupMenus() + { if (inputAdapter.getPopupMenu(new Atom("H")) == null) + { inputAdapter.setPopupMenu(new Atom("H"), new JChemPaintPopupMenu(this, "atom")); + } if (inputAdapter.getPopupMenu(new PseudoAtom("R")) == null) + { inputAdapter.setPopupMenu(new PseudoAtom("R"), new JChemPaintPopupMenu(this, "pseudo")); + } if (inputAdapter.getPopupMenu(new Bond()) == null) + { inputAdapter.setPopupMenu(new Bond(), new JChemPaintPopupMenu(this, "bond")); + } if (inputAdapter.getPopupMenu(new ChemModel()) == null) + { inputAdapter.setPopupMenu(new ChemModel(), new JChemPaintPopupMenu(this, "chemmodel")); + } if (inputAdapter.getPopupMenu(new Reaction()) == null) + { inputAdapter.setPopupMenu(new Reaction(), new JChemPaintPopupMenu(this, "reaction")); + } } /** - * Draws bonds, atoms; takes care of highlighting. + * Draws bonds, atoms; takes care of highlighting. * - * @param g the Graphics object to paint to + *@param g the Graphics object to paint to */ public void paint(Graphics g) { drawingNow = true; @@ -375,6 +405,7 @@ } } + /** * Creates a JButton given by a String with an Image and adds the right * ActionListener to it. @@ -384,7 +415,7 @@ */ protected JButton createToolbarButton(String key) { - JCPPropertyHandler jcpph = JCPPropertyHandler.getInstance(); + JCPPropertyHandler jcpph = JCPPropertyHandler.getInstance(); logger.debug("Trying to find resource for key: ", key); URL url = jcpph.getResource(key + JCPAction.imageSuffix); logger.debug("Trying to find resource: ", url); @@ -392,12 +423,12 @@ { logger.error("Cannot find resource: ", key, JCPAction.imageSuffix); return null; - } + } ImageIcon image = new ImageIcon(url); if (image == null) { logger.error("Cannot find image: ", url); - return null; + return null; } JButton b = new JButton(image) @@ -442,6 +473,7 @@ return b; } + /** * Creates a toolbar given by a String with all the buttons that are specified * in the properties file. @@ -455,11 +487,13 @@ toolbar2 = new JToolBar(orientation); String[] toolKeys = StringHelper.tokenize(getToolbarResourceString(kind)); JButton button = null; - - if (toolKeys.length != 0) { + + if (toolKeys.length != 0) + { String[] sdiToolKeys = new String[(toolKeys.length) - 4]; - for (int i=4; i<toolKeys.length; i++) { - int j = i-4; + for (int i = 4; i < toolKeys.length; i++) + { + int j = i - 4; sdiToolKeys[j] = toolKeys[i]; } toolKeys = sdiToolKeys; @@ -479,8 +513,10 @@ } else { button = (JButton) createToolbarButton(toolKeys[i]); - if(toolKeys[i].equals("lasso")) - selectButton=button; + if (toolKeys[i].equals("lasso")) + { + selectButton = button; + } if (button != null) { toolbar2.add(button); @@ -504,6 +540,7 @@ return toolbar2; } + /** * Gets the menuResourceString attribute of the JChemPaint object * @@ -523,63 +560,89 @@ return str; } - public static ValidatorEngine getValidatorEngine() { - if (engine == null) { + + /** + * Gets the validatorEngine attribute of the JChemPaintEditorPanel class + * + *@return The validatorEngine value + */ + public static ValidatorEngine getValidatorEngine() + { + if (engine == null) + { engine = new ValidatorEngine(); - // default validators - engine.addValidator(new BasicValidator()); - engine.addValidator(new ValencyValidator()); - engine.addValidator(new CDKValidator()); - engine.addValidator(new DictionaryValidator(dictdb)); - engine.addValidator(new PDBValidator()); + // default validators + engine.addValidator(new BasicValidator()); + engine.addValidator(new ValencyValidator()); + engine.addValidator(new CDKValidator()); + engine.addValidator(new DictionaryValidator(dictdb)); + engine.addValidator(new PDBValidator()); } - return engine; - } - - /** + return engine; + } + + + /** * Gets the dictionaryDatabase attribute of the JChemPaint object * *@return The dictionaryDatabase value */ - public static DictionaryDatabase getDictionaryDatabase() { - if (dictdb == null){ + public static DictionaryDatabase getDictionaryDatabase() + { + if (dictdb == null) + { dictdb = new DictionaryDatabase(); - try { - File dictdir = new File(JCPPropertyHandler.getInstance().getJChemPaintDir(), "dicts"); - logger.info("User dict dir: ", dictdir); - logger.debug(" exists: ", dictdir.exists()); - logger.debug(" isDirectory: ", dictdir.isDirectory()); - if (dictdir.exists() && dictdir.isDirectory()) { - File[] dicts = dictdir.listFiles(); - for (int i = 0; i < dicts.length; i++) { - // loop over these files and load them - try { - FileReader reader = new FileReader(dicts[i]); - String filename = dicts[i].getName(); - dictdb.readDictionary(reader, filename.substring(0, filename.indexOf('.'))); - } catch (IOException exception) { - logger.error("Problem with reading macie dictionary..."); - } - } - } - logger.info("Read these dictionaries: "); - Enumeration dicts = dictdb.listDictionaries(); - while (dicts.hasMoreElements()) { - logger.info(" - ", dicts.nextElement().toString()); - } - } catch(Exception exc) { - logger.error("Could not handle dictionary initialization. Maybe I'm running in a sandbox."); - } - } + try + { + File dictdir = new File(JCPPropertyHandler.getInstance().getJChemPaintDir(), "dicts"); + logger.info("User dict dir: ", dictdir); + logger.debug(" exists: ", dictdir.exists()); + logger.debug(" isDirectory: ", dictdir.isDirectory()); + if (dictdir.exists() && dictdir.isDirectory()) + { + File[] dicts = dictdir.listFiles(); + for (int i = 0; i < dicts.length; i++) + { + // loop over these files and load them + try + { + FileReader reader = new FileReader(dicts[i]); + String filename = dicts[i].getName(); + dictdb.readDictionary(reader, filename.substring(0, filename.indexOf('.'))); + } catch (IOException exception) + { + logger.error("Problem with reading macie dictionary..."); + } + } + } + logger.info("Read these dictionaries: "); + Enumeration dicts = dictdb.listDictionaries(); + while (dicts.hasMoreElements()) + { + logger.info(" - ", dicts.nextElement().toString()); + } + } catch (Exception exc) + { + logger.error("Could not handle dictionary initialization. Maybe I'm running in a sandbox."); + } + } return dictdb; } + /* * Methods implementing the CDKEditBus interface */ - public String getAPIVersion() { - return "1.8"; - } + /** + * Gets the aPIVersion attribute of the JChemPaintEditorPanel object + * + *@return The aPIVersion value + */ + public String getAPIVersion() + { + return "1.8"; + } + /** * Mandatory because JChemPaint is a ChangeListener. Used by other classes to @@ -590,12 +653,15 @@ public void stateChanged(ChangeEvent e) { // send event to plugins - /* if (pluginManager != null) - { - pluginManager.stateChanged(new ChemObjectChangeEvent(this)); - } */ + /* + * if (pluginManager != null) + * { + * pluginManager.stateChanged(new ChemObjectChangeEvent(this)); + * } + */ } + /** * Adds a feature to the ChangeListener attribute of the JChemPaint object * @@ -603,10 +669,11 @@ */ public void addChangeListener(ChangeListener listener) { - /* getCurrentModel().addChangeListener(listener); */ + /* + * getCurrentModel().addChangeListener(listener); + */ } - } Index: JChemPaintPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintPanel.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- JChemPaintPanel.java 21 Mar 2005 15:37:26 -0000 1.45 +++ JChemPaintPanel.java 20 Apr 2005 13:03:19 -0000 1.46 @@ -1,4 +1,5 @@ -/* $RCSfile$ +/* + * $RCSfile$ * $Author$ * $Date$ * $Revision$ @@ -7,23 +8,23 @@ * * Contact: jch...@li... * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * All we ask is that proper credit is given for our work, which includes - * - but is not limited to - adding the above copyright notice to the beginning - * of your source code files, and to any copyright notice that you may distribute - * with programs based on this work. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * All we ask is that proper credit is given for our work, which includes + * - but is not limited to - adding the above copyright notice to the beginning + * of your source code files, and to any copyright notice that you may distribute + * with programs based on this work. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.openscience.jchempaint; @@ -53,45 +54,84 @@ import org.openscience.jchempaint.io.*; /** - * JPanel that contains a full JChemPaint program, either viewer - * or full editor. + * JPanel that contains a full JChemPaint program, either viewer or full + * editor. + * + *@author steinbeck + *@created 16. Februar 2005 */ -public abstract class JChemPaintPanel - extends JPanel - implements ChangeListener +public abstract class JChemPaintPanel + extends JPanel + implements ChangeListener { - protected JChemPaintModel jcpm; + /** + * Description of the Field + */ + protected JChemPaintModel jcpm; private LoggingTool logger; - public JChemPaintPanel() { + + /** + * Constructor for the JChemPaintPanel object + */ + public JChemPaintPanel() + { logger = new LoggingTool(this); - jcpm = new JChemPaintModel(); - } - - /** FIXME: must not use JChemPaint */ - public void setupPopupMenus() { - }; - - public Image takeSnapshot() { - return null; - }; - - public void setJChemPaintModel(JChemPaintModel model) { - }; - - public JToolBar getToolBar() { - return null; - } - + jcpm = new JChemPaintModel(); + setPreferredSize(new Dimension(800, 600)); + } + + + /** + * FIXME: must not use JChemPaint + */ + public void setupPopupMenus() + { + } + + + /** + * Description of the Method + * + *@return Description of the Return Value + */ + public Image takeSnapshot() + { + return null; + } + + + /** + * Sets the jChemPaintModel attribute of the JChemPaintPanel object + * + *@param model The new jChemPaintModel value + */ + public void setJChemPaintModel(JChemPaintModel model) + { + } + + + /** + * Gets the toolBar attribute of the JChemPaintPanel object + * + *@return The toolBar value + */ + public JToolBar getToolBar() + { + return null; + } + + /** - * Partitions a given String into separate words and writes them into an - * array. + * Partitions a given String into separate words and writes them into an + * array. * - * @param input String The String to be cutted into pieces - * @return String[] The array containing the separate words + *@param input String The String to be cutted into pieces + *@return String[] The array containing the separate words */ - public String[] tokenize(String input) { + public String[] tokenize(String input) + { Vector v = new Vector(); StringTokenizer t = new StringTokenizer(input); String cmd[]; @@ -107,124 +147,186 @@ return cmd; } - public void showChemFile(Reader file) { - ChemObjectReader cor = null; - /* Have the ReaderFactory determine the file format */ - try { - cor = getChemObjectReader(file); - } catch (IOException ioExc) { - logger.warn("IOException while determining file format."); - logger.debug(ioExc); - } catch (Exception exc) { - logger.warn("Exception while determining file format."); - logger.debug(exc); - } - - if (cor == null) { - JOptionPane.showMessageDialog(this, "Could not determine file format."); - return; - } - - String error = null; - ChemFile chemFile = null; - ChemModel chemModel = null; - if (cor.accepts(new ChemFile())) { // try to read a ChemFile - try { - chemFile = (ChemFile)cor.read((ChemObject)new ChemFile()); - if (chemFile != null) { - processChemFile(chemFile); - return; - } else { - logger.warn("The object chemFile was empty unexpectedly!"); - } - } catch (Exception exception) { - error = "Error while reading file: " + exception.getMessage(); - logger.warn(error); - logger.debug(exception); - } - } - if (error != null) { - JOptionPane.showMessageDialog(this, error); - return; - } - if (cor.accepts(new ChemModel())) { // try to read a ChemModel - try { - chemModel = (ChemModel)cor.read((ChemObject)new ChemModel()); - if (chemModel != null) { - processChemModel(chemModel); - return; - } else { - logger.warn("The object chemModel was empty unexpectedly!"); - } - error = null; // overwrite previous problems, it worked now - } catch (Exception exception) { - error = "Error while reading file: " + exception.getMessage(); - logger.error(error); - logger.debug(exception); - } - } - if (error != null) { - JOptionPane.showMessageDialog(this, error); - } - } - - private void processChemFile(ChemFile chemFile) { - logger.info("Information read from file:"); - - int chemSequenceCount = chemFile.getChemSequenceCount(); - logger.info(" # sequences: ", chemSequenceCount); - - for (int i = 0; i < chemSequenceCount; i++) { - ChemSequence chemSequence = chemFile.getChemSequence(i); - - int chemModelCount = chemSequence.getChemModelCount(); - logger.info(" # model in seq(" + i + "): ", chemModelCount); - - for (int j = 0; j < chemModelCount; j++) { - ChemModel chemModel = chemSequence.getChemModel(j); - processChemModel(chemModel); - } - } - } - - private void processChemModel(ChemModel chemModel) { - // check for bonds - if (ChemModelManipulator.getAllInOneContainer(chemModel).getBondCount() == 0) { - String error = "Model does not have bonds. Cannot depict contents."; - logger.warn(error); - JOptionPane.showMessageDialog(this, error); - return; - } - - // check for coordinates - if (!(GeometryTools.has2DCoordinates(ChemModelManipulator.getAllInOneContainer(chemModel)))) { - - String error = "Model does not have coordinates. Cannot open file."; - logger.warn(error); - - //JOptionPane.showMessageDialog(jcp, error); - CreateCoordinatesForFileDialog frame = new CreateCoordinatesForFileDialog(chemModel); - JChemPaint.getInstance().add(frame); - frame.pack(); - frame.show(); - return; - } - - JChemPaintModel jcpm = new JChemPaintModel(chemModel); - - setJChemPaintModel(jcpm); - } - - private ChemObjectReader getChemObjectReader(Reader reader) throws IOException { - ReaderFactory factory = new ReaderFactory(); - ChemObjectReader coReader = factory.createReader(reader); - if (coReader != null) { - coReader.addChemObjectIOListener(new SwingGUIListener(JChemPaint.getInstance(), 4)); - } - return coReader; - } + /** + * Description of the Method + * + *@param file Description of the Parameter + */ + public void showChemFile(Reader file) + { + ChemObjectReader cor = null; + + /* + * Have the ReaderFactory determine the file format + */ + try + { + cor = getChemObjectReader(file); + } catch (IOException ioExc) + { + logger.warn("IOException while determining file format."); + logger.debug(ioExc); + } catch (Exception exc) + { + logger.warn("Exception while determining file format."); + logger.debug(exc); + } + + if (cor == null) + { + JOptionPane.showMessageDialog(this, "Could not determine file format."); + return; + } + + String error = null; + ChemFile chemFile = null; + ChemModel chemModel = null; + if (cor.accepts(new ChemFile())) + { + // try to read a ChemFile + try + { + chemFile = (ChemFile) cor.read((ChemObject) new ChemFile()); + if (chemFile != null) + { + processChemFile(chemFile); + return; + } else + { + logger.warn("The object chemFile was empty unexpectedly!"); + } + } catch (Exception exception) + { + error = "Error while reading file: " + exception.getMessage(); + logger.warn(error); + logger.debug(exception); + } + } + if (error != null) + { + JOptionPane.showMessageDialog(this, error); + return; + } + if (cor.accepts(new ChemModel())) + { + // try to read a ChemModel + try + { + chemModel = (ChemModel) cor.read((ChemObject) new ChemModel()); + if (chemModel != null) + { + processChemModel(chemModel); + return; + } else + { + logger.warn("The object chemModel was empty unexpectedly!"); + } + error = null; + // overwrite previous problems, it worked now + } catch (Exception exception) + { + error = "Error while reading file: " + exception.getMessage(); + logger.error(error); + logger.debug(exception); + } + } + if (error != null) + { + JOptionPane.showMessageDialog(this, error); + } + } + + + /** + * Description of the Method + * + *@param chemFile Description of the Parameter + */ + private void processChemFile(ChemFile chemFile) + { + logger.info("Information read from file:"); + + int chemSequenceCount = chemFile.getChemSequenceCount(); + logger.info(" # sequences: ", chemSequenceCount); + + for (int i = 0; i < chemSequenceCount; i++) + { + ChemSequence chemSequence = chemFile.getChemSequence(i); + + int chemModelCount = chemSequence.getChemModelCount(); + logger.info(" # model in seq(" + i + "): ", chemModelCount); + + for (int j = 0; j < chemModelCount; j++) + { + ChemModel chemModel = chemSequence.getChemModel(j); + processChemModel(chemModel); + } + } + } + + + /** + * Description of the Method + * + *@param chemModel Description of the Parameter + */ + private void processChemModel(ChemModel chemModel) + { + // check for bonds + if (ChemModelManipulator.getAllInOneContainer(chemModel).getBondCount() == 0) + { + String error = "Model does not have bonds. Cannot depict contents."; + logger.warn(error); + JOptionPane.showMessageDialog(this, error); + return; + } + + // check for coordinates + if (!(GeometryTools.has2DCoordinates(ChemModelManipulator.getAllInOneContainer(chemModel)))) + { + + String error = "Model does not have coordinates. Cannot open file."; + logger.warn(error); + + //JOptionPane.showMessageDialog(jcp, error); + CreateCoordinatesForFileDialog frame = new CreateCoordinatesForFileDialog(chemModel); + JChemPaint.getInstance().add(frame); + frame.pack(); + frame.show(); + return; + } + + JChemPaintModel jcpm = new JChemPaintModel(chemModel); + + setJChemPaintModel(jcpm); + } + + + /** + * Gets the chemObjectReader attribute of the JChemPaintPanel object + * + *@param reader Description of the Parameter + *@return The chemObjectReader value + *@exception IOException Description of the Exception + */ + private ChemObjectReader getChemObjectReader(Reader reader) throws IOException + { + ReaderFactory factory = new ReaderFactory(); + ChemObjectReader coReader = factory.createReader(reader); + if (coReader != null) + { + coReader.addChemObjectIOListener(new SwingGUIListener(JChemPaint.getInstance(), 4)); + } + return coReader; + } + + /** + * Description of the Method + * + *@param chemFile Description of the Parameter + */ public void showChemFile(ChemFile chemFile) { logger.info("Information read from file:"); @@ -247,6 +349,12 @@ } } + + /** + * Description of the Method + * + *@param chemModel Description of the Parameter + */ public void showChemModel(ChemModel chemModel) { // check for bonds @@ -282,9 +390,10 @@ * *@return The chemModel value */ - public ChemModel getChemModel() { - return jcpm.getChemModel(); - } + public ChemModel getChemModel() + { + return jcpm.getChemModel(); + } /** @@ -292,7 +401,8 @@ * *@return The chemFile value */ - public ChemFile getChemFile() { + public ChemFile getChemFile() + { ChemFile file = new ChemFile(); ChemSequence sequence = new ChemSequence(); sequence.addChemModel(getChemModel()); |
|
From: Christoph S. <ste...@us...> - 2005-04-20 13:03:30
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16150/src/org/openscience/jchempaint/application Modified Files: JChemPaint.java JChemPaintFrame.java Log Message: removed all my conflicts after update Index: JChemPaint.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application/JChemPaint.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- JChemPaint.java 14 Apr 2005 19:57:28 -0000 1.11 +++ JChemPaint.java 20 Apr 2005 13:03:20 -0000 1.12 @@ -1,4 +1,5 @@ -/* $RCSfile$ +/* + * $RCSfile$ * $Author$ * $Date$ * $Revision$ @@ -7,23 +8,23 @@ * * Contact: jch...@li... * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * All we ask is that proper credit is given for our work, which includes - * - but is not limited to - adding the above copyright notice to the beginning - * of your source code files, and to any copyright notice that you may distribute - * with programs based on this work. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * All we ask is that proper credit is given for our work, which includes + * - but is not limited to - adding the above copyright notice to the beginning + * of your source code files, and to any copyright notice that you may distribute + * with programs based on this work. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.openscience.jchempaint.application; @@ -61,47 +62,92 @@ import org.apache.commons.cli.UnrecognizedOptionException; /** - * JChemPaint main class. + * JChemPaint main class. * - * @author steinbeck - * @author egonw - * @created a long time ago + *@author steinbeck + *@author egonw + *@created a long time ago */ -public class JChemPaint extends JFrame implements SwingConstants { +public class JChemPaint extends JFrame implements SwingConstants +{ + + private static JChemPaint jchempaintInstance = null; + + /** + * Description of the Field + */ + public final static String globalPluginDir = ""; - private static JChemPaint jchempaintInstance = null; - - public static final String globalPluginDir = ""; - + /** + * Description of the Field + */ public static boolean standAlone = false; + /** + * Description of the Field + */ public final static String tipSuffix = "Tooltip"; + /** + * Description of the Field + */ public static boolean debug = false; - public JButton selectButton; + /** + * Description of the Field + */ + public JButton selectButton; + /** + * Description of the Field + */ protected FileDialog fileDialog; + /** + * Description of the Field + */ public static File currentWorkDirectory = null; + /** + * Description of the Field + */ public static javax.swing.filechooser.FileFilter currentOpenFileFilter = null; + /** + * Description of the Field + */ public static javax.swing.filechooser.FileFilter currentSaveFileFilter = null; + /** + * Description of the Field + */ public static File lastOpenedFile = null; + /** + * Description of the Field + */ public static File lastSavedFile = null; private Locale currentLocale = new Locale("en", "EN"); private static JChemPaintFrame frame; + /** + * Description of the Field + */ protected CDKPluginManager pluginManager = null; /* * End of GUI declarations */ + /** + * Description of the Field + */ public static File jhome = null; + /** + * Description of the Field + */ public static File curdir; + /** + * Description of the Field + */ public static URL jcplogo; - /** * This is used for counting the jcp intances in order to be able to close * the whole vm when the last window of a sdi application is closed @@ -112,6 +158,11 @@ boolean embedded = false; + /** + * The main program for the JChemPaint class + * + *@param args The command line arguments + */ public static void main(String[] args) { try @@ -130,54 +181,58 @@ options.addOption("h", "help", false, "give this help page"); options.addOption("v", "version", false, "gives JChemPaints version number"); options.addOption("1", "sdi", false, "starts JChemPaint with an Single Document Interface"); - options.addOption( - OptionBuilder.withArgName("property=value"). - hasArg(). - withValueSeparator(). - withDescription("supported options are given below"). - create("D") - ); + options.addOption( + OptionBuilder.withArgName("property=value"). + hasArg(). + withValueSeparator(). + withDescription("supported options are given below"). + create("D") + ); CommandLine line = null; try { CommandLineParser parser = new PosixParser(); line = parser.parse(options, args); - } catch (UnrecognizedOptionException exception) { - System.err.println(exception.getMessage()); - System.exit(-1); - } catch (ParseException exception) { + } catch (UnrecognizedOptionException exception) + { + System.err.println(exception.getMessage()); + System.exit(-1); + } catch (ParseException exception) + { System.err.println("Unexpected exception: " + exception.toString()); } - if (line.hasOption("v")) { - Package self = Package.getPackage("org.openscience.jchempaint"); - String version = self.getImplementationVersion(); - - System.out.println("JChemPaint v." + version + "\n"); - System.exit(0); - } - - if (line.hasOption("h")) { - Package self = Package.getPackage("org.openscience.jchempaint"); - String version = self.getImplementationVersion(); - - System.out.println("JChemPaint v." + version + "\n"); + if (line.hasOption("v")) + { + Package self = Package.getPackage("org.openscience.jchempaint"); + String version = self.getImplementationVersion(); + + System.out.println("JChemPaint v." + version + "\n"); + System.exit(0); + } + + if (line.hasOption("h")) + { + Package self = Package.getPackage("org.openscience.jchempaint"); + String version = self.getImplementationVersion(); + + System.out.println("JChemPaint v." + version + "\n"); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("JChemPaint", options); - // now report on the -D options - System.out.println(); - System.out.println("The -D options are as follows (defaults in parathesis):"); - System.out.println(" cdk.debugging [true|false] (false)"); - System.out.println(" cdk.debug.stdout [true|false] (false)"); - System.out.println(" devel.gui [true|false] (false)"); - System.out.println(" gui [stable|experimental] (stable)"); - System.out.println(" plugin.dir (unset)"); - System.out.println(" user.language [DE|EN|NL|PL] (EN)"); - - System.exit(0); + // now report on the -D options + System.out.println(); + System.out.println("The -D options are as follows (defaults in parathesis):"); + System.out.println(" cdk.debugging [true|false] (false)"); + System.out.println(" cdk.debug.stdout [true|false] (false)"); + System.out.println(" devel.gui [true|false] (false)"); + System.out.println(" gui [stable|experimental] (stable)"); + System.out.println(" plugin.dir (unset)"); + System.out.println(" user.language [DE|EN|NL|PL] (EN)"); + + System.exit(0); } // Process command line arguments @@ -215,12 +270,12 @@ logger = new LoggingTool(this); logger.dumpSystemProperties(); - logger.debug(" ++++ ++++ ++++ ++++ ++++ ++++ ++++ "); + logger.debug(" ++++ ++++ ++++ ++++ ++++ ++++ ++++ "); loadResources(); - logger.debug(" ++++ ++++ ++++ ++++ ++++ ++++ "); - setupUserLanguage(locale); - logger.debug(" ++++ ++++ ++++ ++++ ++++ "); - JChemPaintFrame jcpf = getEmptyFrameWithModel(); + logger.debug(" ++++ ++++ ++++ ++++ ++++ ++++ "); + setupUserLanguage(locale); + logger.debug(" ++++ ++++ ++++ ++++ ++++ "); + JChemPaintFrame jcpf = getEmptyFrameWithModel(); addAndShowJChemPaintFrame(jcpf); logger.debug(" ++++ ++++ ++++ ++++ "); /* if (addPluginMenu) { @@ -238,65 +293,91 @@ if (System.getProperty("user.dir") != null) { currentWorkDirectory = new File(System.getProperty("user.dir")); } - } catch(Exception exc) { + } catch (Exception exc) + { logger.error("Could not read a system property. I might be in a sandbox."); } - } - - private void setupUserLanguage(String localeString) { - currentLocale = new Locale("en"); - try { - if (localeString == null) { - localeString = System.getProperty("user.language"); - } - // Set the prefered language {{{ - logger.info("User set language: ", localeString); - if (localeString != null) { - StringTokenizer st = new StringTokenizer(localeString, "_"); - if (st.hasMoreTokens()) { - String language = st.nextToken(); - if (st.hasMoreTokens()) { - String country = st.nextToken(); - currentLocale = new Locale(language, country); - } else { - currentLocale = new Locale(language); - } - } - } - } catch(Exception exc) { + } + + + /** + * Description of the Method + * + *@param localeString Description of the Parameter + */ + private void setupUserLanguage(String localeString) + { + currentLocale = new Locale("en"); + try + { + if (localeString == null) + { + localeString = System.getProperty("user.language"); + } + // Set the prefered language {{{ + logger.info("User set language: ", localeString); + if (localeString != null) + { + StringTokenizer st = new StringTokenizer(localeString, "_"); + if (st.hasMoreTokens()) + { + String language = st.nextToken(); + if (st.hasMoreTokens()) + { + String country = st.nextToken(); + currentLocale = new Locale(language, country); + } else + { + currentLocale = new Locale(language); + } + } + } + } catch (Exception exc) + { logger.error("Could not read a system property. I might be in a sandbox."); - logger.debug(exc); + logger.debug(exc); } - } - - private void setupPluginManager(JChemPaintFrame jcpf) { - try { + } + + + /** + * Description of the Method + * + *@param jcpf Description of the Parameter + */ + private void setupPluginManager(JChemPaintFrame jcpf) + { + try + { // set up plugin manager - JCPPropertyHandler jcph = JCPPropertyHandler.getInstance(); - pluginManager = new CDKPluginManager(jcph.getJChemPaintDir().toString(), (JChemPaintEditorPanel)jcpf.getJChemPaintPanel()); - // load the plugins that come with JCP itself + JCPPropertyHandler jcph = JCPPropertyHandler.getInstance(); + pluginManager = new CDKPluginManager(jcph.getJChemPaintDir().toString(), (JChemPaintEditorPanel) jcpf.getJChemPaintPanel()); + // load the plugins that come with JCP itself pluginManager.loadPlugin("org.openscience.cdkplugin.dirbrowser.DirBrowserPlugin"); - // load the global plugins - if (!globalPluginDir.equals("")) { - pluginManager.loadPlugins(globalPluginDir); - } - // load the user plugins - pluginManager.loadPlugins(new File(jcph.getJChemPaintDir(), "plugins").toString()); - // load plugins given with -Dplugin.dir=bla - if (System.getProperty("plugin.dir") != null) { - pluginManager.loadPlugins(System.getProperty("plugin.dir")); - } - } catch(Exception exc) { + // load the global plugins + if (!globalPluginDir.equals("")) + { + pluginManager.loadPlugins(globalPluginDir); + } + // load the user plugins + pluginManager.loadPlugins(new File(jcph.getJChemPaintDir(), "plugins").toString()); + // load plugins given with -Dplugin.dir=bla + if (System.getProperty("plugin.dir") != null) + { + pluginManager.loadPlugins(System.getProperty("plugin.dir")); + } + } catch (Exception exc) + { logger.error("Could not initialize Plugin-Manager. I might be in a sandbox."); - logger.debug(exc); + logger.debug(exc); } - } + } + /** * Creates a new JChemPaintFrame that owns a new JChemPaintModel and returns - * it. - * Use addAndShowJChemPaintFrame to actually add it to the desktopPane + * it. Use addAndShowJChemPaintFrame to actually add it to the desktopPane * *@return The new JChemPaintFrame with its new JChemPaintModel */ @@ -309,22 +390,26 @@ String version = self.getImplementationVersion(); jcpm.setSoftware("JChemPaint " + version); jcpm.setGendate((Calendar.getInstance()).getTime().toString()); - JChemPaintFrame jcpf = getNewFrame(jcpm); return jcpf; } - /** - * Creates a new localized string that can be used as a title for the new - * frame. - */ - private String getNewFrameName() { - return JCPLocalizationHandler.getInstance().getString("Untitled-") + Integer.toString(1); - } - + + /** + * Creates a new localized string that can be used as a title for the new + * frame. + * + *@return The newFrameName value + */ + private String getNewFrameName() + { + return JCPLocalizationHandler.getInstance().getString("Untitled-") + Integer.toString(1); + } + + /** - * Creates a new JChemPaintFrame and assigns a given Model to it. - * Use addAndShowJChemPaintFrame to actually add it to the desktopPane + * Creates a new JChemPaintFrame and assigns a given Model to it. Use + * addAndShowJChemPaintFrame to actually add it to the desktopPane * *@param jcpm The model to be assigned to the new frame. *@return The new JChemPaintFrame with its new JChemPaintModel @@ -336,14 +421,15 @@ return jcpf; } + /** - * Adds a given JChemPaintFrame to the central desktopPane - * of JChemPaint and configures it. + * Adds a given JChemPaintFrame to the central desktopPane of JChemPaint and + * configures it. * - *@param jcpm The model to be assigned to the new frame. - *@return The new JChemPaintFrame with its new JChemPaintModel + *@param jcpf The feature to be added to the AndShowJChemPaintFrame attribute */ - public void addAndShowJChemPaintFrame(JChemPaintFrame jcpf) { + public void addAndShowJChemPaintFrame(JChemPaintFrame jcpf) + { jcpf.show(); } @@ -358,11 +444,13 @@ { JChemPaintFrame currentFrame = getCurrentFrame(); JChemPaintModel model = null; - if (currentFrame != null) { + if (currentFrame != null) + { model = currentFrame.getModel(); - } else { - logger.warn("currentFrame == null!"); - } + } else + { + logger.warn("currentFrame == null!"); + } return model; } @@ -396,9 +484,9 @@ return null; } + /** - * Tries to load the resources. - * If run in an applet, try to fail gracefully. + * Tries to load the resources. If run in an applet, try to fail gracefully. */ private void loadResources() { @@ -412,6 +500,7 @@ } } + /** * Gets the pluginManager attribute of the JChemPaint object * @@ -445,12 +534,14 @@ } /** - * Terminates the currently running Java Virtual Machine. + * Terminates the currently running Java Virtual Machine. @ param e Window + * closing Event * - * @ param e Window closing Event + *@param e Description of the Parameter */ - public void windowClosing(WindowEvent e) { - jcp.exitJChemPaint(); + public void windowClosing(WindowEvent e) + { + jcp.exitJChemPaint(); } } @@ -478,8 +569,4 @@ } return jchempaintInstance; } - - } - - Index: JChemPaintFrame.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/application/JChemPaintFrame.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- JChemPaintFrame.java 14 Apr 2005 19:42:50 -0000 1.11 +++ JChemPaintFrame.java 20 Apr 2005 13:03:21 -0000 1.12 @@ -89,7 +89,7 @@ undoStack = new UndoStack(undoStackSize); undoStack.push(cloneModel(jcpm)); jcpm.addChangeListener(this); - /* setPreferredSize(new Dimension(500, 400)); */ + // setPreferredSize(new Dimension(500, 400)); setBackground(Color.white); jcpp = new JChemPaintEditorPanel(jcpm); @@ -125,8 +125,8 @@ getContentPane().add(workPanel, BorderLayout.CENTER); - pack(); - repaint(); + //pack(); + //repaint(); /* jcpp.addMouseMotionListener(jcpp.r2d); */ /* set the drag-n-drop/copy-paste handler |
|
From: seb <te...@us...> - 2005-04-15 13:58:10
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6517/src/org/openscience/jchempaint/action Modified Files: Tag: release-2-0-branch CleanupAction.java ZoomAction.java Log Message: Added Fit in screen function which zooms the molecule to the size of the current frame. Fixed problem with objects which are out of bounds of current frame. Index: CleanupAction.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action/CleanupAction.java,v retrieving revision 1.23.2.3 retrieving revision 1.23.2.4 diff -u -r1.23.2.3 -r1.23.2.4 --- CleanupAction.java 12 Apr 2005 23:44:46 -0000 1.23.2.3 +++ CleanupAction.java 15 Apr 2005 13:57:29 -0000 1.23.2.4 @@ -29,11 +29,13 @@ package org.openscience.jchempaint.action; import java.awt.event.ActionEvent; +import java.awt.Dimension; import javax.vecmath.Point2d; import javax.vecmath.Vector2d; import org.openscience.cdk.Atom; +import org.openscience.cdk.AtomContainer; import org.openscience.cdk.Bond; import org.openscience.cdk.ChemModel; import org.openscience.cdk.ChemObject; @@ -180,6 +182,14 @@ } model.setSetOfReactions(newSet); } + + /*AtomContainer wholeModel = ChemModelManipulator.getAllInOneContainer(jcpmodel.getChemModel()); + Dimension dim = jcp.getCurrentFrame().getJChemPaintPanel().getSize(); + GeometryTools.translateAllPositive(wholeModel); + GeometryTools.center(wholeModel, dim); + GeometryTools.scaleMolecule(wholeModel, dim, 0.95); + + jcp.getCurrentFrame().getJChemPaintPanel().revalidate();*/ jcpmodel.fireChange(); } Index: ZoomAction.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action/ZoomAction.java,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -r1.8.2.2 -r1.8.2.3 --- ZoomAction.java 17 Jan 2005 20:13:11 -0000 1.8.2.2 +++ ZoomAction.java 15 Apr 2005 13:57:30 -0000 1.8.2.3 @@ -28,6 +28,7 @@ package org.openscience.jchempaint.action; import java.awt.event.ActionEvent; +import java.awt.Dimension; import org.openscience.cdk.renderer.Renderer2DModel; import org.openscience.jchempaint.JChemPaintModel; @@ -44,7 +45,20 @@ renderModel.setZoomFactor(renderModel.getZoomFactor()/1.5); } else if (type.equals("original")) { renderModel.setZoomFactor(1.0); - } else { + } else if (type.equals("fitInScreen")) { + int scrollWidth = 20; + // shouldn't be needed. Without it this doesn't work proper every 2nd time. + renderModel.setZoomFactor(1.0); + Dimension dimModel = renderModel.getBackgroundDimension(); + Dimension dimFrame = jcp.getCurrentFrame().getSize(); + double widthRatio = dimModel.width/(double)(dimFrame.width - scrollWidth); + double heightRatio = dimModel.height/(double)(dimFrame.height - scrollWidth); + if (widthRatio >= heightRatio) { + renderModel.setZoomFactor(1/widthRatio); + } else { + renderModel.setZoomFactor(1/heightRatio); + } + } else { logger.error("Unkown zoom command: " + type); } jcpm.fireChange(); |
|
From: seb <te...@us...> - 2005-04-15 13:58:09
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6517/src/org/openscience/jchempaint Modified Files: Tag: release-2-0-branch JChemPaintModel.java JChemPaintPanel.java StatusBar.java Log Message: Added Fit in screen function which zooms the molecule to the size of the current frame. Fixed problem with objects which are out of bounds of current frame. Index: JChemPaintModel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintModel.java,v retrieving revision 1.37.2.6 retrieving revision 1.37.2.7 diff -u -r1.37.2.6 -r1.37.2.7 --- JChemPaintModel.java 14 Apr 2005 10:59:31 -0000 1.37.2.6 +++ JChemPaintModel.java 15 Apr 2005 13:57:29 -0000 1.37.2.7 @@ -30,6 +30,8 @@ import java.util.EventObject; +import java.awt.Dimension; + import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.EventListenerList; @@ -39,6 +41,7 @@ import org.openscience.cdk.ChemModel; import org.openscience.cdk.controller.Controller2DModel; import org.openscience.cdk.event.CDKChangeListener; +import org.openscience.cdk.geometry.GeometryTools; import org.openscience.cdk.renderer.Renderer2DModel; import org.openscience.cdk.tools.manipulator.ChemModelManipulator; import org.openscience.cdk.tools.manipulator.AtomContainerManipulator; @@ -218,6 +221,7 @@ * model. */ public void fireChange() { + updateBackgroundDimension(); fireChange(this); } @@ -424,5 +428,21 @@ isModified = true; } + + public void updateBackgroundDimension() + { + int offset = 50; + AtomContainer ac = ChemModelManipulator.getAllInOneContainer(model); + GeometryTools.translateAllPositive(ac); + double scaleFactor = GeometryTools.getScaleFactor(ac, rendererModel.getBondLength()); + GeometryTools.scaleMolecule(ac, scaleFactor); + + Dimension dimension = GeometryTools.get2DDimension(ac); + // returned dimension to small -> offset + dimension.setSize(dimension.width + offset, dimension.height + offset); + rendererModel.setBackgroundDimension(dimension); + GeometryTools.center(ac, dimension); + } + } Index: JChemPaintPanel.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/JChemPaintPanel.java,v retrieving revision 1.36.2.2 retrieving revision 1.36.2.3 diff -u -r1.36.2.2 -r1.36.2.3 --- JChemPaintPanel.java 17 Jan 2005 20:12:33 -0000 1.36.2.2 +++ JChemPaintPanel.java 15 Apr 2005 13:57:29 -0000 1.36.2.3 @@ -94,35 +94,19 @@ setLayout(null); setJChemPaintModel(jcpm); - Renderer2DModel rendererModel = jcpm.getRendererModel(); + Renderer2DModel rendererModel = jcpm.getRendererModel(); if (ac.getAtomCount() != 0) { - // do some magic to get it all in one page - Dimension oneMoleculeDimension = new Dimension(700, 400); - // should be based on molecule/reaction size! - Dimension dimension = makeChemModelFit( - oneMoleculeDimension, jcpm.getChemModel() - ); - rendererModel.setBackgroundDimension(dimension); - - /* - * this code ensures that the molecule ends up somewhere in the model - * of the view screen - */ - GeometryTools.translateAllPositive(ac); - double scaleFactor = GeometryTools.getScaleFactor(ac, rendererModel.getBondLength()); - GeometryTools.scaleMolecule(ac, scaleFactor); - layoutInTable(oneMoleculeDimension, jcpm.getChemModel()); - // GeometryTools.center(ac, getPreferredSize()); - // GeometryTools.center(ac, new Dimension(300,200)); + jcpm.updateBackgroundDimension(); + // layoutInTable(oneMoleculeDimension, jcpm.getChemModel()); ??? } setOpaque(true); jcpm.getControllerModel().setBondPointerLength(rendererModel.getBondLength()); jcpm.getControllerModel().setRingPointerLength(rendererModel.getBondLength()); - // set the drag-n-drop/copy-paste handler - this.setTransferHandler(new JCPTransferHandler("JCPPanel")); + // set the drag-n-drop/copy-paste handler + this.setTransferHandler(new JCPTransferHandler("JCPPanel")); logger.debug("JCPPanel set and done..."); } @@ -377,34 +361,6 @@ repaint(); } - - /** - * Enlarges the 'one molecule' dimension to fit a set of reactions or - * molecules. - * - *@param baseDim Description of the Parameter - *@param model Description of the Parameter - *@return Description of the Return Value - */ - private Dimension makeChemModelFit(Dimension baseDim, ChemModel model) - { - Dimension newDim = new Dimension(baseDim); - // a bit ugly, but assume moleculeSet *or* reactionSet - SetOfMolecules moleculeSet = model.getSetOfMolecules(); - if (moleculeSet != null) - { - newDim.height = newDim.height * (moleculeSet.getMoleculeCount()); - return newDim; - } - SetOfReactions reactionSet = model.getSetOfReactions(); - if (reactionSet != null) - { - newDim.height = newDim.height * (reactionSet.getReactionCount()); - } - return newDim; - } - - /** * Lays out the molecules in a SetOfMolecules, or reaction in a SetOfReactions * in a one column table. @@ -439,7 +395,6 @@ } } } - } Index: StatusBar.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/StatusBar.java,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -u -r1.8.2.3 -r1.8.2.4 --- StatusBar.java 14 Apr 2005 10:59:38 -0000 1.8.2.3 +++ StatusBar.java 15 Apr 2005 13:57:29 -0000 1.8.2.4 @@ -45,10 +45,10 @@ super(); setLayout(new GridLayout(1, 3)); - setPreferredSize(new Dimension(660, 26)); + setPreferredSize(new Dimension(660, 30)); for (int i=0; i<=2; i++) { status[i] = new JLabel(); - status[i].setPreferredSize(new Dimension(220, 26)); + status[i].setPreferredSize(new Dimension(220, 30)); status[i].setBorder(BorderFactory.createEtchedBorder()); status[i].setHorizontalAlignment(JLabel.CENTER); add(status[i]); |
|
From: seb <te...@us...> - 2005-04-15 13:58:07
|
Update of /cvsroot/jchempaint/JCPCDK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6517 Modified Files: Tag: release-2-0-branch CHANGELOG.txt Log Message: Added Fit in screen function which zooms the molecule to the size of the current frame. Fixed problem with objects which are out of bounds of current frame. Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/CHANGELOG.txt,v retrieving revision 1.121.2.31 retrieving revision 1.121.2.32 diff -u -r1.121.2.31 -r1.121.2.32 --- CHANGELOG.txt 15 Apr 2005 12:50:34 -0000 1.121.2.31 +++ CHANGELOG.txt 15 Apr 2005 13:57:28 -0000 1.121.2.32 @@ -13,6 +13,8 @@ * Removed hard coded WWMM code (is available as plugin) * Fixed a problem in the build.xml that caused CDK classes from plugin jars to overwrite those from the CDK jars +* Added Fit in screen function +* Synchronized size of chemModel with sroll bars of scroll pane version 2.0.11 ----------------------- |
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6517/src/org/openscience/jchempaint/resources Modified Files: Tag: release-2-0-branch JCPBundle.properties JCPBundle_de.properties JCPGUI_stable.properties JChemPaint.properties Log Message: Added Fit in screen function which zooms the molecule to the size of the current frame. Fixed problem with objects which are out of bounds of current frame. Index: JCPBundle.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle.properties,v retrieving revision 1.62.2.5 retrieving revision 1.62.2.6 diff -u -r1.62.2.5 -r1.62.2.6 --- JCPBundle.properties 15 Apr 2005 11:06:04 -0000 1.62.2.5 +++ JCPBundle.properties 15 Apr 2005 13:57:30 -0000 1.62.2.6 @@ -161,6 +161,7 @@ zoomin=Zoom in zoomout=Zoom out zoomoriginal=Zoom 100% +zoomfitInScreen=Fit in screen renderOptions=Rendering Options blackOnWhite=Black on white whiteOnBlack=White on black Index: JCPBundle_de.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle_de.properties,v retrieving revision 1.9.2.6 retrieving revision 1.9.2.7 diff -u -r1.9.2.6 -r1.9.2.7 --- JCPBundle_de.properties 15 Apr 2005 11:06:04 -0000 1.9.2.6 +++ JCPBundle_de.properties 15 Apr 2005 13:57:30 -0000 1.9.2.7 @@ -92,6 +92,7 @@ zoomin=Zoom rein zoomout=Zoom raus zoomoriginal=Zoom 100% +zoomfitInScreen=Auf Bildschirmgr\u00F6\u00DFe kekule=Kekule-Struktur shorthand=Shorthand-Struktur renderOptions=Einstellungen Index: JCPGUI_stable.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPGUI_stable.properties,v retrieving revision 1.23.2.7 retrieving revision 1.23.2.8 diff -u -r1.23.2.7 -r1.23.2.8 --- JCPGUI_stable.properties 12 Apr 2005 23:44:47 -0000 1.23.2.7 +++ JCPGUI_stable.properties 15 Apr 2005 13:57:30 -0000 1.23.2.8 @@ -51,7 +51,7 @@ edit=cutSelected selectAll - @hydrogen \ adjustBondOrders resetBondOrders - cleanup - \ modelProps - @preferences -view=zoomin zoomout zoomoriginal - renderOptions +view=zoomin zoomout zoomoriginal zoomfitInScreen - renderOptions insert=insertSMILES report=@validate - createSMILES dict=showDicts @@ -84,7 +84,7 @@ pseudoSymbols=pseudoStar pseudoR bondpopup=@molecule selectFromChemObject cut - runValidate \ showChemObjectProperties -chemmodelpopup=modelProps - cutSelected selectAll - @hydrogen \ +chemmodelpopup=modelProps - cutSelected selectAll - zoomfitInScreen - @hydrogen \ adjustBondOrders resetBondOrders - cleanup - runValidate reactionpopup=selectFromChemObject - runValidate \ showChemObjectProperties Index: JChemPaint.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/Attic/JChemPaint.properties,v retrieving revision 1.70.2.8 retrieving revision 1.70.2.9 diff -u -r1.70.2.8 -r1.70.2.9 --- JChemPaint.properties 15 Apr 2005 11:06:05 -0000 1.70.2.8 +++ JChemPaint.properties 15 Apr 2005 13:57:30 -0000 1.70.2.9 @@ -150,6 +150,7 @@ zoominAction=org.openscience.jchempaint.action.ZoomAction@in zoomoutAction=org.openscience.jchempaint.action.ZoomAction@out zoomoriginalAction=org.openscience.jchempaint.action.ZoomAction@original +zoomfitInScreenAction=org.openscience.jchempaint.action.ZoomAction@fitInScreen renderOptionsAction=org.openscience.jchempaint.action.ModifyDisplaySettingsAction blackOnWhiteAction=org.openscience.jchempaint.action.SetColorSchemeAction@blackOnWhite whiteOnBlackAction=org.openscience.jchempaint.action.SetColorSchemeAction@whiteOnBlack |
|
From: Egon W. <eg...@us...> - 2005-04-15 12:50:45
|
Update of /cvsroot/jchempaint/JCPCDK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887 Modified Files: Tag: release-2-0-branch build.xml CHANGELOG.txt Log Message: Fixed a problem in the build.xml that caused CDK classes from plugin jars to overwrite those from the CDK jars Index: build.xml =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/build.xml,v retrieving revision 1.68.2.22 retrieving revision 1.68.2.23 diff -u -r1.68.2.22 -r1.68.2.23 --- build.xml 8 Apr 2005 13:45:45 -0000 1.68.2.22 +++ build.xml 15 Apr 2005 12:50:34 -0000 1.68.2.23 @@ -167,7 +167,7 @@ </target> <target name="check.cdkjars" id="check.cdkjars"> - <uptodate property="cdkjars.uptodate" targetfile="${appjars.dir}/org/openscience/cdk"> + <uptodate property="cdkjars.uptodate" targetfile="${appjars.dir}/org/openscience/cdk/applications"> <srcfiles dir="${lib.dir}" includes="cdk-data.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-core.jar"/> <srcfiles dir="${lib.dir}" includes="cdk-standard.jar"/> @@ -244,7 +244,7 @@ <unjar dest="${appletjars.dir}" src="${lib.dir}/jgrapht-0.5.3.jar"/> </target> - <target name="appjars" id="appjars" depends="libjars, cdkjars, pluginjars"/> + <target name="appjars" id="appjars" depends="libjars, pluginjars, cdkjars"/> <target name="cdkjars" id="cdkjars" depends="check.cdkjars" unless="cdkjars.uptodate"> <mkdir dir="${appjars.dir}"/> Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/CHANGELOG.txt,v retrieving revision 1.121.2.30 retrieving revision 1.121.2.31 diff -u -r1.121.2.30 -r1.121.2.31 --- CHANGELOG.txt 15 Apr 2005 11:04:40 -0000 1.121.2.30 +++ CHANGELOG.txt 15 Apr 2005 12:50:34 -0000 1.121.2.31 @@ -11,6 +11,8 @@ * Added displaying of molecule's sum formula * Nicer GUI for validation errors * Removed hard coded WWMM code (is available as plugin) +* Fixed a problem in the build.xml that caused CDK classes from + plugin jars to overwrite those from the CDK jars version 2.0.11 ----------------------- |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:12:21
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17028/src/org/openscience/jchempaint/resources Modified Files: Tag: release-2-0-branch JCPBundle_nl.properties Log Message: Synched dutch translation Index: JCPBundle_nl.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle_nl.properties,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -r1.15.2.1 -r1.15.2.2 --- JCPBundle_nl.properties 21 Mar 2005 12:08:25 -0000 1.15.2.1 +++ JCPBundle_nl.properties 15 Apr 2005 11:12:12 -0000 1.15.2.2 @@ -46,7 +46,6 @@ # The "Insert" Menu context description --------------------------------------- insert=Invoegen -fromWWMM=Haal uit World Wide Molecular Matrix insertSMILES=Voeg SMILES in # The "Dictionary" Menu context description ----------------------------------- |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:43
|
Update of /cvsroot/jchempaint/JCPCDK/jar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516/jar Modified Files: Tag: release-2-0-branch cdk-apps.jar cdk-core.jar cdk-data.jar cdk-experimental.jar cdk-extra.jar cdk-io.jar cdk-render.jar cdk-standard.jar Log Message: Removed hard coded WWMM code (is available as plugin) Index: cdk-apps.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-apps.jar,v retrieving revision 1.30.2.8 retrieving revision 1.30.2.9 diff -u -r1.30.2.8 -r1.30.2.9 Binary files /tmp/cvsLI8Tx7 and /tmp/cvsX3cyNU differ Index: cdk-core.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-core.jar,v retrieving revision 1.70.2.9 retrieving revision 1.70.2.10 diff -u -r1.70.2.9 -r1.70.2.10 Binary files /tmp/cvsc4alWC and /tmp/cvsRpn0Bq differ Index: cdk-data.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-data.jar,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 Binary files /tmp/cvsmYtsQG and /tmp/cvskulAzu differ Index: cdk-experimental.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-experimental.jar,v retrieving revision 1.44.2.8 retrieving revision 1.44.2.9 diff -u -r1.44.2.8 -r1.44.2.9 Binary files /tmp/cvsupdnJL and /tmp/cvs5O29xz differ Index: cdk-extra.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-extra.jar,v retrieving revision 1.75.2.9 retrieving revision 1.75.2.10 diff -u -r1.75.2.9 -r1.75.2.10 Binary files /tmp/cvsk1SLBY and /tmp/cvsrMQYLM differ Index: cdk-io.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-io.jar,v retrieving revision 1.71.2.9 retrieving revision 1.71.2.10 diff -u -r1.71.2.9 -r1.71.2.10 Binary files /tmp/cvsCx1CTv and /tmp/cvsFu4enk differ Index: cdk-render.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-render.jar,v retrieving revision 1.80.2.9 retrieving revision 1.80.2.10 diff -u -r1.80.2.9 -r1.80.2.10 Binary files /tmp/cvs6G40r9 and /tmp/cvsCDA3cY differ Index: cdk-standard.jar =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/jar/cdk-standard.jar,v retrieving revision 1.67.2.10 retrieving revision 1.67.2.11 diff -u -r1.67.2.10 -r1.67.2.11 Binary files /tmp/cvszsysm2 and /tmp/cvszFSvfR differ |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:41
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516/src/org/openscience/jchempaint Modified Files: Tag: release-2-0-branch JChemPaint.java Log Message: Removed hard coded WWMM code (is available as plugin) Index: JChemPaint.java =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/Attic/JChemPaint.java,v retrieving revision 1.104.2.10 retrieving revision 1.104.2.11 diff -u -r1.104.2.10 -r1.104.2.11 --- JChemPaint.java 1 Apr 2005 15:43:06 -0000 1.104.2.10 +++ JChemPaint.java 15 Apr 2005 11:06:02 -0000 1.104.2.11 @@ -51,7 +51,6 @@ import org.openscience.cdk.tools.manipulator.ChemModelManipulator; import org.openscience.cdk.validate.*; import org.openscience.jchempaint.io.*; -import org.openscience.jchempaint.internet.*; import org.openscience.jchempaint.action.*; import org.openscience.jchempaint.dialogs.*; import org.apache.commons.cli.Options; |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:23
|
Update of /cvsroot/jchempaint/JCPCDK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516 Modified Files: Tag: release-2-0-branch CHANGELOG.txt Log Message: Removed hard coded WWMM code (is available as plugin) Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/CHANGELOG.txt,v retrieving revision 1.121.2.29 retrieving revision 1.121.2.30 diff -u -r1.121.2.29 -r1.121.2.30 --- CHANGELOG.txt 15 Apr 2005 10:47:05 -0000 1.121.2.29 +++ CHANGELOG.txt 15 Apr 2005 11:04:40 -0000 1.121.2.30 @@ -10,6 +10,7 @@ * Added Clean up molecule functionality * Added displaying of molecule's sum formula * Nicer GUI for validation errors +* Removed hard coded WWMM code (is available as plugin) version 2.0.11 ----------------------- |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:17
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516/src/org/openscience/jchempaint/action Removed Files: Tag: release-2-0-branch FromWWMMAction.java Log Message: Removed hard coded WWMM code (is available as plugin) --- FromWWMMAction.java DELETED --- |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:16
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516/src/org/openscience/jchempaint/resources Modified Files: Tag: release-2-0-branch JCPBundle.properties JCPBundle_de.properties JCPBundle_en.properties JCPBundle_fr.properties JCPBundle_pl.properties JChemPaint.properties Log Message: Removed hard coded WWMM code (is available as plugin) Index: JCPBundle.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle.properties,v retrieving revision 1.62.2.4 retrieving revision 1.62.2.5 diff -u -r1.62.2.4 -r1.62.2.5 --- JCPBundle.properties 12 Apr 2005 23:44:47 -0000 1.62.2.4 +++ JCPBundle.properties 15 Apr 2005 11:06:04 -0000 1.62.2.5 @@ -167,13 +167,10 @@ # The "Insert" Menu context description --------------------------------------- # (insert) root menu name. -# (fromWWMM) menu option used ot open up a window to download structures from -# the World Wide Molecular Matrix # (insertSMILES) menu option used to insert on the sketch a molecule or a # reaction build from a SMILES string. insert=Insert -fromWWMM=From World Wide Molecular Matrix insertSMILES=Insert SMILES # The "Dictionary" Menu context description ----------------------------------- Index: JCPBundle_de.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle_de.properties,v retrieving revision 1.9.2.5 retrieving revision 1.9.2.6 diff -u -r1.9.2.5 -r1.9.2.6 --- JCPBundle_de.properties 12 Apr 2005 23:44:47 -0000 1.9.2.5 +++ JCPBundle_de.properties 15 Apr 2005 11:06:04 -0000 1.9.2.6 @@ -103,13 +103,10 @@ # The "Insert" Menu context description --------------------------------------- # (insert) root menu name. -# (fromWWMM) menu option used ot open up a window to download structures from -# the World Wide Molecular Matrix # (insertSMILES) menu option used to insert on the sketch a molecule or a # reaction build from a SMILES string. insert=Einf\u00FCgen -fromWWMM=Von World Wide Molecular Matrix insertSMILES=SMILES einf\u00FCgen # The "Dictionary" Menu context description ----------------------------------- Index: JCPBundle_en.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/Attic/JCPBundle_en.properties,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- JCPBundle_en.properties 12 Apr 2005 23:44:47 -0000 1.1.2.7 +++ JCPBundle_en.properties 15 Apr 2005 11:06:05 -0000 1.1.2.8 @@ -169,13 +169,10 @@ # The "Insert" Menu context description --------------------------------------- # (insert) root menu name. -# (fromWWMM) menu option used ot open up a window to download structures from -# the World Wide Molecular Matrix # (insertSMILES) menu option used to insert on the sketch a molecule or a # reaction build from a SMILES string. insert=Insert -fromWWMM=From World Wide Molecular Matrix insertSMILES=Insert SMILES # The "Dictionary" Menu context description ----------------------------------- Index: JCPBundle_fr.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle_fr.properties,v retrieving revision 1.5.2.4 retrieving revision 1.5.2.5 diff -u -r1.5.2.4 -r1.5.2.5 --- JCPBundle_fr.properties 12 Apr 2005 23:44:47 -0000 1.5.2.4 +++ JCPBundle_fr.properties 15 Apr 2005 11:06:05 -0000 1.5.2.5 @@ -105,13 +105,10 @@ # The "Insert" Menu context description --------------------------------------- # (insert) root menu name. -# (fromWWMM) menu option used ot open up a window to download structures from -# the World Wide Molecular Matrix # (insertSMILES) menu option used to insert on the sketch a molecule or a # reaction build from a SMILES string. insert=Ins\u00e9rer -fromWWMM=Depuis World Wide Molecular Matrix insertSMILES=SMILES # The "Dictionary" Menu context description ----------------------------------- Index: JCPBundle_pl.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/JCPBundle_pl.properties,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- JCPBundle_pl.properties 21 Mar 2005 12:08:25 -0000 1.4.2.1 +++ JCPBundle_pl.properties 15 Apr 2005 11:06:05 -0000 1.4.2.2 @@ -53,7 +53,6 @@ export=Eksportuj jako obraz # menus file=Plik -fromWWMM=Z World Wide Molecular Matrix halogenSymbols=Halogeny... help=Pomoc heptagonTooltip=Narz\u0119dzie dodawania pier\u015bcieni cykloheptanu Index: JChemPaint.properties =================================================================== RCS file: /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/resources/Attic/JChemPaint.properties,v retrieving revision 1.70.2.7 retrieving revision 1.70.2.8 diff -u -r1.70.2.7 -r1.70.2.8 --- JChemPaint.properties 12 Apr 2005 23:44:47 -0000 1.70.2.7 +++ JChemPaint.properties 15 Apr 2005 11:06:05 -0000 1.70.2.8 @@ -155,7 +155,6 @@ whiteOnBlackAction=org.openscience.jchempaint.action.SetColorSchemeAction@whiteOnBlack # Insert menu -fromWWMMAction=org.openscience.jchempaint.action.FromWWMMAction insertSMILESAction=org.openscience.jchempaint.action.InsertSmilesAction cascadeAction=DoesNotExistYet @@ -254,7 +253,6 @@ ####################################################### General.UndoStackSize=50 -General.WWMM=wwmm.ch.cam.ac.uk General.UserName= Drawing.BondLength=1.5 Drawing.ElementFontType=SansSerif |
|
From: Egon W. <eg...@us...> - 2005-04-15 11:06:16
|
Update of /cvsroot/jchempaint/JCPCDK/src/org/openscience/jchempaint/internet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13516/src/org/openscience/jchempaint/internet Removed Files: Tag: release-2-0-branch WWMMatrixFrame.java Log Message: Removed hard coded WWMM code (is available as plugin) --- WWMMatrixFrame.java DELETED --- |