Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.JPanelFixture


import org.openscience.jchempaint.matchers.ComboBoxTextComponentMatcher;

public class SetSmilesTest extends AbstractAppletTest {
  @Test
  public void testSetSmiles() throws CDKException {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    jcpApplet.setSmiles("CCCC");
    panel.get2DHub().updateView();
    Assert.assertEquals(4, panel.getChemModel().getMoleculeSet()
        .getAtomContainer(0).getAtomCount());
View Full Code Here


* #153: merging ethane internally does not delete bond from model
*/
public class Issue137Test extends AbstractAppletTest {

    @Test public void testIssue137() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        panel.get2DHub().mouseClickedDown(100, 100);
        panel.get2DHub().mouseClickedUp(100, 100);
        panel.get2DHub().updateView();
        applet.panel("renderpanel").robot.waitForIdle();
View Full Code Here

        viewer = AppletLauncher.applet(jcpApplet)
            .withParameters(parameters)
            .start();
        applet = new FrameFixture(viewer);
        applet.show();
        JPanelFixture jcppanel=applet.panel("appletframe");
        panel = (JChemPaintPanel)jcppanel.target;
        viewer.setSize(700,700);
    }
View Full Code Here

        IAtom atom = panel.getChemModel().getMoleculeSet().getAtomContainer(acnumber).getAtom(atomnumber);
        return panel.getRenderPanel().getRenderer().toScreenCoordinates(atom.getPoint2d().x,atom.getPoint2d().y);
    }   

    protected void restoreModelToEmpty(){
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        IChemModel basic = DefaultChemObjectBuilder.getInstance().newInstance(IChemModel.class);
        basic.setMoleculeSet(basic.getBuilder().newInstance(IAtomContainerSet.class));
        basic.getMoleculeSet().addAtomContainer(
                basic.getBuilder().newInstance(IAtomContainer.class));
View Full Code Here

        panel.getRenderPanel().getRenderer().getRenderer2DModel().setBondLength(10.4);
        panel.get2DHub().updateView();
    }
   
    protected void restoreModelWithBasicmol(){
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        panel.get2DHub().getController2DModel().setAutoUpdateImplicitHydrogens(true);
        String filename = "data/basic.mol";
        InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
        MDLV2000Reader reader = new MDLV2000Reader(ins);
View Full Code Here

  //                            incorrect cascading removal of the bound carbons too.
  @Test
  public void testRemoveBond() throws CDKException, ClassNotFoundException,
      IOException, CloneNotSupportedException {
    // Clean the panel:
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
    jcpApplet.setSmiles("Cn1cnc2c1c(=O)n(C)c(=O)n2C");

/*    // Paste caffeine template:
        applet.menuItem("pasteTemplate").click();
View Full Code Here

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

    @Test public void testIssue58() 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));
        applet.button("select").click();
View Full Code Here

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

    @Test public void testIssue73() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("C").click();
        applet.button("chain").click();
        panel.get2DHub().mouseClickedDown(100, 100);
        panel.get2DHub().mouseDrag(100, 100, 300, 100);
View Full Code Here

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

    @Test public void testIssue76() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel pane = (JChemPaintPanel)jcppanel.target;
        applet.button("benzene").click();
        pane.get2DHub().mouseClickedDown(100, 100);
        pane.get2DHub().mouseClickedUp(100, 100);
        pane.get2DHub().updateView();
View Full Code Here

* Tests Undo after SMILES input. See also Issue81Test
*/
public class Issue10Test extends AbstractAppletTest {

    @Test public void testIssue10() {
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel pane = (JChemPaintPanel)jcppanel.target;
        try {
          jcpApplet.setSmiles("CCCC");
          pane.get2DHub().updateView();
    } catch (Exception e) {
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.