Package com.sun.star.chart2

Examples of com.sun.star.chart2.XDataProvider


            final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
            final XDiagram diagram = chartDoc.getFirstDiagram();
            final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
            final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
            final XCoordinateSystem coordSystem = coordSystems[0];
            final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
            axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
        }
        catch ( Exception ex )
        {
            fail( "internal error: could not retrieve primary Y axis properties" );
View Full Code Here


        // insert the chart
        textRange.getText().insertTextContent(textRange, chartTextContent, false);

        // retrieve the chart model
        XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, shapeProps.getPropertyValue( "Model" ) );
        m_chartDocument = new OfficeDocument( i_orb, chartDoc );

        // actually activate the object
        final XEmbeddedObject embeddedChart = UnoRuntime.queryInterface( XEmbeddedObject.class,
            shapeProps.getPropertyValue( "EmbeddedObject" ) );
View Full Code Here

        m_textDocument.close();
    }

    private XPropertySet impl_getWallProperties()
    {
        final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
        final XDiagram diagram = chartDoc.getFirstDiagram();
        final XPropertySet wallProperties = diagram.getWall();
        return wallProperties;
    }
View Full Code Here

    private XPropertySet impl_getYAxisProperties()
    {
        XPropertySet axisProperties = null;
        try
        {
            final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
            final XDiagram diagram = chartDoc.getFirstDiagram();
            final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
            final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
            final XCoordinateSystem coordSystem = coordSystems[0];
            final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
            axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
View Full Code Here

        {
            final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
            final XDiagram diagram = chartDoc.getFirstDiagram();
            final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
            final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
            final XCoordinateSystem coordSystem = coordSystems[0];
            final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
            axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
        }
        catch ( Exception ex )
        {
            fail( "internal error: could not retrieve primary Y axis properties" );
View Full Code Here

        XPropertySet axisProperties = null;
        try
        {
            final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
            final XDiagram diagram = chartDoc.getFirstDiagram();
            final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
            final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
            final XCoordinateSystem coordSystem = coordSystems[0];
            final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
            axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
        }
        catch ( Exception ex )
View Full Code Here

    {
        XMultiServiceFactory xFactory = (XMultiServiceFactory) param.getMSF();

        try
        {
            XDataProvider xDataProv = (XDataProvider) UnoRuntime.queryInterface(
                XDataProvider.class,
                xFactory.createInstance( "com.sun.star.comp.chart.FileDataProvider" ));

            XDataReceiver xRec = (XDataReceiver) UnoRuntime.queryInterface(
                XDataReceiver.class, xModel );
View Full Code Here

        {
            XDataProvider xDataProv = (XDataProvider) UnoRuntime.queryInterface(
                XDataProvider.class,
                xFactory.createInstance( "com.sun.star.comp.chart.FileDataProvider" ));

            XDataReceiver xRec = (XDataReceiver) UnoRuntime.queryInterface(
                XDataReceiver.class, xModel );

            if( xDataProv != null &&
                xRec != null )
            {
                xRec.attachDataProvider( xDataProv );
                String aURL = "file://" + System.getProperty( "user.dir" ) +
                    System.getProperty( "file.separator" ) + "data.chd";
                log.println( aURL );
                xRec.setRangeRepresentation( aURL );
            }
        }
        catch( Exception ex )
        {
            failed( ex.getMessage() );
View Full Code Here

    }

    private XPropertySet impl_getWallProperties()
    {
        final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
        final XDiagram diagram = chartDoc.getFirstDiagram();
        final XPropertySet wallProperties = diagram.getWall();
        return wallProperties;
    }
View Full Code Here

    {
        XPropertySet axisProperties = null;
        try
        {
            final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
            final XDiagram diagram = chartDoc.getFirstDiagram();
            final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
            final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
            final XCoordinateSystem coordSystem = coordSystems[0];
            final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
            axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
View Full Code Here

TOP

Related Classes of com.sun.star.chart2.XDataProvider

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.