Package com.sun.star.accessibility

Examples of com.sun.star.accessibility.XAccessibleContext


        AccessibilityTools at = new AccessibilityTools();

        XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
        XAccessible xRoot = at.getAccessibleObject(xWindow);

        XAccessibleContext cont = at.getAccessibleObjectForRole(
                xRoot, AccessibleRole.SHAPE, "", "AccLegendEntry");


        oObj = cont;

        log.println("ImplementationName " + utils.getImplName(oObj));
        log.println("AccessibleName " + cont.getAccessibleName());

        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XAccessibleComponent acc = (XAccessibleComponent)
                UnoRuntime.queryInterface(
View Full Code Here


        XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
        XAccessible xRoot = at.getAccessibleObject(xWindow);

        at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));

        XAccessibleContext cont = at.getAccessibleObjectForRole(
                xRoot, AccessibleRole.SHAPE, "", "AccArea");


        oObj = cont;

        log.println("ImplementationName " + utils.getImplName(oObj));
        log.println("AccessibleName " + cont.getAccessibleName());

        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XAccessibleComponent acc = (XAccessibleComponent)
                UnoRuntime.queryInterface(
View Full Code Here

        log.println("close text document");
        util.DesktopTools.closeDoc(xTextDoc);
    }

    public XAccessibleRelationSet getAccessibleRelation(XAccessible xAcc) {
        XAccessibleContext oObj = (XAccessibleContext)
        UnoRuntime.queryInterface(XAccessibleContext.class, xAcc);

        XAccessibleRelationSet set = oObj.getAccessibleRelationSet();
        return set;
    }
View Full Code Here

            AccessibleRole.TOGGLE_BUTTON, "Bold");
        System.out.println("Found a TOGGLE_BUTTON: " + (oObj != null));

        log.println("ImplementationName: "+ util.utils.getImplName(oObj));

        XAccessibleContext oContext = (XAccessibleContext)
            UnoRuntime.queryInterface(XAccessibleContext.class, oObj);

        XAccessibleStateSet oSet = oContext.getAccessibleStateSet();

        short[]states = oSet.getStates();
        for(int i=0; i<states.length; i++)
            System.out.println("State "+i+": "+states[i]);
View Full Code Here

        XWindow xWindow = at.getCurrentWindow(mXMSF, aModel);
        XAccessible xRoot = at.getAccessibleObject(xWindow);
        XAccessible parent = null;

        try {
            XAccessibleContext con = at.getAccessibleObjectForRole
                                (xRoot, AccessibleRole.SHAPE, "");
            log.println("Name of AccessibleContext: " + con.getAccessibleName());
            oObj = con;
        } catch (Exception e) {
            failed(e.getMessage());
            return;
        }
View Full Code Here

                (colCount-1) + "): ");
            int indx = oObj.getAccessibleIndex(
                rowCount - 1, colCount - 1);
            log.println(indx);
            if (xCellAc != null) {
                XAccessibleContext xAC = xCellAc.getAccessibleContext();
                int expIndx = xAC.getAccessibleIndexInParent();
                log.println("Expected index: " + expIndx);
                res &= expIndx == indx;
            } else {
                res &= true;
            }
View Full Code Here

        }

        for (int i = 0; i < counter; i++) {
            try {
                XAccessible ch = oObj.getAccessibleChild(i);
                XAccessibleContext chAC = ch.getAccessibleContext();

                log.println("## Child " + i + ": " +
                            chAC.getAccessibleDescription());

                if (!AccessibilityTools.equals(chAC.getAccessibleParent()
                                                   .getAccessibleContext(),
                                               oObj)) {
                    log.println("The parent of child and component " +
                                "itself differ.");
                    log.println("\tRole:");
                    log.println("Getting:  " +
                                chAC.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleRole());
                    log.println("Expected: " + oObj.getAccessibleRole());

                    log.println("\tImplementationName:");
                    log.println("Getting:  " +
                                util.utils.getImplName(
                                        chAC.getAccessibleParent()
                                            .getAccessibleContext()));
                    log.println("Expected: " + util.utils.getImplName(oObj));

                    log.println("\tAccessibleDescription:");
                    log.println("Getting(Description):  " +
                                chAC.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleDescription());
                    log.println("Expected(Description): " +
                                oObj.getAccessibleDescription());

                    log.println("\tAccessibleName:");
                    log.println("Getting(Name):  " +
                                chAC.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleName());
                    log.println("Expected(Name): " +
                                oObj.getAccessibleName());

                    log.println("\tChildCount:");
                    log.println("Getting:  " +
                                chAC.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleChildCount());
                    log.println("Expected: " +
                                oObj.getAccessibleChildCount());

                    log.println("\tParentName:");
                    log.println("Getting (Name):  " +
                                chAC.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleName());
                    log.println("Expected(Name): " +
                                oObj.getAccessibleParent()
                                    .getAccessibleContext()
                                    .getAccessibleName());
                                   
                    log.println("##");
                    bOK = false;
                } else {
                    log.println("Role: " + chAC.getAccessibleRole());
                    log.println("Name: " + chAC.getAccessibleName());
                    log.println("IndexInParent: " +
                                chAC.getAccessibleIndexInParent());
                    log.println("ImplementationName: " +
                                util.utils.getImplName(chAC));
                }
            } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
                e.printStackTrace(log);
View Full Code Here

        requiredMethod("getAccessibleParent()");

        boolean bOK = true;
        int idx = oObj.getAccessibleIndexInParent();

        XAccessibleContext parentAC = parent.getAccessibleContext();

        try {
            if (parentAC.getAccessibleChild(idx) == null) {
                log.println("Parent has no child with this index");
                bOK &= false;
            } else {
                bOK &= AccessibilityTools.equals(parentAC.getAccessibleChild(
                                                         idx)
                                                         .getAccessibleContext(),
                                                 oObj);
            }

            if (!bOK) {
                log.println("Expected: " + util.utils.getImplName(oObj));

                if (parentAC.getAccessibleChild(idx) != null) {
                    log.println("Getting: " +
                                util.utils.getImplName(
                                        parentAC.getAccessibleChild(idx)
                                                .getAccessibleContext()));
                }
            }
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            e.printStackTrace(log);
View Full Code Here

    }   
   
    protected static boolean chkTransient(Object Testcase) {
        boolean ret = false;
        XAccessibleContext accCon = (XAccessibleContext)
                    UnoRuntime.queryInterface(XAccessibleContext.class,Testcase);
        if (accCon.getAccessibleStateSet().contains(
            com.sun.star.accessibility.AccessibleStateType.TRANSIENT)){
            if (!accCon.getAccessibleParent().getAccessibleContext().getAccessibleStateSet().contains(
                com.sun.star.accessibility.AccessibleStateType.MANAGES_DESCENDANTS)) {
                throw new lib.StatusException(lib.Status.failed("Parent doesn't manage descendents"));
            }
            ret=true;
        }       
View Full Code Here

     */

     public void clickButton(String buttonName) throws java.lang.Exception
     {
        
        XAccessibleContext oButton =mAT.getAccessibleObjectForRole
                                (mXRoot, AccessibleRole.PUSH_BUTTON, buttonName);
        if (oButton == null){
            throw new Exception("Could not get button '" + buttonName + "'");
        }
        XAccessibleAction oAction = (XAccessibleAction)
View Full Code Here

TOP

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

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.