Package com.sun.star.accessibility

Examples of com.sun.star.accessibility.XAccessibleComponent


        XAccessible xRoot = at.getAccessibleObject(xWindow);
        at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE));       
        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PAGE_TAB, "Sheet1");
        XAccessibleContext acc = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PAGE_TAB, "Sheet2");
        XAccessibleComponent accComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                               XAccessibleComponent.class,
                                               acc);
        final Point point = accComp.getLocationOnScreen();
        log.println("ImplementationName: " + util.utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment( oObj );
        tEnv.addObjRelation("Destroy","yes");
        tEnv.addObjRelation("EventProducer",
View Full Code Here


        XAccessible xRoot = at.getAccessibleObject(xWindow);

        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL);

        XAccessibleComponent window = (XAccessibleComponent) UnoRuntime.queryInterface(
                                              XAccessibleComponent.class, oObj);

        point = window.getLocationOnScreen();
        Rectangle rect = window.getBounds();

        try {
            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2);
            int y = point.Y + (rect.Height / 2);
View Full Code Here

        tEnv.addObjRelation("EditOnly",
                            "This method isn't supported in this component");

        tEnv.addObjRelation("LimitedBounds", "yes");

        final XAccessibleComponent acomp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                                   XAccessibleComponent.class,
                                                   oObj);

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                acomp.grabFocus();
            }
        });

        tEnv.addObjRelation("XAccessibleText.Text", "Web");
View Full Code Here

          "Bounding box conflicts with relative location";
      if (aBBox.Width!=aSize.Width || aBBox.Height!=aSize.Height)
        sConsistency += (sConsistency.length()!=0?", ":"") +
          "Bounding box conflicts with size";
      XAccessible xParent = mxContext.getAccessibleParent();
      XAccessibleComponent xParentComponent =
        (XAccessibleComponent)UnoRuntime.queryInterface(
          XAccessibleComponent.class, xParent);
      if (xParentComponent == null)
      {
        if (aLocation.X != aLocationOnScreen.X
          || aLocation.Y != aLocationOnScreen.Y)
          sConsistency += (sConsistency.length()!=0?", ":"") +
            "location on screen does not equal "
            + "relative location without parent";
      }
      else
      {
        com.sun.star.awt.Point aParentLocationOnScreen =
          xParentComponent.getLocationOnScreen();
        if (aLocation.X+aParentLocationOnScreen.X
          != aLocationOnScreen.X
          || aLocation.Y+aParentLocationOnScreen.Y
          != aLocationOnScreen.Y)
          sConsistency += (sConsistency.length()!=0?", ":"") +
View Full Code Here

        }
    }
   
    public void doubleClickMiddleOfAccessibleObject(short role, String name) {
        XAccessibleContext xAcc =mAT.getAccessibleObjectForRole(mXRoot, role, name);
        XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                             XAccessibleComponent.class, xAcc);
       
        System.out.println(xAcc.getAccessibleRole() + "," +
                    xAcc.getAccessibleName() + "(" +
                    xAcc.getAccessibleDescription() + "):" +
                    utils.getImplName(xAcc));
                                            
        if (aComp != null) {
            Point location = aComp.getLocationOnScreen();
            String bounds = "(" + aComp.getBounds().X + "," +
                            aComp.getBounds().Y + ")" + " (" +
                            aComp.getBounds().Width + "," +
                            aComp.getBounds().Height + ")";
            System.out.println("The boundary Rectangle is " + bounds);
                try {
                    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);
View Full Code Here

        shortWait();

        XAccessible acc = (XAccessible) UnoRuntime.queryInterface(
                                  XAccessible.class, tEnv.getTestObject());

        XAccessibleComponent aCom = (XAccessibleComponent) UnoRuntime.queryInterface(
                                            XAccessibleComponent.class,
                                            acc.getAccessibleContext());

        Point location = aCom.getLocationOnScreen();       
        //Point location = (Point) tEnv.getObjRelation("Location");
        //XAccessibleComponent aCom = (XAccessibleComponent) tEnv.getObjRelation("Location");
        //Point location = aCom.getLocationOnScreen();
        try {
            Robot rob = new Robot();
View Full Code Here

        logging(log,indent + ac.getAccessibleRole() + "," +
                    ac.getAccessibleName() + "(" +
                    ac.getAccessibleDescription() + "):" +
                    utils.getImplName(ac));

        XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                             XAccessibleComponent.class, xacc);

        if (aComp != null) {
            String bounds = "(" + aComp.getBounds().X + "," +
                            aComp.getBounds().Y + ")" + " (" +
                            aComp.getBounds().Width + "," +
                            aComp.getBounds().Height + ")";
            bounds = "The boundary Rectangle is " + bounds;
            logging(log,indent + indent + bounds);
        }

        boolean isShowing = ac.getAccessibleStateSet()
View Full Code Here

        TestEnvironment tEnv = new TestEnvironment(oObj);

        shortWait();

        XAccessibleComponent accComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                               XAccessibleComponent.class,
                                               oObj);

             
              final Point point = accComp.getLocationOnScreen();
      
        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {                            
View Full Code Here

        XAccessible xRoot = at.getAccessibleObject(xWindow);
        at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE));       
        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PAGE_TAB, "Sheet1");
        XAccessibleContext acc = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PAGE_TAB, "Sheet2");
        XAccessibleComponent accComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                               XAccessibleComponent.class,
                                               acc);
        final Point point = accComp.getLocationOnScreen();
        log.println("ImplementationName: " + util.utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment( oObj );
        tEnv.addObjRelation("Destroy","yes");
        tEnv.addObjRelation("EventProducer",
View Full Code Here

    }
   
    public void clickMiddleOfAccessibleObject(short role, String name){
       
        XAccessibleContext xAcc =mAT.getAccessibleObjectForRole(mXRoot, role, name);
        XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                             XAccessibleComponent.class, xAcc);
       
        System.out.println(xAcc.getAccessibleRole() + "," +
                    xAcc.getAccessibleName() + "(" +
                    xAcc.getAccessibleDescription() + "):" +
                    utils.getImplName(xAcc));
                                            
        if (aComp != null) {
            Point location = aComp.getLocationOnScreen();
            String bounds = "(" + aComp.getBounds().X + "," +
                            aComp.getBounds().Y + ")" + " (" +
                            aComp.getBounds().Width + "," +
                            aComp.getBounds().Height + ")";
            System.out.println("The boundary Rectangle is " + bounds);
                try {
                    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) {
View Full Code Here

TOP

Related Classes of com.sun.star.accessibility.XAccessibleComponent

Copyright © 2018 www.massapicom. 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.