Package com.sun.star.accessibility

Examples of com.sun.star.accessibility.XAccessibleSelection


           
            // if a List is not pulled to be open all entries are not visiblle, therefore the
            // boolean argument
            XAccessibleContext xList =mAT.getAccessibleObjectForRole(
                                          xListBoxAccess, AccessibleRole.LIST, true);
            XAccessibleSelection xListSelect = (XAccessibleSelection)
                   UnoRuntime.queryInterface(XAccessibleSelection.class, xList);
           
            xListSelect.selectAccessibleChild(nChildIndex);

        } catch (Exception e) {
          throw new Exception("Could not select item '" +nChildIndex+
                        "' in listbox '" + ListBoxName + "' : " + e.toString());
        }
View Full Code Here


        XAccessible xRoot = at.getAccessibleObject(xWindow);

        XAccessibleContext ARoot = at.getAccessibleObjectForRole(xRoot,
                                                                 AccessibleRole.MENU_BAR);
        XAccessibleSelection sel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                           XAccessibleSelection.class, ARoot);

        for (int k = 0; k < indexes.length; k++) {
            try {
                sel.selectAccessibleChild(indexes[k]);
                shortWait();
                ARoot = ARoot.getAccessibleChild(indexes[k])
                             .getAccessibleContext();
                sel = (XAccessibleSelection) UnoRuntime.queryInterface(
                              XAccessibleSelection.class, ARoot);
View Full Code Here

        // Selecting 'New Document' tab
        try {
            oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TREE);

            XAccessibleSelection xAccSel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                                   XAccessibleSelection.class,
                                                   oObj);
            xAccSel.selectAccessibleChild(3);
            shortWait();
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            throw new StatusException("Can't switch to required tab", e);
        }
View Full Code Here

        // Selecting 'New Document' tab
        try {
            oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TREE);

            XAccessibleSelection xAccSel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                                   XAccessibleSelection.class,
                                                   oObj);
            xAccSel.selectAccessibleChild(3);
            shortWait();
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            throw new StatusException("Can't switch to required tab", e);
        }
View Full Code Here

        // Selecting 'New Document' tab
        try {
            oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TREE);

            XAccessibleSelection xAccSel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                                   XAccessibleSelection.class,
                                                   oObj);
            xAccSel.selectAccessibleChild(3);
            shortWait();
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            throw new StatusException("Can't switch to required tab", e);
        }
View Full Code Here

           
            // if a List is not pulled to be open all entries are not visiblle, therefore the
            // boolean argument
            XAccessibleContext xList =mAT.getAccessibleObjectForRole(
                                          xListBoxAccess, AccessibleRole.LIST, true);
            XAccessibleSelection xListSelect = (XAccessibleSelection)
                   UnoRuntime.queryInterface(XAccessibleSelection.class, xList);
           
            xListSelect.selectAccessibleChild(nChildIndex);

        } catch (Exception e) {
          throw new Exception("Could not select item '" +nChildIndex+
                        "' in listbox '" + ListBoxName + "' : " + e.toString());
        }
View Full Code Here

                    XAccessibleAction.class, context );
                listBoxActions.doAccessibleAction( 0 );
*/

                // the first "accessible child" of a list box is its list
                XAccessibleSelection accessibleList = (XAccessibleSelection)UnoRuntime.queryInterface(
                    XAccessibleSelection.class, context.getAccessibleChild( 1 ) );

                int selectPosition = generator.nextInt( 5 );
                String selectSheetName = getListBoxControl( activeSheet ).getItem( (short)selectPosition );
                accessibleList.selectAccessibleChild( selectPosition );
                try
                {
                    synchronized( this )
                    {
                        this.wait( 500 );
View Full Code Here

        XAccessibleContext iconChoiceCtrl = at.getAccessibleObjectForRole(
                                                    xRoot, AccessibleRole.TREE,
                                                    "IconChoiceControl");

        XAccessibleSelection sel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                           XAccessibleSelection.class,
                                           iconChoiceCtrl);

        try {
            sel.selectAccessibleChild(0);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            log.println("Unexpected exception");
            e.printStackTrace(log);
        }
View Full Code Here

        };

        tEnv.addObjRelation("expectedStateNames", expectedStateNames);
        tEnv.addObjRelation("expectedStates", expectedStates);

        final XAccessibleSelection selection = (XAccessibleSelection) (XAccessibleSelection) UnoRuntime.queryInterface(
                                                                              XAccessibleSelection.class,
                                                                              oObj);

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {
                    selection.selectAccessibleChild(1);
                    selection.selectAccessibleChild(0);
                } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
                }
            }
        });
View Full Code Here

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

        at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XAccessibleSelection accSel = (XAccessibleSelection) UnoRuntime.queryInterface(
                                                    XAccessibleSelection.class,
                                                    at.SearchedContext.getAccessibleParent());

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

        return tEnv;
    }
View Full Code Here

TOP

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

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.