Package com.sun.star.view

Examples of com.sun.star.view.XSelectionSupplier


      // the following code will demonstrate how to
      // make a selection that contains our new created ControlShape
      XModel xModel = (XModel)UnoRuntime.queryInterface( XModel.class,
                                                               xComponent );
      XController xController = xModel.getCurrentController();
      XSelectionSupplier xSelectionSupplier =(XSelectionSupplier)
        UnoRuntime.queryInterface( XSelectionSupplier.class, xController );
      // take care to use the global service factory only and not the one
      // that is provided by the component if you create the ShapeColletion
      XShapes xSelection = (XShapes)UnoRuntime.queryInterface( XShapes.class,
        xOfficeContext.getServiceManager().createInstanceWithContext(
                    "com.sun.star.drawing.ShapeCollection", xOfficeContext ) );
      xSelection.add( xShape );
      xSelectionSupplier.select( xSelection );
    }
    catch( java.lang.Exception ex )
    {
      System.out.println( ex );
    }
View Full Code Here


    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

    // 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

        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);
        }

        AccessibilityTools at = new AccessibilityTools();
View Full Code Here

        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

       
        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

        XController cont2 = xModel2.getCurrentController();
       
        cont1.getFrame().setName("cont1");
        cont2.getFrame().setName("cont2");
       
        XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, cont1);
       
        XShape aShape = SOF.createShape(xImpressDoc, 5000, 3500, 7500, 5000,
            "Rectangle");
       
View Full Code Here

        XController cont1 = model1.getCurrentController();
        XController cont2 = model2.getCurrentController();
        cont1.getFrame().setName("cont1");
        cont2.getFrame().setName("cont2");

        XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
                                         XSelectionSupplier.class, cont1);

        XCell toSel = null;
        XCell[] xCalculatableCells = null;
        try {
View Full Code Here

       
        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

      // the following code will demonstrate how to
      // make a selection that contains our new created ControlShape
      XModel xModel = (XModel)UnoRuntime.queryInterface( XModel.class,
                                                               xComponent );
      XController xController = xModel.getCurrentController();
      XSelectionSupplier xSelectionSupplier =(XSelectionSupplier)
        UnoRuntime.queryInterface( XSelectionSupplier.class, xController );
      // take care to use the global service factory only and not the one
      // that is provided by the component if you create the ShapeColletion
      XShapes xSelection = (XShapes)UnoRuntime.queryInterface( XShapes.class,
        xOfficeContext.getServiceManager().createInstanceWithContext(
                    "com.sun.star.drawing.ShapeCollection", xOfficeContext ) );
      xSelection.add( xShape );
      xSelectionSupplier.select( xSelection );
    }
    catch( java.lang.Exception ex )
    {
      System.out.println( ex );
    }
View Full Code Here

TOP

Related Classes of com.sun.star.view.XSelectionSupplier

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.