Package java.awt

Examples of java.awt.Robot.mouseMove()


        try{
            Robot r = new Robot();
            r.mouseMove((int)x, (int)y);
            r.delay(2000);
            System.out.println("esperei");
            r.mouseMove((int)x, (int)y);
        }
        catch(Exception e){System.out.println("FEZE:\n"+e);}
        System.out.println("movi");
        if(1==1)
            return;
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

                try {
                    Robot rob = new Robot();
                    int x = point.X + (rect.Width / 2);
                    int y = point.Y + (rect.Height / 2);
                    log.println("try to klick into the middle of the document");
                    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

        //Point location = (Point) tEnv.getObjRelation("Location");
        //XAccessibleComponent aCom = (XAccessibleComponent) tEnv.getObjRelation("Location");
        //Point location = aCom.getLocationOnScreen();
        try {
            Robot rob = new Robot();
            rob.mouseMove(location.X + 50, location.Y + 75);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (java.awt.AWTException e) {
            System.out.println("couldn't adjust scrollbar");
        }
View Full Code Here

      if (action.equals("onmouseup")) {
        Robot robot = new Robot();
       
        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
      } else if (action.equals("onmousedown")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
View Full Code Here

        robot.mouseRelease(InputEvent.BUTTON1_MASK);
      } else if (action.equals("onmousedown")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
        robot.mousePress(InputEvent.BUTTON1_MASK);
      } else if (action.equals("mousePos")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
View Full Code Here

        robot.mousePress(InputEvent.BUTTON1_MASK);
      } else if (action.equals("mousePos")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
      } else if (action.equals("onkeydown")) {
        Robot robot = new Robot();

        int key = getInt(returnMap, "k");
View Full Code Here

        //Point location = (Point) tEnv.getObjRelation("Location");
        //XAccessibleComponent aCom = (XAccessibleComponent) tEnv.getObjRelation("Location");
        //Point location = aCom.getLocationOnScreen();
        try {
            Robot rob = new Robot();
            rob.mouseMove(location.X + 20, location.Y + 10);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (java.awt.AWTException e) {
            System.out.println("couldn't adjust scrollbar");
        }
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

        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

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.