Examples of actionMousePress()


Examples of abbot.tester.JComponentTester.actionMousePress()

   
    // 8. Change observer camera yaw by moving its yaw indicator
    float [][] cameraPoints = observerCamera.getPoints();
    int xYawIndicator = (int)(((40 + (cameraPoints[0][0] + cameraPoints[3][0]) / 2)) * planComponent.getScale());
    int yYawIndicator = (int)(((40 + (cameraPoints[0][1] + cameraPoints[3][1]) / 2)) * planComponent.getScale());
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(xYawIndicator, yYawIndicator)));
    tester.actionMouseMove(planComponent, new ComponentLocation(
        new Point(xYawIndicator + 2, yYawIndicator + 2)));
    tester.actionMouseRelease();
    // Check camera yaw angle changed
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    // Change observer camera pitch by moving its pitch indicator
    cameraPoints = observerCamera.getPoints();
    int xPitchIndicator = (int)(((40 + (cameraPoints[1][0] + cameraPoints[2][0]) / 2)) * planComponent.getScale());
    int yPitchIndicator = (int)(((40 + (cameraPoints[1][1] + cameraPoints[2][1]) / 2)) * planComponent.getScale());
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(xPitchIndicator, yPitchIndicator)));
    tester.actionMouseMove(planComponent, new ComponentLocation(
        new Point(xPitchIndicator + 2, yPitchIndicator + 2)));
    tester.actionMouseRelease();
    // Check camera pitch angle changed
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(100 + 1 / planComponent.getScale(),
        100 + 1 / planComponent.getScale(), 170,
        2.5156f, 0.1639f, home.getCamera());
   
    // 9. Change observer camera location with mouse in 3D view
    tester.actionMousePress(component3D, new ComponentLocation(new Point(10, 10)));
    tester.actionKeyPress(KeyEvent.VK_ALT);
    tester.actionMouseMove(component3D, new ComponentLocation(new Point(10, 20)));
    tester.actionKeyRelease(KeyEvent.VK_ALT);
    tester.actionMouseRelease();
    // Check camera location changed
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    // Check camera location changed
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(108.657f, 111.4631f, 170,
        2.5156f, 0.1639f, home.getCamera());

    // 10. Change observer camera yaw with mouse in 3D view
    tester.actionMousePress(component3D, new ComponentLocation(new Point(10, 20)));
    tester.actionMouseMove(component3D, new ComponentLocation(new Point(20, 20)));
    tester.actionMouseRelease();
    // Check camera yaw changed
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(108.657f, 111.4631f, 170,
        2.5656f, 0.1639f, home.getCamera());
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    // Check camera yaw changed
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(108.657f, 111.4631f, 170,
        2.5656f, 0.1639f, home.getCamera());
   
    // Change camera pitch with mouse in 3D view
    tester.actionMousePress(component3D, new ComponentLocation(new Point(20, 20)));
    tester.actionMouseMove(component3D, new ComponentLocation(new Point(20, 30)));
    tester.actionMouseRelease();
    // Check camera yaw changed
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(108.657f, 111.4631f, 170,
        2.5656f, 0.2139f, home.getCamera());
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    assertLocationAndOrientationEqualPiece(pieceX, pieceY, 0, piece);
   
    // 4. Press mouse button at piece center
    int widthPixel = Math.round(pieceWidth * planComponent.getScale());
    int depthPixel = Math.round(pieceDepth * planComponent.getScale());
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(20 + widthPixel / 2, 20 + depthPixel / 2)));
    // Drag mouse to (100, 100) from piece center
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(20 + widthPixel / 2 + 100, 20 + depthPixel / 2 + 100)));
    tester.actionMouseRelease();
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    int widthPixel = Math.round(pieceWidth * planComponent.getScale());
    int depthPixel = Math.round(pieceDepth * planComponent.getScale());
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(20 + widthPixel / 2, 20 + depthPixel / 2)));
    // Drag mouse to (100, 100) from piece center
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(20 + widthPixel / 2 + 100, 20 + depthPixel / 2 + 100)));
    tester.actionMouseRelease();
    // Check piece moved
    pieceX += 200;
    pieceY += 200;
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    pieceX += 200;
    pieceY += 200;
    assertLocationAndOrientationEqualPiece(pieceX, pieceY, 0, piece);
   
    // 5. Press mouse button at top left point of selected piece
    tester.actionMousePress(planComponent,
        new ComponentLocation(new Point(120, 120)));
    // Drag mouse to (-depthPixel / 2 - 1, widthPixel / 2) pixels from piece center
    tester.actionMouseMove(planComponent, new ComponentLocation(
        new Point(120 + widthPixel / 2 - depthPixel / 2 - 1,
                  120 + depthPixel / 2 + widthPixel / 2)));
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

    // Check piece angle is 3 * PI / 2 (=-90�)
    assertLocationAndOrientationEqualPiece(
        pieceX, pieceY, (float)Math.PI * 3 / 2, piece);

    // 6. Press mouse button at top left point of selected piece
    tester.actionMousePress(planComponent, new ComponentLocation(
        new Point(120 + widthPixel / 2 - depthPixel / 2,
                  120 + depthPixel / 2 + widthPixel / 2)));
    // Drag mouse to the previous position plus 1 pixel along x axis
    tester.actionMouseMove(planComponent, new ComponentLocation(
        new Point(121, 120)));
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMousePress()

        pieceX, pieceY, (float)Math.PI * 3 / 2, piece);
    assertCoordinatesEqualWallPoints(20, 300, 20, 20, fifthWall);
   
    // 8. Drag and drop mouse to (40, 160)
    Thread.sleep(1000); // Wait 1s to avoid double click
    tester.actionMousePress(planComponent,
        new ComponentLocation(new Point(30, 160)));
    tester.actionMouseMove(planComponent, 
        new ComponentLocation(new Point(40, 160)));
    tester.actionMouseRelease();
    // Check the piece of furniture moved 20 cm along x axis
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.