planetj.chart
Class ChartSpecificationPG

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--planetj.property.PropertyGroup
                    |
                    +--planetj.property.DefaultPropertyGroup
                          |
                          +--planetj.chart.ChartSpecificationPG
All Implemented Interfaces:
Cloneable, Comparable, IChartConstants, IChartTypes, Map, Serializable

public class ChartSpecificationPG
extends DefaultPropertyGroup
implements IChartTypes, IChartConstants

This property group encapsulates properties used to create and generate a chart using JFreeChart.

Author:
PlanetJ Corporation
See Also:
Serialized Form

Field Summary
static String CATEGORY_AXIS_LABEL
          Property name for the label to display on the category axis.
static String CATEGORY_COLUMNS
          Property name for the List of column names containing category values.
static String CATEGORY_LABEL_COLUMNS
          Property name for the List of column names containing the display labels for categories.
static String CATEGORY_LABEL_SEPARATOR
          Property name for the separator to use between columns when multiple columns are specified for category label columns.
static String CATEGORY_LABELS
          Property name for the List of display labels for categories.
static String CHART
          Key used to denote this property group's name.
static int DEFAULT_HEIGHT
          Default height of a chart used if no height is specified.
static String DEFAULT_ID
          Default id given to all charts without a specified chart id.
static int DEFAULT_WIDTH
          Default width of a chart used if no width is specified.
static String HEIGHT
          Property name for the height of chart.
static String ID
          Property name for the id to uniquely identify a chart specification property group.
static String LEGEND
          Property name for whether or not to include the charts legend.
static String PLOT_BY
          Property name for whether to plot series by row or columns values.
static String PLOT_BY_COLUMN
          Value used to specify plotting series from column values.
static String PLOT_BY_ROW
          Value used to specify plotting series from row values.
static String SERIES_COLUMNS
          Property name for the List of column names to be used for series values.
static String SERIES_LABEL_COLUMNS
          Property name for the List of column names containing the display labels for series.
static String SERIES_LABEL_SEPARATOR
          Property name for the separator to use between columns when multiple columns are specified for series label columns.
static String SERIES_LABELS
          Property name for the List of display labels for series.
static String TITLE
          Property name for the title of the chart.
static String TYPE
          Property name for the type of chart to generate.
static String VALUE_AXIS_LABEL
          Property name for the label to display on the value axis.
static String WIDTH
          Property name for the width of chart.
 
Fields inherited from class planetj.property.DefaultPropertyGroup
NONE
 
Fields inherited from class planetj.property.PropertyGroup
ALL_FALSE, ALL_TRUE, BOOLEAN_PROPERTY, DATE_PROPERTY, DOUBLE_PROPERTY, INTEGER_PROPERTY, LIST_PROPERTY, ROW_COLLECTION_KEY, STRING_PROPERTY
 
Fields inherited from interface planetj.chart.IChartTypes
HORIZONTAL_BAR, HORIZONTAL_BAR_3D, HORIZONTAL_BAR_3D_KEY, HORIZONTAL_BAR_KEY, LINE, LINE_KEY, PIE, PIE_3D, PIE_3D_KEY, PIE_KEY, UNKNOWN, VERTICAL_BAR, VERTICAL_BAR_3D, VERTICAL_BAR_3D_KEY, VERTICAL_BAR_KEY
 
Fields inherited from interface planetj.chart.IChartConstants
HORIZONTAL_BAR_CHART_ICON, PIE_CHART_ICON, VERTICAL_BAR_CHART_ICON
 
Constructor Summary
ChartSpecificationPG()
          Constructor.
ChartSpecificationPG(String pName)
          Constructor.
 
Method Summary
 List getAllPropertyNames()
          Gets a List containing the names of all the supported properties.
 String getCategoryAxisLabel()
          Get the label for the category axis.
 List getCategoryColumns()
          Get a list of columns containing values for each category.
 List getCategoryLabelColumns()
          Get a list of columns to use for labels for the chart's categories.
 List getCategoryLabels()
          Get a list of labels for the chart's categories.
 String getCategoryLabelSeparator()
          Get the separator for multiple labels for a category.
static String getDefaultLayoutPropertiesString()
          Gets a default String for this property group.
 int getHeight()
          Get the height of the chart.
 String getId()
          Get the id for this chart.
 String getImageSource()
          Get the source for the image used when generating a link to this chart.
 List getSeriesColumns()
          Get a list of columns containing values for each series.
 List getSeriesLabelColumns()
          Get a list of columns to use for labels for the chart's series.
 List getSeriesLabels()
          Get a list of labels for the chart's series.
 String getSeriesLabelSeparator()
          Get the separator for multiple labels for a series.
 String getTitle()
          Get the title of the chart.
 int getType()
          Get the type of chart to generate.
 String getValueAxisLabel()
          Get the label for the value axis.
 int getWidth()
          Get the width of the chart.
 boolean isPieChart()
          Whether or not this specification is for a pie chart.
 boolean isPlotByRow()
          Whether or not to include the legend when generating a chart.
 boolean isShowLegend()
          Whether or not to include the legend when generating a chart.
 boolean isShowTooltips()
          Whether or not to include the tooltips when generating a chart.
 boolean isShowURLs()
          Whether or not to include the urls when generating a chart.
 boolean isShowValues()
          Whether or not to include values by plotted points.
 
Methods inherited from class planetj.property.DefaultPropertyGroup
getDefaultPropertiesString, getRequiredPropertyNames
 
Methods inherited from class planetj.property.PropertyGroup
add, addProperty, addProperty, append, clone, compareTo, compareTo, compareTo, containsProperty, createProperty, getAllMetapropertyNames, getAllSetBooleanPropertyNames, getAllSetIntPropertyNames, getAllSetListPropertyNames, getAllSetPropertyNames, getAllSetStringPropertyNames, getBooleanValue, getDateValue, getDoubleValue, getIntValue, getListValue, getName, getProperty, getPropertyType, getStringValue, getValue, isMergeableOnList, isMetaproperty, iterator, mergeOnList, put, put, put, setName, toString, updateProperty
 
Methods inherited from class java.util.HashMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

CHART

public static final String CHART
Key used to denote this property group's name.

See Also:
Constant Field Values

ID

public static final String ID
Property name for the id to uniquely identify a chart specification property group. This property is a String property.

See Also:
Constant Field Values

DEFAULT_ID

public static final String DEFAULT_ID
Default id given to all charts without a specified chart id.

See Also:
Constant Field Values

TYPE

public static final String TYPE
Property name for the type of chart to generate. This property is a String property. Either the chart number or chart key String can be used.

See Also:
IChartTypes, Constant Field Values

TITLE

public static final String TITLE
Property name for the title of the chart. This property is a String property.

See Also:
Constant Field Values

WIDTH

public static final String WIDTH
Property name for the width of chart. This property is an int property.

See Also:
Constant Field Values

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
Default width of a chart used if no width is specified.

See Also:
Constant Field Values

HEIGHT

public static final String HEIGHT
Property name for the height of chart. This property is an int property.

See Also:
Constant Field Values

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
Default height of a chart used if no height is specified.

See Also:
Constant Field Values

LEGEND

public static final String LEGEND
Property name for whether or not to include the charts legend. This property is a boolean property.

See Also:
Constant Field Values

PLOT_BY

public static final String PLOT_BY
Property name for whether to plot series by row or columns values. This property is a String property. Valid values are "row" or "column".

See Also:
Constant Field Values

PLOT_BY_ROW

public static final String PLOT_BY_ROW
Value used to specify plotting series from row values.

See Also:
Constant Field Values

PLOT_BY_COLUMN

public static final String PLOT_BY_COLUMN
Value used to specify plotting series from column values.

See Also:
Constant Field Values

VALUE_AXIS_LABEL

public static final String VALUE_AXIS_LABEL
Property name for the label to display on the value axis. This propery is a String property.

See Also:
Constant Field Values

CATEGORY_AXIS_LABEL

public static final String CATEGORY_AXIS_LABEL
Property name for the label to display on the category axis. This propery is a String property.

See Also:
Constant Field Values

CATEGORY_COLUMNS

public static final String CATEGORY_COLUMNS
Property name for the List of column names containing category values. This property is a List property.

See Also:
Constant Field Values

CATEGORY_LABELS

public static final String CATEGORY_LABELS
Property name for the List of display labels for categories. This property is a List property.

See Also:
Constant Field Values

CATEGORY_LABEL_COLUMNS

public static final String CATEGORY_LABEL_COLUMNS
Property name for the List of column names containing the display labels for categories. This property is a List property.

See Also:
Constant Field Values

CATEGORY_LABEL_SEPARATOR

public static final String CATEGORY_LABEL_SEPARATOR
Property name for the separator to use between columns when multiple columns are specified for category label columns. This property is a String property.

See Also:
Constant Field Values

SERIES_COLUMNS

public static final String SERIES_COLUMNS
Property name for the List of column names to be used for series values. This property is a List property.

See Also:
Constant Field Values

SERIES_LABELS

public static final String SERIES_LABELS
Property name for the List of display labels for series. This property is a List property.

See Also:
Constant Field Values

SERIES_LABEL_COLUMNS

public static final String SERIES_LABEL_COLUMNS
Property name for the List of column names containing the display labels for series. This property is a List property.

See Also:
Constant Field Values

SERIES_LABEL_SEPARATOR

public static final String SERIES_LABEL_SEPARATOR
Property name for the separator to use between columns when multiple columns are specified for series label columns. This property is a String property.

See Also:
Constant Field Values
Constructor Detail

ChartSpecificationPG

public ChartSpecificationPG()
Constructor.


ChartSpecificationPG

public ChartSpecificationPG(String pName)
Constructor.

Method Detail

getAllPropertyNames

public List getAllPropertyNames()
Gets a List containing the names of all the supported properties.

Overrides:
getAllPropertyNames in class DefaultPropertyGroup
Returns:
list of names of all supported property for this property group.

getCategoryAxisLabel

public String getCategoryAxisLabel()
Get the label for the category axis.

Returns:
a string to use for the chart's category axis label.

getCategoryColumns

public List getCategoryColumns()
Get a list of columns containing values for each category.

Returns:
List of column names to to use for category values.

getCategoryLabelColumns

public List getCategoryLabelColumns()
Get a list of columns to use for labels for the chart's categories.

Returns:
List of columns to use for labels for the chart's categories.

getCategoryLabels

public List getCategoryLabels()
Get a list of labels for the chart's categories.

Returns:
List of labels for the chart's categories.

getCategoryLabelSeparator

public String getCategoryLabelSeparator()
Get the separator for multiple labels for a category.

Returns:
a string to separate multiple labels for a category.

getDefaultLayoutPropertiesString

public static String getDefaultLayoutPropertiesString()
Gets a default String for this property group. All properties are listed without any values.


getHeight

public int getHeight()
Get the height of the chart.

Returns:
height of chart.

getId

public String getId()
Get the id for this chart. This can be used to get a specific chart specification property group.

Returns:
id of the chart.

getImageSource

public String getImageSource()
Get the source for the image used when generating a link to this chart.

Returns:
a string for the source of the image.

getSeriesColumns

public List getSeriesColumns()
Get a list of columns containing values for each series.

Returns:
List of column names to to use for series values.

getSeriesLabelColumns

public List getSeriesLabelColumns()
Get a list of columns to use for labels for the chart's series.

Returns:
List of columns to use for labels for the chart's series.

getSeriesLabels

public List getSeriesLabels()
Get a list of labels for the chart's series.

Returns:
List of labels for the chart's series.

getSeriesLabelSeparator

public String getSeriesLabelSeparator()
Get the separator for multiple labels for a series.

Returns:
a string to separate multiple labels for a series.

getTitle

public String getTitle()
Get the title of the chart.

Returns:
a string to use for the title of the chart.

getType

public int getType()
Get the type of chart to generate.

Returns:
an int denoting the type of chart to generate (see IChartTypes)

getValueAxisLabel

public String getValueAxisLabel()
Get the label for the value axis.

Returns:
a string to use for the chart's value axis label.

getWidth

public int getWidth()
Get the width of the chart.

Returns:
width of chart.

isPieChart

public boolean isPieChart()
Whether or not this specification is for a pie chart.

Returns:
true if this property group is for a pie chart.

isPlotByRow

public boolean isPlotByRow()
Whether or not to include the legend when generating a chart.

Returns:
true if legend property exists and its value is set to true.

isShowLegend

public boolean isShowLegend()
Whether or not to include the legend when generating a chart.

Returns:
true if legend property exists and its value is set to true.

isShowTooltips

public boolean isShowTooltips()
Whether or not to include the tooltips when generating a chart.

Returns:
true if tooltips property exists and its value is set to true.

isShowURLs

public boolean isShowURLs()
Whether or not to include the urls when generating a chart.

Returns:
true if url property exists and its value is set to true.

isShowValues

public boolean isShowValues()
Whether or not to include values by plotted points.

Returns:
true if values property exists and its value is set to true.