Package org.jfree.chart.encoders

Examples of org.jfree.chart.encoders.KeypointPNGEncoderAdapter.encode()


    {

        JFreeChart chart = generateChart(key, width, height, color, startTime, endTime,dataPoints);
        KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
        encoder.setEncodingAlpha(true);
        return encoder.encode(chart.createBufferedImage(width, height, BufferedImage.BITMASK, null));
    }

    /**
     * Creates a chart.
     *
 
View Full Code Here


                chart = generateSparklineAreaChart(key, color, def, startTime, endTime, dataPoints);
        }

        KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
        encoder.setEncodingAlpha(true);
        return encoder.encode(chart.createBufferedImage(width, height, BufferedImage.BITMASK, null));
    }

    private XYDataset populateData(String key, Statistic[] def, long startTime, long endTime,
                                   int dataPoints)
    {
View Full Code Here

 
  private void writePngFile(File outputFile, JFreeChart chart, int [] size) throws IOException {
    BufferedImage image = chart.createBufferedImage(size[0], size[1]);
    KeypointPNGEncoderAdapter pngEncoder = new KeypointPNGEncoderAdapter();
    FileOutputStream output = new FileOutputStream(outputFile);
    pngEncoder.encode(image, output);
 

}
View Full Code Here

  }

  public void exportChartAsPNG(OutputStream out) throws IOException {
    KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
    encoder.setEncodingAlpha(true);
    encoder.encode(getChartImage(), out);
  }

  public byte[] exportChartAsPNG() throws IOException {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    try {
View Full Code Here

  }

  private void exportAsPNG(BufferedImage image, OutputStream out) throws IOException {
    KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
    encoder.setEncodingAlpha(true);
    encoder.encode(image, out);
  }

  public boolean isDeprecatedChart(HttpServletRequest request) {
    String chartType = request.getParameter(BaseChartWeb.CHART_PARAM_TYPE);
    if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {
View Full Code Here

  }

  public void exportChartAsPNG(OutputStream out) throws IOException {
    KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
    encoder.setEncodingAlpha(true);
    encoder.encode(getChartImage(), out);
  }

  public byte[] exportChartAsPNG() throws IOException {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    try {
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.