Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.JPanelFixture


    restoreModelWithBasicmol();
  }
 
  @Test public void testDelete() throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
      restoreModelWithBasicmol();
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        int oldAtomCount=panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtomCount();
        int oldBondCount=panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBondCount();
        //we delete an atom
        applet.button("eraser").click();
View Full Code Here


        Assert.assertEquals(oldAtomCount, panel.getRenderPanel().getRenderer().getRenderer2DModel().getSelection().getConnectedAtomContainer().getAtomCount());
  }*/

  @Test public void mergeAndUndoRedo(){
        restoreModelWithBasicmol();
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        int oldAtomCount=panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtomCount();
        applet.button("select").click();
        Point2d startpoint=getAtomPoint(panel,0);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point((int)startpoint.x, (int)startpoint.y), MouseButton.LEFT_BUTTON,1);
View Full Code Here

        Assert.assertEquals(oldAtomCount-1, panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtomCount());
  }

    @Test public void drawReactions(){
        restoreModelToEmpty();
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("hexagon").click();
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point(100,50), MouseButton.LEFT_BUTTON,1);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point(400,50), MouseButton.LEFT_BUTTON,1);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point(0,0), MouseButton.RIGHT_BUTTON,1);
View Full Code Here

public class BugSF70Test extends AbstractAppletTest {

  private static int SAVE_AS_MOL_COMBOBOX_POS=6;

  @Test public void testBug70() throws FileNotFoundException, CDKException{
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("hexagon").click();
        applet.click();
        Point2d point = getAtomPoint(panel,0);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point((int)point.x, (int)point.y), MouseButton.RIGHT_BUTTON,1);
View Full Code Here

*      bond: H2C-CH2, should be H3C-CH3
*/
public class Issue129Test extends AbstractAppletTest {
 
    @Test public void testIssue129() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        try {
          jcpApplet.setSmiles("C=C");
          panel.get2DHub().updateView();
    } catch (Exception e) {
View Full Code Here

import org.openscience.jchempaint.matchers.ComboBoxTextComponentMatcher;

public class BugSF65Test extends AbstractAppletTest {

    @Test public void testBug65() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("hexagon").click();
        applet.click();
        applet.button("eraser").click();
        Point2d point = getBondPoint(panel,0);
View Full Code Here

* @author Ralf Stephan <ralf@ark.in-berlin.de>
*/
public class Issue32Test extends AbstractAppletTest {

    @Test public void testIssue32() throws AWTException {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("C").click();
        applet.button("bondTool").click();
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(),new Point(100,100));
    IAtomContainer ethane = panel.getChemModel().getMoleculeSet().getAtomContainer(0);
View Full Code Here

    @Ignore public void testMenuValenceEight() throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
        genericValenceTest(8);
    }

    @Ignore public void testMenuValenceOff() throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtom(0).setValency(1);
        panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtom(2).setValency(2);
        genericValenceTest(-1);
    }
View Full Code Here

    panel.get2DHub().setSymbol(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtom(0),"C");
        Assert.assertEquals("periodictable",panel.get2DHub().getActiveDrawModule().getID());
  }
   
  @Test public void testMenuBondSingle() throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
    JPanelFixture jcppanel=applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
    panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBond(0).setOrder(IBond.Order.DOUBLE);
    panel.getRenderPanel().getRenderer().getRenderer2DModel().setSelection(new SingleSelection<IBond>(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBond(0)));
    panel.selectionChanged();
    applet.menuItem("bond").click();
View Full Code Here

    panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBond(0).setOrder(IBond.Order.SINGLE);
    Assert.assertEquals("bond", panel.get2DHub().getActiveDrawModule().getID());
  }
 
  @Test public void testMenuBondStereoDown() throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
    JPanelFixture jcppanel=applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
    panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBond(0).setStereo(IBond.Stereo.NONE);
    panel.getRenderPanel().getRenderer().getRenderer2DModel().setSelection(new SingleSelection<IBond>(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBond(0)));
    panel.selectionChanged();
    applet.menuItem("down_bond").click();
View Full Code Here

TOP

Related Classes of org.fest.swing.fixture.JPanelFixture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.