Package java.awt

Examples of java.awt.Robot.mousePress()


            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


        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

        try {
            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2);
            int y = point.Y + (rect.Height / 2);
            rob.mouseMove(x, y);
            rob.mousePress(InputEvent.BUTTON3_MASK);
            rob.mouseRelease(InputEvent.BUTTON3_MASK);
        } catch (java.awt.AWTException e) {
            log.println("couldn't press mouse button");
        }
       
View Full Code Here

                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {                            
                    Robot rob = new Robot();
                    rob.mouseMove(point.X + 2, point.Y + 7);
                    rob.mousePress(InputEvent.BUTTON1_MASK);                   
                    rob.mouseMove(point.X + 400, point.Y);
                    rob.mouseRelease (InputEvent.BUTTON1_MASK);                                       
                } catch (java.awt.AWTException e) {
                    System.out.println("desired child doesn't exist");
                }
View Full Code Here

                    Robot rob = new Robot();
                    int x = aComp.getLocationOnScreen().X + (aComp.getBounds().Width / 2);
                    int y = aComp.getLocationOnScreen().Y + (aComp.getBounds().Height / 2);
                    System.out.println("try to click mouse button on x/y " + x + "/" + y);
                    rob.mouseMove(x, y);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
                    System.out.println("couldn't press mouse button");
                }
           
View Full Code Here

                    Robot rob = new Robot();
                    int x = aComp.getLocationOnScreen().X + (aComp.getBounds().Width / 2);
                    int y = aComp.getLocationOnScreen().Y + (aComp.getBounds().Height / 2);
                    System.out.println("try to double click mouse button on x/y " + x + "/" + y);
                    rob.mouseMove(x, y);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                    utils.shortWait(100);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
View Full Code Here

                    System.out.println("try to double click mouse button on x/y " + x + "/" + y);
                    rob.mouseMove(x, y);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                    utils.shortWait(100);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
                    System.out.println("couldn't press mouse button");
                }
           
View Full Code Here

            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2)+50;
            int y = point.Y + (rect.Height / 2)+50;
            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");
            System.out.println("warte");
            shortWait();
View Full Code Here

            rob.mouseRelease(InputEvent.BUTTON3_MASK);
            System.out.println("done");
            System.out.println("warte");
            shortWait();
            System.out.println("Press Button");
            rob.mousePress(InputEvent.BUTTON1_MASK);
            System.out.println("Release Button");
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
            System.out.println("done "+rob.getAutoDelay());           
        } catch (java.awt.AWTException e) {
            log.println("couldn't press mouse button");
View Full Code Here

        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) {
            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.