Package com.sun.star.frame

Examples of com.sun.star.frame.XDesktop


                        try {
                            if ( event.getKeyCode() == KeyEvent.VK_F1 ) {
                                //  function key F1 pressed
                               
                                XInterface oInterface;
                                XDesktop oDesktop;
                                XComponentLoader oCLoader;
                                XComponent aDoc = null;
                                String stringParentNode = "";
                                String stringURLDocument = "";
                               
View Full Code Here


    public static XTextDocument openWriter(XMultiServiceFactory oMSF) {
       
       
        //define variables
        XInterface oInterface;
        XDesktop oDesktop;
        XComponentLoader oCLoader;
        XTextDocument oDoc = null;
        XComponent aDoc = null;
       
        try {
View Full Code Here

   
    public static XSpreadsheetDocument openCalc(XMultiServiceFactory oMSF) {      
       
        //define variables
        XInterface oInterface;
        XDesktop oDesktop;
        XComponentLoader oCLoader;
        XSpreadsheetDocument oDoc = null;
        XComponent aDoc = null;
       
        try {
View Full Code Here

            // Query for the interface XComponentContext.
            xcomponentcontext = ( XComponentContext ) UnoRuntime.queryInterface(
            XComponentContext.class, objectDefaultContext );
           
            // Querying for the interface XDesktop.
            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 =
View Full Code Here

  private XComponent getXComponent() {
    try {
      final XMultiComponentFactory xMCF = xContext.getServiceManager();
      final Object desktop = xMCF.createInstanceWithContext(
          "com.sun.star.frame.Desktop", xContext);
      final XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
          XDesktop.class, desktop);
      return xDesktop.getCurrentComponent();
    } catch (final Throwable t) {
      showError(t);
      return null;
    }
  }
View Full Code Here

            throw new IllegalArgumentException(
                "Desktop Service not available");
        }

        // query the desktop interface and then it's componentloader
        XDesktop oDesktop = (XDesktop) UnoRuntime.queryInterface(
            XDesktop.class, oInterface);

        oCLoader = (XComponentLoader) UnoRuntime.queryInterface(
            XComponentLoader.class, oDesktop);
    }
View Full Code Here

                {
                    GlobalLogWriter.println("MultiServiceFactory in GraphicalTestArgument not set.");
                    return null;
                }
                Object oDsk = _aGTA.getMultiServiceFactory().createInstance("com.sun.star.frame.Desktop");
                XDesktop aDesktop = UnoRuntime.queryInterface(XDesktop.class, oDsk);
               
                if (aDesktop != null)
                {
                    GlobalLogWriter.println("com.sun.star.frame.Desktop created.");
                    // String sInputURL = aCurrentParameter.sInputURL;
View Full Code Here

        log.println("Cleaning up");
        DesktopTools.closeDoc(xTextDoc);
        try {
            XMultiServiceFactory xMSF = (XMultiServiceFactory) Param.getMSF();
            Object o = xMSF.createInstance("com.sun.star.frame.Desktop");
            XDesktop xDesk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, o);
            DesktopTools.closeDoc(xDesk.getCurrentFrame());
        } catch (Exception e) {
            log.println("Couldn't close IDE");
        }
    }
View Full Code Here

                    if ( aArticle.setArticle( sWikiCode, aSendDialog.m_sWikiComment, aSendDialog.m_bWikiMinorEdit ) )
                    {
                        bResult = true;
                        Object desktop = m_xContext.getServiceManager().createInstanceWithContext( "com.sun.star.frame.Desktop", m_xContext );
                        XDesktop xDesktop = ( XDesktop ) UnoRuntime.queryInterface( com.sun.star.frame.XDesktop.class, desktop );
                        Helper.SetDocTitle( m_xModel, aArticle.GetTitle() );
                        Hashtable aDocInfo = new Hashtable();
                        aDocInfo.put( "Doc", aArticle.GetTitle() );
                        aDocInfo.put( "Url", aArticle.GetMainURL() );
                        aDocInfo.put( "CompleteUrl", aArticle.GetMainURL() + aArticle.GetTitle() );
View Full Code Here

                {
                    GlobalLogWriter.get().println("MultiServiceFactory in GraphicalTestArgument not set.");
                    return null;
                }
                Object oDsk = _aGTA.getMultiServiceFactory().createInstance("com.sun.star.frame.Desktop");
                XDesktop aDesktop = UnoRuntime.queryInterface(XDesktop.class, oDsk);
               
                if (aDesktop != null)
                {
                    GlobalLogWriter.get().println("com.sun.star.frame.Desktop created.");
                    // String sInputURL = aCurrentParameter.sInputURL;
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.