Package com.sun.star.accessibility

Examples of com.sun.star.accessibility.XAccessible


    /**
     * Just calls the method.
     */
    public void _getAccessibleSummary() {
        XAccessible summary = oObj.getAccessibleSummary();
        log.println("getAccessibleSummary(): " + summary);
        tRes.tested("getAccessibleSummary()", true);
    }
View Full Code Here


            counter = 500;
        }

        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()
View Full Code Here

        log.println("try to open contex menu...");
        AccessibilityTools at = new AccessibilityTools();
       
        XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)tParam.getMSF(), docModel);
       
        XAccessible xRoot = at.getAccessibleObject(xWindow);
       
        XInterface oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL);
       
        XAccessibleComponent window = (XAccessibleComponent) UnoRuntime.queryInterface(
                XAccessibleComponent.class, oObj);
View Full Code Here

                                         AccessibleRole.COMBO_BOX, ListBoxName);
            if (xListBox == null){
                xListBox =mAT.getAccessibleObjectForRole(mXRoot,
                                             AccessibleRole.PANEL, ListBoxName);
            }
            XAccessible xListBoxAccess = (XAccessible)
                         UnoRuntime.queryInterface(XAccessible.class, xListBox);
           
            // if a List is not pulled to be open all entries are not visiblle, therefore the
            // boolean argument
            XAccessibleContext xList =mAT.getAccessibleObjectForRole(
View Full Code Here

                                              AccessibleRole.TREE, ListBoxName);
               
            // all other list boxes have a children of kind of LIST
            } else {
               
                XAccessible xListBoxAccess = (XAccessible)
                             UnoRuntime.queryInterface(XAccessible.class, xListBox);
                // if a List is not pulled to be open all entries are not visiblle, therefore the
                // boolean argument
                xList =mAT.getAccessibleObjectForRole(
                                              xListBoxAccess, AccessibleRole.LIST, true);
            }
           
            for (int i=0;i<xList.getAccessibleChildCount();i++) {
                try {
                    XAccessible xChild = xList.getAccessibleChild(i);
                    XAccessibleContext xChildCont =
                                                  xChild.getAccessibleContext();
                    XInterface xChildInterface = (XInterface)
                        UnoRuntime.queryInterface(XInterface.class, xChildCont);
                    Items.add(xChildInterface);
                   
                } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
View Full Code Here

                                              AccessibleRole.TREE, ListBoxName);
               
            // all other list boxes have a children of kind of LIST
            } else {
               
                XAccessible xListBoxAccess = (XAccessible)
                             UnoRuntime.queryInterface(XAccessible.class, xListBox);
                // if a List is not pulled to be open all entries are not visiblle, therefore the
                // boolean argument
                xList =mAT.getAccessibleObjectForRole(
                                              xListBoxAccess, AccessibleRole.LIST, true);
            }
           
            for (int i=0;i<xList.getAccessibleChildCount();i++) {
                try {
                    XAccessible xChild = xList.getAccessibleChild(i);
                    XAccessibleContext xChildCont =
                                                  xChild.getAccessibleContext();
                    XInterface xChildInterface = (XInterface)
                        UnoRuntime.queryInterface(XInterface.class, xChildCont);
                    Items.add(getString(xChildInterface));
                   
                } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
View Full Code Here

     {
        String TextFieldText = null;
        try{
            XAccessibleContext xTextField =mAT.getAccessibleObjectForRole(mXRoot,
                                     AccessibleRole.SCROLL_PANE, TextFieldName);
            XAccessible xTextFieldAccess = (XAccessible)
                       UnoRuntime.queryInterface(XAccessible.class, xTextField);
            XAccessibleContext xFrame =mAT.getAccessibleObjectForRole(
                                   xTextFieldAccess, AccessibleRole.TEXT_FRAME);
            for (int i=0;i<xFrame.getAccessibleChildCount();i++) {
                try {
                    XAccessible xChild = xFrame.getAccessibleChild(i);
                    XAccessibleContext xChildCont =
                                                  xChild.getAccessibleContext();
                    XInterface xChildInterface = (XInterface)
                        UnoRuntime.queryInterface(XInterface.class, xChildCont);
                    TextFieldText += (getString(xChildInterface));
                   
                } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
View Full Code Here

       
        if (debug) System.out.println("getTopWindow ->");
       
        for (int i=0; i < count ; i++){
            XTopWindow xTopWindow = tk.getTopWindow(i);
            XAccessible xAcc = mAT.getAccessibleObject(xTopWindow);
            String accName = xAcc.getAccessibleContext().getAccessibleName();
           
            if (debug){
                System.out.println("AccessibleName: " + accName);
            }
View Full Code Here

        XModel xModel = (XModel)
            UnoRuntime.queryInterface(XModel.class, xSheetDoc);
        System.out.println("Name: " + xModel.getCurrentController().getFrame().getName());
       
        XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)tParam.getMSF(), xModel);
        XAccessible xRoot = at.getAccessibleObject(xWindow);

        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE  );

        XAccessibleComponent AccessibleSpreadsheet = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class,AccessibilityTools.SearchedContext);

        log.println("Got " + util.utils.getImplName(AccessibleSpreadsheet));               

        Object toolkit = null;
       
        try {
            toolkit = ((XMultiServiceFactory)tParam.getMSF()).createInstance("com.sun.star.awt.Toolkit");
        } catch (com.sun.star.uno.Exception e) {
            log.println("Couldn't get toolkit");
            e.printStackTrace(log);
            throw new StatusException("Couldn't get toolkit", e);
        }

        XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(
                                      XExtendedToolkit.class, toolkit);       
       
        XTopWindow tw = null;
       
        int k = tk.getTopWindowCount();
        for (int i=0;i<k;i++) {
            try {
                XTopWindow tw_temp = tk.getTopWindow(i);           
                XAccessible xacc = (XAccessible) UnoRuntime.queryInterface(XAccessible.class,  tw_temp);
                if (xacc != null) {
                    if (xacc.getAccessibleContext().getAccessibleName().indexOf("d2")>0) {
                        tw=tw_temp;
                    };
                } else {
                    log.println("\t unknown window");
                }
View Full Code Here

            throw new StatusException("Could not create 'com.sun.star.awt.Toolkit'.", e);
        }
        XExtendedToolkit xExtendedToolkit = (XExtendedToolkit)UnoRuntime.queryInterface(XExtendedToolkit.class, aToolkit);
        AccessibilityTools accTools = new AccessibilityTools();
        XWindow xWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, xExtendedToolkit.getActiveTopWindow());
        XAccessible xRoot = accTools.getAccessibleObject(xWindow);
       
        XTopWindow tw = null;
       
        XAccessibleComponent xAccessibleComponent = null;
        int k = xExtendedToolkit.getTopWindowCount();
        for (int i=0;i<k;i++) {
            try {
                XTopWindow tw_temp = xExtendedToolkit.getTopWindow(i);           
                XAccessible xacc = (XAccessible)UnoRuntime.queryInterface(XAccessible.class,  tw_temp);
                if (xacc != null) {
                    System.out.println("Name: " + xacc.getAccessibleContext().getAccessibleName());
                    if (xacc.getAccessibleContext().getAccessibleName().startsWith("the title")) {
                        tw = tw_temp;
                        XAccessibleContext xContext = xacc.getAccessibleContext();
                        xAccessibleComponent = (XAccessibleComponent)UnoRuntime.queryInterface(XAccessibleComponent.class, xContext);
                        if (xAccessibleComponent == null)
                            System.out.println("!!!! MIST !!!!");
                        else
                            System.out.println("########## KLAPPT ########## ");
View Full Code Here

TOP

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

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.