Package com.sun.star.frame

Examples of com.sun.star.frame.XFrame


            XDesktop xdesktop = ( XDesktop ) UnoRuntime.queryInterface(
            XDesktop.class, xmulticomponentfactory.createInstanceWithContext(
            "com.sun.star.frame.Desktop", xcomponentcontext ) );
           
            // Getting the current frame from the OpenOffice.org Server.
            XFrame xframe = xdesktop.getCurrentFrame();
           
            // Getting the controller.
            XController xcontroller = xframe.getController();
           
            XSelectionSupplier xselectionsupplier =
            ( XSelectionSupplier ) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xcontroller );
           
View Full Code Here


    }

    public com.sun.star.ui.XUIElement createUIElement(String ResourceURL, com.sun.star.beans.PropertyValue[] creationArgs) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.IllegalArgumentException
    {

        XFrame docFrame = null;
        XWindow panelParentWindow = null;
        for (int i = 0; i < creationArgs.length; ++i)
        {
            if (creationArgs[i].Name.equals("Frame"))
            {
View Full Code Here

        PropertyValue[] noArgs = new PropertyValue[0];
        getting.dispatch(the_url,noArgs);

        shortWait();

        XFrame the_frame1 = the_Desk.getCurrentFrame();

        if (the_frame1 == null) {
            log.println("Current frame was not found !!!");
        }

        XFrame the_frame2 = the_frame1.findFrame("_beamer",4);

        the_frame2.setName("DatasourceBrowser");

        XInterface oObj = null;

        final XInitialization xInit = (XInitialization)
                UnoRuntime.queryInterface(
                        XInitialization.class, the_frame2.getController());

        Object[] params = new Object[3];
        PropertyValue param1 = new PropertyValue();
        param1.Name = "DataSourceName";
        param1.Value = "Bibliography";
View Full Code Here

        for (int i = 0; i < 11; i++) {
            xText.insertString(xTextCursor, "A sample text and why not? ", false);
        }

        XFrame xFrame = xTextDoc.getCurrentController().getFrame();
        XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xFrame);
        try {
            Object any = xProp.getPropertyValue("LayoutManager");
            xManager = (XInterface)UnoRuntime.queryInterface(XInterface.class, any);
        }
View Full Code Here

        PropertyValue[] noArgs = new PropertyValue[0];
        getting.dispatch(the_url, noArgs);
       
        shortWait();
       
        XFrame the_frame1 = the_Desk.getCurrentFrame();
       
        if (the_frame1 == null) {
            log.println("Current frame was not found !!!");
        }
       
        XFrame the_frame2 = the_frame1.findFrame("_beamer", 4);
        XController xCont = the_frame2.getController();
       
        the_frame2.setName("DatasourceBrowser");
       
        final PropertyValue[] params = new PropertyValue[3];
        PropertyValue param1 = new PropertyValue();
        param1.Name = "DataSourceName";
        param1.Value = "Bibliography";
View Full Code Here

    */
    public TestEnvironment createTestEnvironment( TestParameters Param,
        PrintWriter log ) throws StatusException {

        XInterface oObj = null;
        XFrame xFrame = null;
        XDispatchRecorder xDR = null;

        try {
            SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)Param.getMSF());
            oDoc = SOF.createTextDoc(null);
View Full Code Here

        XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
        log.println( "creating a test environment" );
        String aURL=utils.getFullTestURL("basDialog.odt");
        xTextDoc = WriterTools.loadTextDoc(xMSF,aURL);
        XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xTextDoc);
        XFrame xFrame = xModel.getCurrentController().getFrame();
        XDispatchProvider xDPP = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xFrame);
       
        log.println( "opening the basic dialog editor" );
        try {
            Object o = xMSF.createInstance("com.sun.star.frame.DispatchHelper");
            XDispatchHelper xDPH = (XDispatchHelper) UnoRuntime.queryInterface(XDispatchHelper.class, o);
            PropertyValue[] aArgs = new PropertyValue[4];
            aArgs[0] = new PropertyValue();
            aArgs[0].Name = "Document";
            aArgs[0].Value = aURL;
            aArgs[1] = new PropertyValue();
            aArgs[1].Name = "LibName";
            aArgs[1].Value = "basctl";
            aArgs[2] = new PropertyValue();
            aArgs[2].Name = "Name";
            aArgs[2].Value = "Dialog1";
            aArgs[3] = new PropertyValue();
            aArgs[3].Name = "Type";
            aArgs[3].Value = "Dialog";
            xDPH.executeDispatch(xDPP, ".uno:BasicIDEAppear", "", 0, aArgs);
        } catch (Exception e) {
            throw new StatusException("Couldn't open Basic Dialog",e);
        }
       
        utils.shortWait(3000);
       
        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 );
        }

        AccessibilityTools at = new AccessibilityTools();
       
        final XWindow basicIDE = xFrame.getContainerWindow();
       
        XAccessible xRoot = at.getAccessibleObject(basicIDE);
       
        at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
       
View Full Code Here

    private static XDispatchProvider makeDispatchProvider(XMultiServiceFactory mMSF,
                                                          XModel aModel)
                                                   throws java.lang.Exception {
        XController xController = aModel.getCurrentController();
        XFrame xFrame = xController.getFrame();

        if (xFrame == null) {
            throw new Exception("Could not create DispatchProvider");
        }
View Full Code Here

            throw new StatusException("Couldn't create document ", e);
        }
        XModel xTextMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xTextDoc);
        XController xTextController = xTextMode1.getCurrentController();
        XFrame xTextFrame = xTextController.getFrame();


        // get webdoc interfaces
        try {
            log.println("creating a web document");
            xWebDoc = SOF.loadDocument("private:factory/swriter/web");
           
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xWebMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xWebDoc);
        XController xWebController = xWebMode1.getCurrentController();
        XFrame xWebFrame = xWebController.getFrame();

        // get global document interfaces
        try {
            log.println("creating a global document");
            xGlobalDoc = SOF.loadDocument("private:factory/swriter/GlobalDocument");
           
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xGlobalMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xGlobalDoc);
        XController xGlobalController = xGlobalMode1.getCurrentController();
        XFrame xGlobalFrame = xGlobalController.getFrame();

        // get clac interfaces
        try {
            log.println("creating a spreadsheetdocument");
            xSheetDoc = SOF.createCalcDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xSheetMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xSheetDoc);

        XController xSheetController = xSheetMode1.getCurrentController();
        XFrame xSheetFrame = xSheetController.getFrame();
        // get draw interfaces
        try {
            log.println("creating a draw document");
            xDrawDoc = SOF.createDrawDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xDrawMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xDrawDoc);
        XController xDrawController = xDrawMode1.getCurrentController();
        XFrame xDrawFrame = xDrawController.getFrame();
       
        // get impress interfaces
        try {
            log.println("creating a impress document");
            xImpressDoc = SOF.createImpressDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xImpressMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xImpressDoc);
        XController xImpressController = xImpressMode1.getCurrentController();
        XFrame xImpressFrame = xImpressController.getFrame();
       
        // get math interfaces
        try {
            log.println("creating a math document");
            xMathDoc = SOF.createMathDoc(null);
        } catch (Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create document ", e);
        }
        XModel xMathMode1 = (XModel) UnoRuntime.queryInterface(XModel.class,
                                                       xMathDoc);
        XController xMathController = xMathMode1.getCurrentController();
        XFrame xMathFrame = xMathController.getFrame();
       
        PropertyValue[] xFrameSeq = new PropertyValue[7];
        xFrameSeq[0] = new PropertyValue();
        xFrameSeq[0].Name = "com.sun.star.text.TextDocument";
        xFrameSeq[0].Value = xTextFrame;
View Full Code Here

            throw new StatusException( "Could not create document", e );
        }

        XModel xDocMod = (XModel) UnoRuntime.queryInterface(XModel.class, xTextDoc);
       
        XFrame xTextFrame  = xDocMod.getCurrentController().getFrame();
       
        Object[] params = new Object[3];
        param1 = new PropertyValue();
        param1.Name = "DataSourceName";
        param1.Value = "Bibliography";
View Full Code Here

TOP

Related Classes of com.sun.star.frame.XFrame

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.