Examples of XSelectionSupplier


Examples of com.sun.star.view.XSelectionSupplier

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

        TestEnvironment tEnv = new TestEnvironment(oObj);

        //selecting the inserted shape
        final XSelectionSupplier SelSupp = (XSelectionSupplier)
                UnoRuntime.queryInterface(XSelectionSupplier.class,xController);

        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
                public void fireEvent() {
                    try {
                        SelSupp.select(oShape);
                    } catch (com.sun.star.lang.IllegalArgumentException iae) {
                        System.out.println("Couldn't select shape");
                    }
                }
            });
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

    public void run() {
        boolean bTrying = true;
       
        while( bTrying ) {
            // start listening for selection changes
            XSelectionSupplier aSelSupp = (XSelectionSupplier) UnoRuntime.queryInterface(
                XSelectionSupplier.class,
                (((XModel) UnoRuntime.queryInterface(
                XModel.class, maChartDocument )).getCurrentController()) );
            if( aSelSupp != null ) {
                aSelSupp.addSelectionChangeListener( this );
                System.out.println( "Successfully attached as selection change listener" );
                bTrying = false;
            }
           
            // start listening for death of Controller
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

    // XEventListener (base of XSelectionChangeListener)
    public void disposing( EventObject aSourceObj ) {
        System.out.println( "disposing called.  detaching as listener" );
       
        // stop listening for selection changes
        XSelectionSupplier aCtrl = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, aSourceObj );
        if( aCtrl != null )
            aCtrl.removeSelectionChangeListener( this );
       
        // remove as dispose listener
        XComponent aComp = (XComponent) UnoRuntime.queryInterface( XComponent.class, aSourceObj );
        if( aComp != null )
            aComp.removeEventListener( this );
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        param3.Value = "select * from biblio";
        params[2] = param3;
       
        XController xCont = the_frame2.getController();
       
        XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
        try {
            xSelect.select(params);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            throw new StatusException("Could not select Biblio-Database", ex);
        }
       

View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        param3.Value = "biblio";
        params[2] = param3;

        XController xCont = the_frame2.getController();
       
        XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
        try {
            xSelect.select(params);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            throw new StatusException("Could not select Biblio-Database", ex);
        }
       
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

                }
                else{
                    XTextContent xTC = createExpression(fieldText);
                    // controller should have been set in createExpression
                    XSelectionSupplier xSelSup = (XSelectionSupplier) UnoRuntime.queryInterface(
                                XSelectionSupplier.class, controller);
                    xSelSup.select(xTC);
                        // Move the cursor to the right
                }
            }
            if ( aURL.Path.compareTo("editExprField") == 0 ){
                // if control is activated (by pressing "return")
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        while (enumeration.hasMoreElements())
        {
            enumeration.nextElement();
            ++count;
        }
        final XSelectionSupplier selSup = (XSelectionSupplier)UnoRuntime.queryInterface(XSelectionSupplier.class, beamer.getController());
        selSup.select(props);
        final com.sun.star.util.XCloseable close = (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class, frame);
        close.close(false);

        enumeration = evtBc.createEnumeration();
        int count2 = 0;
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

    * After obtaining object relations 'SELSUPP' and 'TOSELECT', test prepares
    * selection and calls the method. <p>
    * Has <b> OK </b> status if the method does not return null.
    */
    public void _getCurrentSelection() {
        XSelectionSupplier selsupp = (XSelectionSupplier) tEnv.getObjRelation(
                                             "SELSUPP");
        Object toSelect = tEnv.getObjRelation("TOSELECT");
        result = false;

        if (selsupp == null) {
            log.println("No Selection Supplier no show");
        } else {
            try {
                selsupp.select(toSelect);
            } catch (com.sun.star.lang.IllegalArgumentException e) {
                log.println("Exception occured while select:");
                e.printStackTrace(log);

                return;
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

       
        the_frame2.setName("DatasourceBrowser");
       
        XController xCont = the_frame2.getController();
       
        XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
        try {
            xSelect.select(params);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            throw new StatusException("Could not select Biblio-Database", ex);
        }
       
        XInterface oObj = null;
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        PropertyValue param3 = new PropertyValue();
        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;
       
        final XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
       
        final Object[] initArgs = params;
       
        XInterface oObj = null;
       
        try {
            oObj = (XInterface)((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, oObj);
       
        AccessibilityTools at = new AccessibilityTools();
       
        XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
            tk.getActiveTopWindow());
       
        XAccessible xRoot = at.getAccessibleObject(xWindow);
       
        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE,
            "Table");
       
        log.println("ImplementationName: " + util.utils.getImplName(oObj));
       
        TestEnvironment tEnv = new TestEnvironment(oObj);
       
        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {
                    xSelect.select(params);
                } catch (com.sun.star.lang.IllegalArgumentException ex) {
                }
            }
        });
       
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.