Package abbot.tester

Examples of abbot.tester.JComponentTester.actionKeyStroke()


    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(xWallMiddle, yWallMiddle + 1000, 1000,
        (float)Math.PI, (float)Math.PI / 4, home.getCamera());
   
    // 3. Transfer focus to 3D view with TAB key
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    // Check 3D view has focus
    assertTrue("3D component doesn't have the focus", component3D.isFocusOwner());
    // Add 1� to camera pitch
    tester.actionKeyStroke(KeyEvent.VK_PAGE_UP);
    // Check camera location and angles
View Full Code Here


    // 3. Transfer focus to 3D view with TAB key
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    // Check 3D view has focus
    assertTrue("3D component doesn't have the focus", component3D.isFocusOwner());
    // Add 1� to camera pitch
    tester.actionKeyStroke(KeyEvent.VK_PAGE_UP);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(xWallMiddle, 1000.1468f, 1025.8342f,
        (float)Math.PI, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
    // 4. Remove 10� from camera yaw
View Full Code Here

    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(xWallMiddle, 1000.1468f, 1025.8342f,
        (float)Math.PI, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
    // 4. Remove 10� from camera yaw
    tester.actionKeyStroke(KeyEvent.VK_LEFT);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(144.2812f, 998.8128f, 1025.8342f,
        (float)Math.PI - (float)Math.PI / 60, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
    // Add 1� to camera yaw
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
View Full Code Here

    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(144.2812f, 998.8128f, 1025.8342f,
        (float)Math.PI - (float)Math.PI / 60, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
    // Add 1� to camera yaw
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    tester.actionKeyStroke(KeyEvent.VK_RIGHT);
    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-109.0647f, 978.874f, 1025.8342f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
View Full Code Here

    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-109.0647f, 978.874f, 1025.8342f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
    // 5. Move camera 1cm forward
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    tester.actionKeyStroke(KeyEvent.VK_UP);
    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-85.8082f, 869.4608f, 907.961f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
    // Move camera 10 backward
View Full Code Here

    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-85.8082f, 869.4608f, 907.961f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
    // Move camera 10 backward
    tester.actionKeyStroke(KeyEvent.VK_DOWN);
    // Check camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-90.4595f, 891.3434f, 931.5356f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
    // 6. View from observer
View Full Code Here

   
    // 3. Mix mouse and keyboard to create other walls
    tester.actionClick(planComponent, 300, 200);
    tester.actionMouseMove(planComponent,
        new ComponentLocation(new Point(310, 200)));
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the length and the angle of the wall
    tester.actionKeyString("100");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("315");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
View Full Code Here

    tester.actionMouseMove(planComponent,
        new ComponentLocation(new Point(310, 200)));
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the length and the angle of the wall
    tester.actionKeyString("100");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("315");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Create 3 walls with same length
    Thread.sleep(500);
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
View Full Code Here

    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Enter the length and the angle of the wall
    tester.actionKeyString("100");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("315");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Create 3 walls with same length
    Thread.sleep(500);
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    Thread.sleep(500);
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
View Full Code Here

    tester.actionKeyStroke(KeyEvent.VK_TAB);
    tester.actionKeyString("315");
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Create 3 walls with same length
    Thread.sleep(500);
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    Thread.sleep(500);
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    // Take control with mouse
    tester.actionMouseMove(planComponent,
        new ComponentLocation(new Point(200, 200)));
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.