From: <eg...@us...> - 2007-09-02 14:07:08
|
Revision: 8835 http://cdk.svn.sourceforge.net/cdk/?rev=8835&view=rev Author: egonw Date: 2007-09-02 05:24:28 -0700 (Sun, 02 Sep 2007) Log Message: ----------- Niels, check line 73. It's outcommented now, pending your Swing relay implementation. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/renderer/progz/TestEditor.java Modified: trunk/cdk/src/org/openscience/cdk/renderer/progz/TestEditor.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/renderer/progz/TestEditor.java 2007-09-02 12:10:56 UTC (rev 8834) +++ trunk/cdk/src/org/openscience/cdk/renderer/progz/TestEditor.java 2007-09-02 12:24:28 UTC (rev 8835) @@ -37,6 +37,7 @@ import org.openscience.cdk.Atom; import org.openscience.cdk.DefaultChemObjectBuilder; import org.openscience.cdk.Molecule; +import org.openscience.cdk.controller.Controller2DHub; import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IBond; import org.openscience.cdk.interfaces.IChemObjectBuilder; @@ -58,6 +59,7 @@ SwingPainter painter = new SwingPainter(); StructureDiagramGenerator sdg = new StructureDiagramGenerator(); protected IChemObjectBuilder builder; + Controller2DHub hub; public void setUp() { builder = DefaultChemObjectBuilder.getInstance(); @@ -67,6 +69,9 @@ frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + hub = new Controller2DHub(); +// frame.addMouseListener(new SwingMouseEventRelay(hub)); + painter = new SwingPainter(); //painter.addMouseMotionListener(new TestRendererMouseE()); //only react on mouse clicks for now @@ -109,13 +114,12 @@ private static final long serialVersionUID = 2; Renderer2DModel model = new Renderer2DModel(); - - //IRenderer2D renderer = new Java2DRenderer(model); IJava2DRenderer renderer = new Java2DRenderer(model); private IMolecule molecule; Graphics2D graphic; + public void setMolecule(IMolecule molecule) { this.molecule = molecule; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |