From: <sh...@us...> - 2009-07-06 10:17:05
|
Revision: 14668 http://cdk.svn.sourceforge.net/cdk/?rev=14668&view=rev Author: shk3 Date: 2009-07-06 10:16:59 +0000 (Mon, 06 Jul 2009) Log Message: ----------- Needed for making jcp roughly work with new jcp-primary Modified Paths: -------------- jchempaint/trunk/src/main/org/openscience/jchempaint/applet/JChemPaintEditorApplet.java jchempaint/trunk/src/main/org/openscience/jchempaint/application/JChemPaint.java Modified: jchempaint/trunk/src/main/org/openscience/jchempaint/applet/JChemPaintEditorApplet.java =================================================================== --- jchempaint/trunk/src/main/org/openscience/jchempaint/applet/JChemPaintEditorApplet.java 2009-07-03 12:23:12 UTC (rev 14667) +++ jchempaint/trunk/src/main/org/openscience/jchempaint/applet/JChemPaintEditorApplet.java 2009-07-06 10:16:59 UTC (rev 14668) @@ -28,13 +28,17 @@ */ package org.openscience.jchempaint.applet; -import org.openscience.cdk.ChemModel; +import org.openscience.cdk.DefaultChemObjectBuilder; +import org.openscience.cdk.interfaces.IChemModel; import org.openscience.jchempaint.JChemPaintPanel; public class JChemPaintEditorApplet extends JChemPaintAbstractApplet{ public static final String GUI_APPLET="applet"; public void init() { - JChemPaintPanel p = new JChemPaintPanel(new ChemModel(),GUI_APPLET,2,debug); + IChemModel chemModel = DefaultChemObjectBuilder.getInstance().newChemModel(); + chemModel.setMoleculeSet(chemModel.getBuilder().newMoleculeSet()); + chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newAtomContainer()); + JChemPaintPanel p = new JChemPaintPanel(chemModel,GUI_APPLET,2,debug); p.setShowInsertTextField(false); p.setShowStatusBar(false); setTheJcpp(p); Modified: jchempaint/trunk/src/main/org/openscience/jchempaint/application/JChemPaint.java =================================================================== --- jchempaint/trunk/src/main/org/openscience/jchempaint/application/JChemPaint.java 2009-07-03 12:23:12 UTC (rev 14667) +++ jchempaint/trunk/src/main/org/openscience/jchempaint/application/JChemPaint.java 2009-07-06 10:16:59 UTC (rev 14668) @@ -187,6 +187,8 @@ public static void showEmptyInstance(boolean debug) { IChemModel chemModel=DefaultChemObjectBuilder.getInstance().newChemModel(); + chemModel.setMoleculeSet(chemModel.getBuilder().newMoleculeSet()); + chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newAtomContainer()); showInstance(chemModel, GT._("Untitled-")+(instancecounter++), debug); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |