Package com.sun.star.chart

Examples of com.sun.star.chart.XDiagram


        log.println("Setting Diagram type to BarDiagram");
        XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
        if (doc == null) throw new StatusException(Status.failed
            ("Relation 'CHARTDOC' not found"));

        XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
        if (bar == null) throw new StatusException(Status.failed
            ("Relation 'BAR' not found"));

        doc.setDiagram(bar);
        log.println("Set it to 3D");
View Full Code Here


        log.println("Setting Diagram type to LineDiagram");
        doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
        if (doc == null) throw new StatusException(Status.failed
            ("Relation 'CHARTDOC' not found"));

        XDiagram stack = (XDiagram) tEnv.getObjRelation("STACK");
        if (stack == null) throw new StatusException(Status.failed
            ("Relation 'STACK' not found"));

        oldDiagram = doc.getDiagram();
View Full Code Here

        log.println("Setting Diagram type to StockDiagram");
        doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
        if (doc == null) throw new StatusException(Status.failed
            ("Relation 'CHARTDOC' not found"));

        XDiagram stock = (XDiagram) tEnv.getObjRelation("STOCK");
        if (stock == null) throw new StatusException(Status.failed
            ("Relation 'STOCK' not found"));

        oldDiagram = doc.getDiagram();
        doc.setDiagram(stock);
View Full Code Here

                                    XNameAccess.class, oCharts)).getByName("Example"));
    XEmbeddedObjectSupplier oEOS = (XEmbeddedObjectSupplier) UnoRuntime.queryInterface(
            XEmbeddedObjectSupplier.class, oChart);
    Object oInt = oEOS.getEmbeddedObject();
    XChartDocument xChart = (XChartDocument) UnoRuntime.queryInterface(XChartDocument.class,oInt);
    XDiagram oDiag = (XDiagram) xChart.getDiagram();
    System.out.println("Change Diagramm to 3D");
    XPropertySet oCPS = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, oDiag );
    oCPS.setPropertyValue("Dim3D", new Boolean(true));
    System.out.println("Change the title");
    XPropertySet oTPS = (XPropertySet)UnoRuntime.queryInterface(
View Full Code Here

            UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, xtablechart);
        XInterface xinterface = xembeddedobjectsupplier.getEmbeddedObject();
       
        XChartDocument xchartdocument = (XChartDocument)UnoRuntime.queryInterface(
            XChartDocument.class, xinterface);
        XDiagram xdiagram = (XDiagram) xchartdocument.getDiagram();
        XMultiServiceFactory xmultiservicefactory = (XMultiServiceFactory)
            UnoRuntime.queryInterface( XMultiServiceFactory.class, xchartdocument );
        Object object = xmultiservicefactory.createInstance( stringType );
        xdiagram = (XDiagram) UnoRuntime.queryInterface(XDiagram.class,object);
       
View Full Code Here

            XEmbeddedObjectSupplier oEOS = (XEmbeddedObjectSupplier)
                UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, oChart);
            XInterface oInt = oEOS.getEmbeddedObject();
            XChartDocument xChart = (XChartDocument) UnoRuntime.queryInterface(
                XChartDocument.class,oInt);
            XDiagram oDiag = (XDiagram) xChart.getDiagram();
            System.out.println("Change Diagramm to 3D");
            XPropertySet oCPS = (XPropertySet)UnoRuntime.queryInterface(
                XPropertySet.class, oDiag );
            oCPS.setPropertyValue("Dim3D", new Boolean(true));
            System.out.println("Change the title");
View Full Code Here

    * @see com.sun.star.chart.ChartLine
    */
    protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {

        XPropertySet oObj = null;
        XDiagram oDiagram = null;
        SOfficeFactory SOF = null;

        //get LineDiagram
        SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
        oDiagram = SOF.createDiagram(xChartDoc, "LineDiagram");

        log.println( "getting Line-Diagram" );
        xChartDoc.setDiagram(oDiagram);

        // get the Line
        try {
            log.println( "getting Line" );
            XPropertySet RowProps = oDiagram.getDataRowProperties(1);
            RowProps.setPropertyValue("MeanValue", new Boolean( true ));
            oObj = (XPropertySet) AnyConverter.toObject(
                new Type(XPropertySet.class),
                    RowProps.getPropertyValue("DataMeanValueProperties"));
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
View Full Code Here

    protected synchronized TestEnvironment createTestEnvironment
            (TestParameters Param, PrintWriter log) {

        XSpreadsheet oSheet=null;
        XChartDocument xChartDoc=null;
        XDiagram oObj = null;

        System.out.println("Getting spreadsheet") ;
        XSpreadsheets oSheets = xSheetDoc.getSheets() ;
        XIndexAccess oIndexSheets = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
View Full Code Here

    * </ul>
    */
    protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {

        XPropertySet  oObj = null;
        XDiagram oDiagram = null;
        // get the ChXDataRowPoint_Row
        try {
            log.println( "getting ChXDataRowPoint_Row" );
            oDiagram = (XDiagram) xChartDoc.getDiagram();
            oObj = (XPropertySet) oDiagram.getDataRowProperties(1);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            // Some exception occures.FAILED
            e.printStackTrace( log );
            throw new StatusException( "Couldn't get ChXDataRowPoint_Row", e );
        }
View Full Code Here

    * </ul>
    */
    protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {

        XPropertySet  oObj = null;
        XDiagram oDiagram = null;

        SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());

        // get the DataRowPoint_Point
        try {
            log.println( "getting ChXDataRowPoint_Point" );
            oDiagram = (XDiagram) xChartDoc.getDiagram();
            oObj = (XPropertySet) oDiagram.getDataPointProperties(1,1);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            // Some exception occures.FAILED
            e.printStackTrace( log );
            throw new StatusException( "Couldn't get ChXDataRowPoint_Point", e );
        }
View Full Code Here

TOP

Related Classes of com.sun.star.chart.XDiagram

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.