Examples of XTitle


Examples of com.sun.star.chart2.XTitle

            // set title at new chart
            XTitled xTitled = (XTitled) UnoRuntime.queryInterface(
                XTitled.class, mxChartModel );

            // set title via new API
            XTitle xTitle = setTitle( xTitled, "Sample", "@main-title" );

//             printInterfacesAndServices( xTitle );

            // get title via old API
            XShape xTitleShape = mxOldDoc.getTitle();
View Full Code Here

Examples of com.sun.star.chart2.XTitle

    // ------------

    private XTitle setTitle( XTitled xTitleParent, String aTitle, String aId )
    {
        XTitle xTitle = null;

        if( xTitleParent != null )
            try
            {
                XMultiServiceFactory xFact = (XMultiServiceFactory)param.getMSF();
                XMultiComponentFactory xCompFact = (XMultiComponentFactory) UnoRuntime.queryInterface(
                    XMultiComponentFactory.class, xFact );

                XFormattedString[] aStrings = new XFormattedString[ 2 ];
                aStrings[0] = (XFormattedString) UnoRuntime.queryInterface(
                    XFormattedString.class,
                    xFact.createInstance(
                        "com.sun.star.chart2.FormattedString" ));
                aStrings[1] = (XFormattedString) UnoRuntime.queryInterface(
                    XFormattedString.class,
                    xFact.createInstance(
                        "com.sun.star.chart2.FormattedString" ));
                aStrings[0].setString( aTitle );
                aStrings[1].setString( " Title" );

                Hashtable aParams = new Hashtable();
                aParams.put( "Identifier", aId );

                xTitle = (XTitle) UnoRuntime.queryInterface(
                    XTitle.class,
                    xCompFact.createInstanceWithContext(
                        "com.sun.star.chart2.Title",
                        new ComponentContext( aParams, getComponentContext( xFact ) )));

                xTitle.setText( aStrings );
                XPropertySet xTitleProp = (XPropertySet) UnoRuntime.queryInterface(
                    XPropertySet.class, xTitle );
                xTitleProp.setPropertyValue( "FillColor", new Integer( 0xfff8dc )); // cornsilk1
                xTitleParent.setTitle( xTitle );
            }
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.