Examples of JPanelFixture


Examples of org.fest.swing.fixture.JPanelFixture

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

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

Examples of org.fest.swing.fixture.JPanelFixture

  private static int SAVE_AS_MOL_COMBOBOX_POS=6;

  @Test
  public void testSquareSelectSingleAtom() {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    applet.button("C").click();
    Point movetopint = new Point(100, 100);
    applet.panel("renderpanel").robot.click(applet.panel("renderpanel")
        .component(), movetopint, MouseButton.LEFT_BUTTON, 1);
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

    restoreModelToEmpty();
  }

  @Test
  public void testMove() throws InterruptedException {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    // we draw a hexagon
    applet.button("hexagon").click();
    applet.panel("renderpanel").robot.click(applet.panel("renderpanel")
        .component(), new Point(100, 100), MouseButton.LEFT_BUTTON, 1);
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

        .getMoleculeSet().getAtomContainer(0).getAtom(0).getPoint2d()));
  }

  @Test
  public void testSetMolFile() throws CDKException {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    jcpApplet
        .setMolFile("\n  CDK    1/19/07,10:3\n\n  2  1  0  0  0  0  0  0  0  0999 V2000 \n  2.520000 10.220000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.270000 10.470000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2  1  1  0  0  0  0 \nM  END");
    Assert.assertEquals(2, panel.getChemModel().getMoleculeSet()
        .getAtomContainer(0).getAtomCount());
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

    restoreModelToEmpty();
  }

  @Test
  public void testBug2858663() {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    applet.button("bondTool").click();
    applet.click();
    Assert.assertEquals(2, panel.getChemModel().getMoleculeSet()
        .getAtomContainer(0).getAtomCount());
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

  }

  // @cdk.bug 2859344 /6
  @Test
  public void overwriteStereo() {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    // we draw a hexagon
    applet.button("hexagon").click();
    applet.click();
    // one of its bonds becomes an up bond
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

  }

  // @cdk.bug 2860015
  @Test
  public void testBug2860015() {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    applet.button("bondTool").click();
    applet.click();
    applet.click();
    applet.click();
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

  }

  // This is a test for overwriting of stereo bonds. Any stereo bond
  // must overwrite all others and flip itself.
  private void genericStereoBondTest(IBond.Stereo directionToTest) {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    // we draw a hexagon
    applet.button("hexagon").click();
    applet.click();
    // we make all bond types in there
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

    restoreModelToEmpty();
  }

  @Test
  public void testFlipWithStereo() {
    JPanelFixture jcppanel = applet.panel("appletframe");
    JChemPaintPanel panel = (JChemPaintPanel) jcppanel.target;
    applet.button("hexagon").click();
    applet.click();
    applet.button("up_bond").click();
    Point2d moveto = getAtomPoint(panel, 0);
View Full Code Here

Examples of org.fest.swing.fixture.JPanelFixture

        .getMoleculeSet().getAtomContainer(0).getBond(8).getStereo());
    restoreModelToEmpty();
  }

  @Test public void testBug77() throws FileNotFoundException, CDKException{
        JPanelFixture jcppanel=applet.panel("appletframe");
        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("hexagon").click();
        applet.click();
        applet.menuItem("saveAs").click();
        File file=new File(System.getProperty("java.io.tmpdir")+File.separator+"test1.mol");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.