Examples of actionMouseMove()


Examples of abbot.tester.JComponentTester.actionMouseMove()

    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)));
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    Wall wall7 = orderedWalls.get(7);
    assertCoordinatesEqualWallPoints(wall7.getXStart(), wall7.getYStart(),
        planComponent.convertXPixelToModel(200),
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

    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
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(100 + 1 / planComponent.getScale(),
        100 + 1 / planComponent.getScale(), 170,
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

    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
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(100 + 1 / planComponent.getScale(),
        100 + 1 / planComponent.getScale(), 170,
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

        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
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(108.657f, 111.4631f, 170,
        2.5156f, 0.1639f, home.getCamera());
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

    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.actionMouseMove()

    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.actionMouseMove()

   
    // 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)));
    tester.actionMouseRelease();
    // Check piece angle is 3 * PI / 2 (=-90�)
    assertLocationAndOrientationEqualPiece(
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

    // 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)));
    // Check piece angle is 0�
    assertLocationAndOrientationEqualPiece(pieceX, pieceY, 0, piece);
    // Press Shift key
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

   
    // 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
    assertLocationAndOrientationEqualPiece(
        pieceX + 20, pieceY, (float)Math.PI * 3 / 2, piece);
View Full Code Here

Examples of abbot.tester.JComponentTester.actionMouseMove()

    // Drag mouse (4,4) pixels out of piece box with magnetism disabled
    Thread.sleep(1000); // Wait 1s to avoid double click
    tester.actionMousePress(planComponent, new ComponentLocation(new Point(
        pieceXPixel + depthPixel / 2, pieceYPixel - widthPixel / 2)));
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    tester.actionMouseMove(planComponent, new ComponentLocation(new Point(
        pieceXPixel + depthPixel / 2 + 4, pieceYPixel - widthPixel / 2 + 4)));
    tester.actionMouseRelease();
    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Check piece width and depth were resized (caution : piece angle is oriented at 90�)
    assertDimensionEqualPiece(pieceWidth - 4 / planComponent.getScale(),
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.