Examples of actionKeyStroke()


Examples of abbot.tester.JComponentTester.actionKeyStroke()

    tester.waitForIdle();
    assertTrue("Name text field doesn't have focus", nameTextField.hasFocus());
    // Check text field is selected when it gains focus
    assertEquals("Name text isn't selected", nameTextField.getText(), nameTextField.getSelectedText());
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    assertTrue("X field doesn't have focus", ((DefaultEditor)xSpinner.getEditor()).getTextField().hasFocus());
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    JFormattedTextField ySpinnerTextField = ((DefaultEditor)ySpinner.getEditor()).getTextField();
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    assertEquals("Name text isn't selected", nameTextField.getText(), nameTextField.getSelectedText());
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    assertTrue("X field doesn't have focus", ((DefaultEditor)xSpinner.getEditor()).getTextField().hasFocus());
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    JFormattedTextField ySpinnerTextField = ((DefaultEditor)ySpinner.getEditor()).getTextField();
    assertTrue("Y field doesn't have focus", ySpinnerTextField.hasFocus());
    // Test if numbers greater than 10000 are correctly handled
    tester.actionKeyString("10020");
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    tester.waitForIdle();
    JFormattedTextField ySpinnerTextField = ((DefaultEditor)ySpinner.getEditor()).getTextField();
    assertTrue("Y field doesn't have focus", ySpinnerTextField.hasFocus());
    // Test if numbers greater than 10000 are correctly handled
    tester.actionKeyString("10020");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    assertFalse("Y field still has focus", ySpinnerTextField.hasFocus());
    assertEquals("Wrong Y", new Float(10020), ySpinner.getValue());
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    tester.actionKeyStroke(KeyEvent.VK_TAB);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.waitForIdle();
    assertFalse("Y field still has focus", ySpinnerTextField.hasFocus());
    assertEquals("Wrong Y", new Float(10020), ySpinner.getValue());
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    tester.waitForIdle();
    assertTrue("Y field doesn't have focus", ySpinnerTextField.hasFocus());
    tester.actionKeyString("12345");
    // Test auto commit fields
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    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);
   
    // 5. Use WALL_CREATION mode
    tester.click(frame.modeButton);  
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    tester.actionMouseRelease();
    // Check the selected walls are the second and third ones
    assertSelectionContains(frame.home, wall2, wall3);

    // 7. Press twice right arrow key    
    tester.actionKeyStroke(KeyEvent.VK_RIGHT);
    tester.actionKeyStroke(KeyEvent.VK_RIGHT);
    // Check the 4 walls coordinates are (20, 20), (504, 20), (504, 300), (24, 300)
    assertCoordinatesEqualWallPoints(20, 20, 504, 20, wall1);
    assertCoordinatesEqualWallPoints(504, 20, 504, 300, wall2);
    assertCoordinatesEqualWallPoints(504, 300, 24, 300, wall3);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    // Check the selected walls are the second and third ones
    assertSelectionContains(frame.home, wall2, wall3);

    // 7. Press twice right arrow key    
    tester.actionKeyStroke(KeyEvent.VK_RIGHT);
    tester.actionKeyStroke(KeyEvent.VK_RIGHT);
    // Check the 4 walls coordinates are (20, 20), (504, 20), (504, 300), (24, 300)
    assertCoordinatesEqualWallPoints(20, 20, 504, 20, wall1);
    assertCoordinatesEqualWallPoints(504, 20, 504, 300, wall2);
    assertCoordinatesEqualWallPoints(504, 300, 24, 300, wall3);
    assertCoordinatesEqualWallPoints(20, 20, 24, 300, wall4);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

        new ComponentLocation(new Point(50, 50)));
    // Check first wall is selected and that it moved
    assertSelectionContains(frame.home, wall1);
    assertCoordinatesEqualWallPoints(20, 60, 504, 60, wall1);
    // Lose focus
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    // Check the wall didn't move at end
    assertCoordinatesEqualWallPoints(20, 20, 504, 20, wall1);

    // 10. Click 6 times on undo button
    for (int i = 0; i < 6; i++) {
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

        PlanController.Mode.WALL_CREATION, frame.planController.getMode());
    planComponent.requestFocus();
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();
    assertTrue("Plan component doesn't have focus", planComponent.hasFocus());
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the coordinates of the start point
    tester.actionKeyString("10");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("21");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionKeyStroke()

    tester.waitForIdle();
    assertTrue("Plan component doesn't have focus", planComponent.hasFocus());
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the coordinates of the start point
    tester.actionKeyString("10");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("21");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the length of the wall
    tester.actionKeyString("200");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
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.