Examples of createInstanceWithContext()


Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

        // get the service manager from the component context
        XMultiComponentFactory xMultiComponentFactory = _xComponentContext.getServiceManager();
       
        // create the dialog model and set the properties
        Object dialogModel = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.UnoControlDialogModel", _xComponentContext );
        XPropertySet xPSetDialog = ( XPropertySet )UnoRuntime.queryInterface(
            XPropertySet.class, dialogModel );     
        xPSetDialog.setPropertyValue( "PositionX", new Integer( dialogX) );
        xPSetDialog.setPropertyValue( "PositionY", new Integer( dialogY));
View Full Code Here

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

            // insert the control models into the dialog model
            xNameCont.insertByName( _label1Name, labelModel );
        }
     
        // create the dialog control and set the model
        Object dialog = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.UnoControlDialog", _xComponentContext );
        XControl xControl = ( XControl )UnoRuntime.queryInterface(
            XControl.class, dialog );
        XControlModel xControlModel = ( XControlModel )UnoRuntime.queryInterface(
            XControlModel.class, dialogModel );     
View Full Code Here

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

                XCheckBox.class, objectCheckBox );
            xCheckBox.addItemListener((XItemListener) new ItemListenerImpl( xControlCont ) );
        }
     
        // create a peer
        Object toolkit = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.ExtToolkit", _xComponentContext );     
        XToolkit xToolkit = ( XToolkit )UnoRuntime.queryInterface(
            XToolkit.class, toolkit );
        XWindow xWindow = ( XWindow )UnoRuntime.queryInterface(
            XWindow.class, xControl );
View Full Code Here

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

    public static XMultiServiceFactory connect(String connectStr) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException, Exception {
        XComponentContext xcomponentcontext = null;
        XMultiComponentFactory xMultiComponentFactory = getMultiComponentFactory();
        // create a connector, so that it can contact the office
        Object xUrlResolver = xMultiComponentFactory.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", xcomponentcontext);
        XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver);
        Object rInitialObject = urlResolver.resolve(connectStr);
        XNamingService rName = (XNamingService) UnoRuntime.queryInterface(XNamingService.class, rInitialObject);
        XMultiServiceFactory xMSF = null;
        if (rName != null) {
View Full Code Here

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

        {
            XMultiComponentFactory xFactory = xContext.getServiceManager();
            if ( xFactory != null )
                m_xPasswordContainer = (XPasswordContainer)UnoRuntime.queryInterface(
                                        XPasswordContainer.class,
                                        xFactory.createInstanceWithContext( "com.sun.star.task.PasswordContainer", xContext ) );
        }

        if ( m_xPasswordContainer == null )
            throw new com.sun.star.uno.RuntimeException();
View Full Code Here

Examples of com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()

        {
            XMultiComponentFactory xFactory = xContext.getServiceManager();
            if ( xFactory != null )
                m_xInteractionHandler = ( XInteractionHandler )UnoRuntime.queryInterface(
                                        XInteractionHandler.class,
                                        xFactory.createInstanceWithContext( "com.sun.star.task.InteractionHandler", xContext ) );
        }

        if ( m_xInteractionHandler == null )
            throw new com.sun.star.uno.RuntimeException();
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory.createInstanceWithContext()

                            XSingleComponentFactory xCompFac =
                                (XSingleComponentFactory)UnoRuntime.queryInterface(
                                    XSingleComponentFactory.class, entry.m_lateInit );
                            if (xCompFac != null)
                            {
                                xInstance = xCompFac.createInstanceWithContext( this );
                            }
                            else
                            {
                                if (DEBUG)
                                    System.err.println( "### neither service name nor service factory given for late init of singleton instance \"" + rName + "\"!" );
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory.createInstanceWithContext()

            XSingleComponentFactory.class, xImpLoader.activate(
                "com.sun.star.comp.servicemanager.ServiceManager", null, null, null ) );
       
    // Create an instance of the ServiceManager
    XMultiComponentFactory xSMgr = (XMultiComponentFactory)UnoRuntime.queryInterface(
            XMultiComponentFactory.class, smgr_fac.createInstanceWithContext( null ) );
       
    // post init loader
    XInitialization xInit = (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, xImpLoader );
    Object[] args = new Object [] { xSMgr };
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory.createInstanceWithContext()

                                XSingleComponentFactory.class, xMenuBarSettings);
        try {
            XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xMSF);
            XComponentContext xContext = (XComponentContext)UnoRuntime.queryInterface(
                    XComponentContext.class, xProp.getPropertyValue("DefaultContext"));
            prop[3].Value = xFactory.createInstanceWithContext(xContext);
        }
        catch(com.sun.star.uno.Exception e) {
            log.println("Could not create an instance for ItemDescriptorContainer property.");
            e.printStackTrace(log);
            return null;
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory.createInstanceWithContext()

                                                + "testequals.impl",
                                                "", "testequals.uno", null));
                                    XTestInterface test = (XTestInterface)
                                        UnoRuntime.queryInterface(
                                            XTestInterface.class,
                                            factory2.createInstanceWithContext(
                                                context));
                                    // allow client to start accepting:
                                    Thread.sleep(3000);
                                    test.connect(
                                        CONNECTION_DESCRIPTION,
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.