Package org.eclipse.birt.chart.factory

Examples of org.eclipse.birt.chart.factory.Generator


        bo.scale(72d / deviceRenderer.getDisplayServer().getDpiResolution()); // CONVERT
        // TO
        // POINTS

        // GENERATE AND RENDER THE CHART
        final Generator gr = Generator.instance();
        RunTimeContext rtc = new RunTimeContext();

        GeneratedChartState state = gr.build(deviceRenderer.getDisplayServer(), cm, bo, null, rtc, null);

        gr.render(deviceRenderer, state);
      } catch (Exception ex) {
        paintError = ex;
      } finally {
        gc.dispose();
        if (deviceRenderer != null) {
View Full Code Here


    }
    
    // define the bounds in points
    Bounds bo = BoundsImpl.create(0, 0, 800, 600); // in points
    // build the rendered chart structure
    Generator gr = Generator.instance();
    GeneratedChartState gcs = null;
    
    try {
        gcs = gr.build(idr.getDisplayServer(), cm, bo, null);
    } catch (ChartException gex) {
      gex.printStackTrace();   
    }
    
    // render the chart to a png file
    java.awt.Image img = new BufferedImage(
            (int) bo.getWidth(), (int) bo.getHeight(), BufferedImage.TYPE_INT_ARGB
    );
    try {
      idr.setProperty(IDeviceRenderer.FILE_IDENTIFIER, file.getRawLocation().toOSString());
      try {
        gr.render(idr, gcs);
      } catch (ChartException rex) {
        rex.printStackTrace();
      }
      file.refreshLocal(0, null);
      file.setDerived(true,null);
View Full Code Here

TOP

Related Classes of org.eclipse.birt.chart.factory.Generator

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.