Examples of actionFocus()


Examples of abbot.tester.ComponentTester.actionFocus()

        tf.setColumns(10);
        KeyWatcher kw = new KeyWatcher();
        tf.addKeyListener(kw);
        showFrame(tf);
  ComponentTester tester = new ComponentTester();
  tester.actionFocus(tf);
        int code = KeyEvent.VK_ESCAPE;
        int mods = 0;
  tester.actionKeyStroke(code, mods);
        assertTrue("Never received key press", kw.gotPress);
        assertTrue("Never received release", kw.gotRelease);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionFocus()

    tester.click(frame.modeButton);
    // Check current mode is SELECTION
    assertEquals("Current mode isn't " + PlanController.Mode.SELECTION,
        PlanController.Mode.SELECTION, frame.planController.getMode());
    // Give focus to plan component
    tester.actionFocus(planComponent);
    // Press the delete key
    tester.actionKeyStroke(KeyEvent.VK_DELETE);
    // Check plan contains only the first three walls
    assertHomeContains(frame.home, wall1, wall2, wall3);
   
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.