Package com.sun.star.lang

Examples of com.sun.star.lang.XInitialization


            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

    }
       
    public void callSQLErrorMessageDialog(SQLException oSQLException, XWindow _xWindow){
    try {
            Object oDialog = xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog");
            XInitialization xInitialization = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oDialog);
            PropertyValue[] aPropertyValue = new PropertyValue[2];
            aPropertyValue[0] = Properties.createProperty("SQLException", oSQLException);                               
            aPropertyValue[1] = Properties.createProperty("ParentWindow", _xWindow);                               
            xInitialization.initialize(aPropertyValue);
            XExecutableDialog xExecutableDialog = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oDialog);
            xExecutableDialog.execute();           
    } catch (com.sun.star.uno.Exception ex) {
        ex.printStackTrace();
    }}
View Full Code Here

        PropertyValue[] aProperties  = new PropertyValue[4];
        aProperties[0] = Properties.createProperty("ActiveConnection", curTableDescriptor.DBConnection);
        aProperties[1] = Properties.createProperty("DataSource", curTableDescriptor.xDataSource);
        aProperties[2] = Properties.createProperty("CommandType", new Integer(CommandType.TABLE));
        aProperties[3] = Properties.createProperty("Command", scomposedtablename);
        XInitialization xInitialization = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oFormWizard);
        xInitialization.initialize(aProperties);
        XJobExecutor xJobExecutor = (XJobExecutor) UnoRuntime.queryInterface(XJobExecutor.class, oFormWizard);
        xJobExecutor.trigger("start");
        XPropertySet prop = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xJobExecutor);
        components[0] = (XComponent)prop.getPropertyValue("Document");
        components[1] = (XComponent)prop.getPropertyValue("DocumentDefinition");
View Full Code Here


    public void displaySQLErrorDialog(Exception _exception, XWindow _xParentWindow) {
        try {
            Object oErrorDialog = CurDBMetaData.xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog");
            XInitialization xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oErrorDialog);
            XExecutableDialog xExecute = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog);
            PropertyValue[] rDispatchArguments = new PropertyValue[3];
            rDispatchArguments[0] = Properties.createProperty("Title", Configuration.getProductName(CurDBMetaData.xMSF) + " Base");
            rDispatchArguments[1] = Properties.createProperty("ParentWindow", _xParentWindow);
            rDispatchArguments[2] = Properties.createProperty("SQLException", _exception);
            xInitialize.initialize(rDispatchArguments);
            xExecute.execute();
            //TODO dispose???
        } catch (Exception typeexception) {
            typeexception.printStackTrace(System.out);
        }
View Full Code Here

        MyObject obj = new MyObject();

        XAggregation xAggr = oObj.createProxy(obj);

        XInitialization xInit = (XInitialization)UnoRuntime.queryInterface(
                XInitialization.class, xAggr);

        Object params[] = new Object[0];

        try {
            xInit.initialize(params);
        } catch(com.sun.star.uno.Exception e) {
            log.println("Unexpected exception : " + e.getMessage());
            e.printStackTrace(log);
            tRes.tested("createProxy()", false);
            return;
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

       
        try {  
           
            oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
                                      .createInstance("com.sun.star.comp.configuration.backend.SystemIntegration");
            XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(XInitialization.class,oObj);
            xInit.initialize(args);
           
        } catch (com.sun.star.uno.Exception e) {
        }

        log.println("Implementation name: "+ util.utils.getImplName(oObj));       
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

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.