Package com.sun.star.lang

Examples of com.sun.star.lang.XInitialization


    // Create an instance of the ServiceManager
    XMultiServiceFactory xMultiFac = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class,
                                              xManagerFac.createInstance());

    // set the ServiceManager at the JavaLoader with the XInitialization interface
    XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, xImpLoader);
    Object[] iniargs = { xMultiFac };  
    xInit.initialize( iniargs );
   

    // now use the XSet interface at the ServiceManager to add the factory of the loader
    XSet xSet = (XSet) UnoRuntime.queryInterface(XSet.class, xMultiFac);
View Full Code Here


                m_sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
            }
            xFilePicker.setDisplayDirectory(m_sWorkUrl);
           
            // choose the template that defines the capabilities of the filepicker dialog
            XInitialization xInitialize = (XInitialization)UnoRuntime.queryInterface(XInitialization.class, xFilePicker);
            Short[] listAny = new Short[] { new Short(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
            xInitialize.initialize(listAny);
           
            String fileName = getController().getDiagram().getDiagramTypeName();
            xFilePicker.setDefaultName(fileName);
           
            // add a control to the dialog to add the extension automatically to the filename...
View Full Code Here

            try
            {
                Object instance = _constructor.newInstance( args );
                if (bInitCall)
                {
                    XInitialization xInitialization = (XInitialization)UnoRuntime.queryInterface(
                        XInitialization.class, instance );
                    if (xInitialization != null)
                    {
                        xInitialization.initialize( rArguments );
                    }
                }
                return instance;
            }
      catch (InvocationTargetException invocationTargetException)
View Full Code Here

            XDocumentProperties xDP2 = (XDocumentProperties)
                UnoRuntime.queryInterface(XDocumentProperties.class,
                    xMSF.createInstance(
                        "com.sun.star.document.DocumentProperties"));
            XInitialization xInit = (XInitialization)
                UnoRuntime.queryInterface(XInitialization.class, xDP2);
            xInit.initialize(new Object[] { });

            log.println("...done");

            log.println("Checking storing default-initialized meta data ...");
View Full Code Here

        the_frame2.setName("DatasourceBrowser");

        XInterface oObj = null;

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

        PropertyValue[] params = new PropertyValue[3];
        PropertyValue param1 = new PropertyValue();
View Full Code Here

        log.println("ImplementationName: "+ util.utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        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";
        params[0] = param1;
        PropertyValue param2 = new PropertyValue();
        param2.Name = "CommandType";
        param2.Value = new Integer(com.sun.star.sdb.CommandType.TABLE);
        params[1] = param2;
        PropertyValue param3 = new PropertyValue();
        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;

        final Object[] fParams = params;

//        tEnv.addObjRelation("EventProducer",
//            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){
//                public void fireEvent() {
//                    fXComp.grabFocus();
//                }
//            });

        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){
                public void fireEvent() {
                    try {
                        xInit.initialize(fParams);
                    } catch(com.sun.star.uno.Exception e) {
                        e.printStackTrace();
                    }
                }
            });
View Full Code Here

        the_frame2.setName("DatasourceBrowser");

        XInterface oObj = null;

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

        PropertyValue[] params = new PropertyValue[3];
        PropertyValue param1 = new PropertyValue();
View Full Code Here

        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";
        params[0] = param1;
        PropertyValue param2 = new PropertyValue();
        param2.Name = "CommandType";
        param2.Value = new Integer(com.sun.star.sdb.CommandType.TABLE);
        params[1] = param2;
        PropertyValue param3 = new PropertyValue();
        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;

        shortWait();

        try {
            oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()).createInstance
                ("com.sun.star.awt.Toolkit") ;
            xInit.initialize(params);
        } catch (com.sun.star.uno.Exception e) {
            log.println("Couldn't get toolkit");
            e.printStackTrace(log);
            throw new StatusException("Couldn't get toolkit", e );
        }
View Full Code Here

            XFilterManager xFilterManager = (XFilterManager) UnoRuntime.queryInterface(XFilterManager.class, xFilePicker);
            xFilterManager.appendFilter("OpenDocument Text Template", "writer8_template");
            xFilterManager.appendFilter("OpenDocument Text", "writer8");
           
            // choose the template that defines the capabilities of the filepicker dialog
            XInitialization xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, xFilePicker);
            Short[] listAny = new Short[] { new Short(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
            xInitialize.initialize(listAny);
           
            // add a control to the dialog to add the extension automatically to the filename...
            XFilePickerControlAccess xFilePickerControlAccess = (XFilePickerControlAccess) UnoRuntime.queryInterface(XFilePickerControlAccess.class, xFilePicker);
            xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true));
           
View Full Code Here

    XMultiServiceFactory  serviceMgr;
    serviceMgr  = (XMultiServiceFactory)UnoRuntime.queryInterface(
      XMultiServiceFactory.class, managerFact.createInstance());

    // Set the ServiceManager at the JavaLoader with the XInitialization
    XInitialization      init;
    init  = (XInitialization)UnoRuntime.queryInterface(
      XInitialization.class, implLoader);

    Object[]  initargs  = { serviceMgr };  
    init.initialize(initargs);

    // Use the XSet interface at the ServiceManager to add the factory of
    // the loader
    XSet  serviceMgrXSet  = (XSet)UnoRuntime.queryInterface(
      XSet.class, serviceMgr);
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XInitialization

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.