Package java.awt

Examples of java.awt.Robot.mouseMove()


    r.waitForIdle ();
   
    Point aLocScreen = a.getLocationOnScreen();
    Point aMiddle = new Point(aLocScreen.x + a.getWidth()/2, aLocScreen.y + a.getHeight()/2) ;
   
    r.mouseMove(aMiddle.x, aMiddle.y);
    r.delay (1000);
    harness.check(!mouseEnter);
    mouseEnter = false;
   
    r.mousePress(InputEvent.BUTTON1_MASK);
View Full Code Here


    mouseUp = false;
   
    Point bLocScreen = b.getLocationOnScreen();
    Point bMiddle = new Point(bLocScreen.x + b.getWidth()/2, bLocScreen.y + b.getHeight()/2) ;
   
    r.mouseMove(bMiddle.x, bMiddle.y);
    r.delay (1000);
    harness.check(!mouseExit);
    harness.check(!mouseEnter);
    mouseEnter = false;
    mouseExit = false;
View Full Code Here

                for (int i = start; i < end; i++)
                  {
                    if (shouldStop)
                      break;
                   
                    robot.mouseMove(150, i);
                    yield();
                  }
                for (int i = end; i > start; i--)
                  {
                    if (shouldStop)
View Full Code Here

                for (int i = end; i > start; i--)
                  {
                    if (shouldStop)
                      break;
                   
                    robot.mouseMove(150, i);
                    yield();
                  }
                if (shouldStop)
                  break;
              }
View Full Code Here

               
                if (isWindows() == false)
                    Thread.sleep(5000);

                Robot roby = new Robot();
                roby.mouseMove(300, 200);
                roby.waitForIdle();
                roby.mousePress(InputEvent.BUTTON1_MASK);
                roby.waitForIdle();
                roby.mouseRelease(InputEvent.BUTTON1_MASK);
                roby.waitForIdle();
View Full Code Here

        log.println("klick mouse button...");
        try {
            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2);
            int y = point.Y + (rect.Height / 2);
            rob.mouseMove(x, y);
            System.out.println("Press Button");
            rob.mousePress(InputEvent.BUTTON3_MASK);
            System.out.println("Release Button");
            rob.mouseRelease(InputEvent.BUTTON3_MASK);
            System.out.println("done");
View Full Code Here

        log.println("release the popup menu");
        try {
            Robot rob = new Robot();
            int x = point.X;
            int y = point.Y;
            rob.mouseMove(x, y);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (java.awt.AWTException e) {
            log.println("couldn't press mouse button");
        }
View Full Code Here

    protected boolean clickOnSheet(Point point) {
        log.println("Clicking in the center of the AccessibleSpreadsheet");

        try {
            Robot rob = new Robot();
            rob.mouseMove(point.X, point.Y);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            util.utils.shortWait(1000);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
            util.utils.shortWait(1000);
        } catch (java.awt.AWTException e) {
View Full Code Here

        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {
                    Robot rob = new Robot();
                    rob.mouseMove(point.X + 5, point.Y + 5);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
                    System.out.println("couldn't fire event");
                }
            }
View Full Code Here

        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){
                public void fireEvent() {
                try {
                    Robot rob = new Robot();
                    rob.mouseMove(point.X + 25, point.Y + 5);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
                    System.out.println("couldn't fire event");
                }
                }
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.