| 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.graphics.charts.ChartsBuilder
public class ChartsBuilder
A Charts class with static methods. Its used to create de.latlon.charts from the given inputs.
| Field Summary | |
|---|---|
static int | 
ORIENTATION_HORIZONTAL
To indicate a horizontal chart type  | 
static int | 
ORIENTATION_VERTICAL
To indicate a vertical chart type  | 
protected static int | 
VALUE_FORMAT_SERIES
&CDU=23,25,21,26&SPD=42 23 33 36  | 
protected static int | 
VALUE_FORMAT_SIMPLE
&CDU=34&SPD=36&Gruene=11  | 
protected static int | 
VALUE_FORMAT_UNKNOWN
Unknown format  | 
protected static int | 
VALUE_FORMAT_XYSERIES
&CDU=1970 23;1974,44;1978,43&SPD=1970,23;1974,44;1978,43  | 
| Constructor Summary | |
|---|---|
ChartsBuilder(ChartConfig chartConfigs)
 | 
|
| Method Summary | |
|---|---|
protected  org.jfree.chart.JFreeChart | 
configChart(org.jfree.chart.JFreeChart chart,
                       ChartConfig chartConfigs)
Initializes the chart with the values from the properties file config.properties  | 
protected  org.jfree.chart.JFreeChart | 
configLineChart(org.jfree.chart.JFreeChart chart,
                               ChartConfig chartConfigs)
Configures the pie chart according to the stored configurations file  | 
protected  org.jfree.chart.JFreeChart | 
configPieChart(org.jfree.chart.JFreeChart chart,
                             ChartConfig chartConfigs)
Configures the pie chart according to the stored configurations file  | 
protected  org.jfree.data.category.CategoryDataset | 
convertMapToCategoryDataSet(QueuedMap<String,String> keyedValues)
It takes in a map a QueuedMap and converts it to a XYDataSet.  | 
protected  org.jfree.data.xy.XYDataset | 
convertMapToXYSeriesDataSet(QueuedMap<String,String> keyedValues)
It takes in a map a QueuedMap and converts it to a XYDataSet.The two tokens of each tupel have to be numbers Format: key = x1,y1;x2,y2;x3,y3; Example row1 = 2,3;4,10;  | 
 BufferedImage | 
createBarChart(String title,
                             QueuedMap<String,String> keyedValues,
                             int width,
                             int height,
                             boolean is3D,
                             boolean legend,
                             boolean tooltips,
                             int orientation,
                             String imageType,
                             String horizontalAxisName,
                             String verticalAxisName,
                             ChartConfig chartConfigs)
Creates a Bar chart  | 
protected  BufferedImage | 
createBufferedImage(org.jfree.chart.JFreeChart chart,
                                       int width,
                                       int height,
                                       String imageType)
Creates a BufferedImage instance from a given chart, according to the given additional parameters  | 
 BufferedImage | 
createLineChart(String title,
                               QueuedMap<String,String> keyedValues,
                               int width,
                               int height,
                               boolean is3D,
                               boolean legend,
                               boolean tooltips,
                               int orientation,
                               String imageType,
                               String horizontalAxisName,
                               String verticalAxisName,
                               ChartConfig chartConfigs)
Creates a Line chart  | 
 BufferedImage | 
createPieChart(String title,
                             QueuedMap<String,Double> keyedValues,
                             int width,
                             int height,
                             boolean is3D,
                             boolean legend,
                             boolean tooltips,
                             String lblType,
                             String imageType,
                             ChartConfig chartConfigs)
Create a pie 2D/3D Pie Chart  | 
 BufferedImage | 
createXYLineChart(String title,
                                   QueuedMap<String,String> keyedValues,
                                   int width,
                                   int height,
                                   boolean legend,
                                   boolean tooltips,
                                   int orientation,
                                   String imageType,
                                   String horizontalAxisName,
                                   String verticalAxisName,
                                   ChartConfig chartConfigs)
Creates an XY Line chart  | 
protected  int | 
mapImageformat(String imgFormat)
Maps the image format to an appropriate type, either RGB or RGBA (allow opacity).  | 
protected  org.jfree.chart.plot.PlotOrientation | 
translateToPlotOrientation(int orientation)
Translates an integer that represents the chart orientation to a plot orientation instance  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int ORIENTATION_HORIZONTAL
public static final int ORIENTATION_VERTICAL
protected static final int VALUE_FORMAT_SIMPLE
protected static final int VALUE_FORMAT_SERIES
protected static final int VALUE_FORMAT_XYSERIES
protected static final int VALUE_FORMAT_UNKNOWN
| Constructor Detail | 
|---|
public ChartsBuilder(ChartConfig chartConfigs)
chartConfigs - | Method Detail | 
|---|
public BufferedImage createPieChart(String title,
                                    QueuedMap<String,Double> keyedValues,
                                    int width,
                                    int height,
                                    boolean is3D,
                                    boolean legend,
                                    boolean tooltips,
                                    String lblType,
                                    String imageType,
                                    ChartConfig chartConfigs)
title - keyedValues - The key/value pairs used for the pie chartwidth - of the output imageheight - height of the output imageis3D - is a 3D Chartlegend - for the output charttooltips - for the output chartlblType - Possible types are Key, Value, KeyValueimageType - of the output imagechartConfigs - to configure the output chart, or null to use the default ChartConfig
public BufferedImage createBarChart(String title,
                                    QueuedMap<String,String> keyedValues,
                                    int width,
                                    int height,
                                    boolean is3D,
                                    boolean legend,
                                    boolean tooltips,
                                    int orientation,
                                    String imageType,
                                    String horizontalAxisName,
                                    String verticalAxisName,
                                    ChartConfig chartConfigs)
                             throws IncorrectFormatException
title - keyedValues - key is the category name, value is a series tupels as follows for instance key1 = (arg1,4);(arg2,6)
            key2 = (arg1,8); (arg2,11)width - of the output imageheight - height of the output imageis3D - is a 3D Chartlegend - for the output charttooltips - for the output de.latlon.chartsorientation - Horiyontal or vertical chartimageType - of the output imagehorizontalAxisName - Name of the Horizontal AxisverticalAxisName - Name of the vertical AxischartConfigs - to configure the output chart, or null to use the default ChartConfig
IncorrectFormatException
public BufferedImage createLineChart(String title,
                                     QueuedMap<String,String> keyedValues,
                                     int width,
                                     int height,
                                     boolean is3D,
                                     boolean legend,
                                     boolean tooltips,
                                     int orientation,
                                     String imageType,
                                     String horizontalAxisName,
                                     String verticalAxisName,
                                     ChartConfig chartConfigs)
                              throws IncorrectFormatException
title - keyedValues - key is the category name, value is a series tupels as follows for instance key1 = (arg1,4);(arg2,6)
            key2 = (arg1,8); (arg2,11)width - of the output imageheight - height of the output imageis3D - is a 3D Chartlegend - for the output charttooltips - for the output de.latlon.chartsorientation - Horiyontal or vertical chartimageType - of the output imagehorizontalAxisName - Name of the Horizontal AxisverticalAxisName - Name of the vertical AxischartConfigs - to configure the output chart, or null to use the default ChartConfig
IncorrectFormatException
public BufferedImage createXYLineChart(String title,
                                       QueuedMap<String,String> keyedValues,
                                       int width,
                                       int height,
                                       boolean legend,
                                       boolean tooltips,
                                       int orientation,
                                       String imageType,
                                       String horizontalAxisName,
                                       String verticalAxisName,
                                       ChartConfig chartConfigs)
                                throws IncorrectFormatException
title - keyedValues - key is the category name, value is a series tupels Format: key = x1,y1;x2,y2;x3,y3 Example row1 =
            2,3;4,10 Note that x and y have to be numberswidth - of the output imageheight - height of the output imagelegend - for the output charttooltips - for the output de.latlon.chartsorientation - Horiyontal or vertical chartimageType - of the output imagehorizontalAxisName - Name of the Horizontal AxisverticalAxisName - Name of the vertical AxischartConfigs - to configure the output chart, or null to use the default ChartConfig
IncorrectFormatException
protected org.jfree.data.category.CategoryDataset convertMapToCategoryDataSet(QueuedMap<String,String> keyedValues)
                                                                       throws IncorrectFormatException
keyedValues - 
IncorrectFormatException
protected org.jfree.data.xy.XYDataset convertMapToXYSeriesDataSet(QueuedMap<String,String> keyedValues)
                                                           throws IncorrectFormatException
keyedValues - 
IncorrectFormatExceptionprotected org.jfree.chart.plot.PlotOrientation translateToPlotOrientation(int orientation)
orientation - 
protected BufferedImage createBufferedImage(org.jfree.chart.JFreeChart chart,
                                            int width,
                                            int height,
                                            String imageType)
chart - width - of the generated imageheight - of the generated imageimageType - ex image/png, image/jpg
protected org.jfree.chart.JFreeChart configPieChart(org.jfree.chart.JFreeChart chart,
                                                    ChartConfig chartConfigs)
chart - chartConfigs - to configure the output chart
protected org.jfree.chart.JFreeChart configLineChart(org.jfree.chart.JFreeChart chart,
                                                     ChartConfig chartConfigs)
chart - chartConfigs - to configure the output chart
protected org.jfree.chart.JFreeChart configChart(org.jfree.chart.JFreeChart chart,
                                                 ChartConfig chartConfigs)
chart - chartConfigs - to configure the output chart
protected int mapImageformat(String imgFormat)
imgFormat - 
  | 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
                    For more information visit: http://www.deegree.org