Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lbg.common.io
Class CommonChartHandling

    java.lang.Object
      lbg.common.io.CommonChartHandling

    public class CommonChartHandling

extends java.lang.Object

Author:
  Cyril Briquet

Field Summary
`static int` | `DEFAULT_IMG_CHART_HEIGHT`
`static int` | `DEFAULT_IMG_CHART_WIDTH`
`static int` | `DEFAULT_PDF_CHART_HEIGHT`
`static int` | `DEFAULT_PDF_CHART_WIDTH`

Constructor Summary
`CommonChartHandling()`

Method Summary
`static org.jfree.chart.JFreeChart` | `generateChart(java.lang.String title, java.lang.String x_label, java.lang.String y_label, double[] values)`
`static java.awt.image.BufferedImage` | `generateChartImage(org.jfree.chart.JFreeChart chart)`
`static org.jfree.data.category.CategoryDataset` | `generateDataset(double[] values)`
`static org.jfree.chart.JFreeChart` | `saveAsPDF(org.jfree.chart.JFreeChart chart, java.lang.String fn)` Saves target chart as a .pdf file.
`static org.jfree.chart.JFreeChart` | `saveAsPDF(org.jfree.chart.JFreeChart chart, java.lang.String fn, int w, int h)` Saves target chart as a .pdf file.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_IMG_CHART_WIDTH

    public static final int DEFAULT_IMG_CHART_WIDTH

See Also:
  Constant Field Values

### DEFAULT_IMG_CHART_HEIGHT

    public static final int DEFAULT_IMG_CHART_HEIGHT

See Also:
  Constant Field Values

### DEFAULT_PDF_CHART_WIDTH

    public static final int DEFAULT_PDF_CHART_WIDTH

See Also:
  Constant Field Values

### DEFAULT_PDF_CHART_HEIGHT

    public static final int DEFAULT_PDF_CHART_HEIGHT

See Also:
  Constant Field Values

Constructor Detail

### CommonChartHandling

    public CommonChartHandling()

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### generateChart

    public static org.jfree.chart.JFreeChart generateChart(java.lang.String title,
                                                           java.lang.String x_label,
                                                           java.lang.String y_label,
                                                           double[] values)
                                                    throws GridException

  Throws:
    `GridException`

### generateDataset

    public static org.jfree.data.category.CategoryDataset generateDataset(double[] values)
                                                                   throws GridException

  Throws:
    `GridException`

### generateChartImage

    public static java.awt.image.BufferedImage generateChartImage(org.jfree.chart.JFreeChart chart)
                                                           throws GridException

  Throws:
    `GridException`

### saveAsPDF

    public static org.jfree.chart.JFreeChart saveAsPDF(org.jfree.chart.JFreeChart chart,
                                                       java.lang.String fn)
                                                throws GridException

  Saves target chart as a .pdf file.

  Parameters:
    `chart` - target chart
    `fn` - target .pdf filename
  Returns:
    chart target chart, to enable method chaining
  Throws:
    `GridException` - if a parameter is illegal

### saveAsPDF

    public static org.jfree.chart.JFreeChart saveAsPDF(org.jfree.chart.JFreeChart chart,
                                                       java.lang.String fn,
                                                       int w,
                                                       int h)
                                                throws GridException

  Saves target chart as a .pdf file.

  Parameters:
    `chart` - target chart
    `fn` - target .pdf filename
    `w` - width of target .pdf file
    `h` - height of target .pdf file
  Returns:
    chart target chart, to enable method chaining
  Throws:
    `GridException` - if a parameter is illegal

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

> Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.