Package org.projectforge.export

Examples of org.projectforge.export.ExportJFreeChart


  }

  private void jFreeChartExport()
  {
    try {
      final ExportJFreeChart exportJFreeChart = (ExportJFreeChart) groovyResult.getResult();
      final StringBuilder sb = new StringBuilder();
      sb.append("pf_chart_");
      sb.append(DateHelper.getTimestampAsFilenameSuffix(new Date()));
      final Response response = getResponse();
      final String extension = exportJFreeChart.write(response.getOutputStream());
      sb.append('.').append(extension);
      final String filename = sb.toString();
      final int width = exportJFreeChart.getWidth();
      final int height = exportJFreeChart.getHeight();
      final JFreeChartImage image = new JFreeChartImage("image", exportJFreeChart.getJFreeChart(), exportJFreeChart.getImageType(), width,
          height);
      image.add(AttributeModifier.replace("width", String.valueOf(width)));
      image.add(AttributeModifier.replace("height", String.valueOf(height)));
      imageResultContainer.removeAll();
      imageResultContainer.add(image).setVisible(true);
View Full Code Here

TOP

Related Classes of org.projectforge.export.ExportJFreeChart

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.