Package com.sun.star.frame

Examples of com.sun.star.frame.XDesktop


     * @param xMSF the MultiServiceFactory
     * @return the gained XComponentLoader
     */
    public static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
    {
        XDesktop oDesktop = (XDesktop) UnoRuntime.queryInterface(
                XDesktop.class, createDesktop(xMSF));

        XComponentLoader oCLoader = (XComponentLoader) UnoRuntime.queryInterface(
                XComponentLoader.class, oDesktop);

View Full Code Here


     * @param xMSF the XMultiServiceFactory
     * @return XEnumeration of all components on the desktop
     */
    public static XEnumeration getAllComponents(XMultiServiceFactory xMSF)
    {
        XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
                XDesktop.class, createDesktop(xMSF));
        return xDesktop.getComponents().createEnumeration();
    }
View Full Code Here

     * @param xMSF the XMultiServiceFactory
     * @return XComponent of the current component on the desktop
     */
    public static XComponent getCurrentComponent(XMultiServiceFactory xMSF)
    {
        XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
                XDesktop.class, createDesktop(xMSF));
        return xDesktop.getCurrentComponent();
    }
View Full Code Here

     * @param xMSF the XMultiServiceFactory
     * @return XComponent of the current component on the desktop
     */
    public static XFrame getCurrentFrame(XMultiServiceFactory xMSF)
    {
        XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
                XDesktop.class, createDesktop(xMSF));
        return xDesktop.getCurrentFrame();
    }
View Full Code Here

     * @return returns an array of all open documents
     */
    public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF)
    {
        Vector components = new Vector();
        XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
                XDesktop.class, createDesktop(xMSF));

        XEnumeration allComp = getAllComponents(xMSF);

        while (allComp.hasMoreElements())
View Full Code Here

    {
        Object document = null;
        //open the document.
        try
        {
            XDesktop desktop = Desktop.getDesktop(xmsf);
            Properties props = new Properties();
            props.put("Hidden", Boolean.TRUE);
            props.put("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE));
            props.put("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE));
            document = UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL(doc.cp_URL, "_blank", 0, props.getProperties());
View Full Code Here

        this.buildStep6();
        this.buildStep7(proxies, exclamationURL);
        buildStepX();

        this.xMSF = xmsf;
        XDesktop xDesktop = Desktop.getDesktop(xMSF);
        myFrame = OfficeDocument.createNewFrame(xMSF, this);
        Object doc = OfficeDocument.createNewDocument(myFrame, "swriter", false, true);

        loadSettings(doc);
        setSaveSessionName(settings.cp_DefaultSession);
View Full Code Here

            e.printStackTrace(System.err);
        }
    }
   
    public static XDesktop getDesktop() {
        XDesktop xDesktop = null;
        XMultiComponentFactory xMCF = null;
       
        try {
            XComponentContext xContext = null;
           
View Full Code Here

            if (listener != null)
            {
                XFramesSupplier xFS = UnoRuntime.queryInterface(XFramesSupplier.class, xF);
                XFrames xFF = xFS.getFrames();
                xFF.remove(xFrame);
                XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, xF);
                xDesktop.addTerminateListener(listener);
            }
        }
        return xFrame;
    }
View Full Code Here

        boolean desktopTerminated = true;
        if (process != null) {
            if (context != null) {
                XMultiComponentFactory factory = context.getServiceManager();
                assertNotNull(factory);
                XDesktop desktop = UnoRuntime.queryInterface(
                    XDesktop.class,
                    factory.createInstanceWithContext(
                        "com.sun.star.frame.Desktop", context));
                context = null;
                try {
                    desktopTerminated = desktop.terminate();
                } catch (DisposedException e) {}
                    // it appears that DisposedExceptions can already happen
                    // while receiving the response of the terminate call
                desktop = null;
            } else {
View Full Code Here

TOP

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

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.