planetj.chart
Class ChartSpecificationPG

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byplanetj.property.PropertyGroup
              extended byplanetj.property.DefaultPropertyGroup
                  extended byplanetj.chart.ChartSpecificationPG
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, IChartConstants, IChartTypes, java.util.Map, java.io.Serializable

public class ChartSpecificationPG
extends DefaultPropertyGroup
implements IChartTypes, IChartConstants

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

See Also:
Serialized Form

Field Summary
static java.lang.String CATEGORY_AXIS_LABEL
          Property name for the label to display on the category axis.
static java.lang.String CATEGORY_COLUMNS
          Property name for the List of column names containing category values.
static java.lang.String CATEGORY_LABEL_COLUMNS
          Property name for the List of column names containing the display labels for categories.
static java.lang.String CATEGORY_LABEL_SEPARATOR
          Property name for the separator to use between columns when multiple columns are specified for category label columns.
static java.lang.String CATEGORY_LABELS
          Property name for the List of display labels for categories.
static java.lang.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 java.lang.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 java.lang.String HEIGHT
          Property name for the height of chart.
static java.lang.String ID
          Property name for the id to uniquely identify a chart specification property group.
static java.lang.String LEGEND
          Property name for whether or not to include the charts legend.
static java.lang.String PLOT_BY
          Property name for whether to plot series by row or columns values.
static java.lang.String PLOT_BY_COLUMN
          Value used to specify plotting series from column values.
static java.lang.String PLOT_BY_ROW
          Value used to specify plotting series from row values.
static java.lang.String SERIES_COLUMNS
          Property name for the List of column names to be used for series values.
static java.lang.String SERIES_LABEL_COLUMNS
          Property name for the List of column names containing the display labels for series.
static java.lang.String SERIES_LABEL_SEPARATOR
          Property name for the separator to use between columns when multiple columns are specified for series label columns.
static java.lang.String SERIES_LABELS
          Property name for the List of display labels for series.
static java.lang.String TITLE
          Property name for the title of the chart.
static java.lang.String TYPE
          Property name for the type of chart to generate.
static java.lang.String VALUE_AXIS_LABEL
          Property name for the label to display on the value axis.
static java.lang.String WIDTH
          Property name for the width of chart.
 
Fields inherited from class planetj.property.PropertyGroup
ALL, ALL_FALSE, ALL_TRUE, BOOLEAN_PROPERTY, DATE_PROPERTY, DOUBLE_PROPERTY, FLOAT_PROPERTY, INTEGER_PROPERTY, JAVA_CLASS_PROPERTY, LIST_PROPERTY, MAP_PROPERTY, NONE, 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(java.lang.String pName)
          Constructor.
 
Method Summary
 java.util.List getAllPropertyNames()
          Gets a List containing the names of all the supported properties.
 java.lang.String getCategoryAxisLabel()
          Get the label for the category axis.
 java.util.List getCategoryColumns()
          Get a list of columns containing values for each category.
 java.util.List getCategoryLabelColumns()
          Get a list of columns to use for labels for the chart's categories.
 java.util.List getCategoryLabels()
          Get a list of labels for the chart's categories.
 java.lang.String getCategoryLabelSeparator()
          Get the separator for multiple labels for a category.
static java.lang.String getDefaultLayoutPropertiesString()
          Gets a default String for this property group.
 int getHeight()
          Get the height of the chart.
 java.lang.String getId()
          Get the id for this chart.
 java.lang.String getImageSource()
          Get the source for the image used when generating a link to this chart.
 java.util.List getSeriesColumns()
          Get a list of columns containing values for each series.
 java.util.List getSeriesLabelColumns()
          Get a list of columns to use for labels for the chart's series.
 java.util.List getSeriesLabels()
          Get a list of labels for the chart's series.
 java.lang.String getSeriesLabelSeparator()
          Get the separator for multiple labels for a series.
 java.lang.String getTitle()
          Get the title of the chart.
 int getType()
          Get the type of chart to generate.
 java.lang.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.
protected  short propertyType(java.lang.String propertyName)
          Gets the type of property for a specified property name.
 
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, copyUndefinedPropertiesFrom, createProperty, createValue, getAllMetapropertyNames, getAllSetBooleanPropertyNames, getAllSetIntPropertyNames, getAllSetListPropertyNames, getAllSetPropertyNames, getAllSetStringPropertyNames, getBooleanValue, getDateFormat, getDateValue, getDoubleValue, getFloatValue, getIntValue, getJavaClassValue, getListValue, getMapValue, getName, getProperty, getPropertyType, getStringValue, getValue, isMergeableOnList, isMetaproperty, iterator, mergeOnList, metapropertyType, put, put, put, setName, toString, updateProperty, validate, validateMetadata, validateMetadataBoolean
 
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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

CHART

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

See Also:
Constant Field Values

ID

public static final java.lang.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 java.lang.String DEFAULT_ID
Default id given to all charts without a specified chart id.

See Also:
Constant Field Values

TYPE

public static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String PLOT_BY_ROW
Value used to specify plotting series from row values.

See Also:
Constant Field Values

PLOT_BY_COLUMN

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

See Also:
Constant Field Values

VALUE_AXIS_LABEL

public static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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(java.lang.String pName)
Constructor.

Method Detail

getAllPropertyNames

public java.util.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 java.lang.String getCategoryAxisLabel()
Get the label for the category axis.

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

getCategoryColumns

public java.util.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 java.util.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 java.util.List getCategoryLabels()
Get a list of labels for the chart's categories.

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

getCategoryLabelSeparator

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

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

getDefaultLayoutPropertiesString

public static java.lang.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 java.lang.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 java.lang.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 java.util.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 java.util.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 java.util.List getSeriesLabels()
Get a list of labels for the chart's series.

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

getSeriesLabelSeparator

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

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

getTitle

public java.lang.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 java.lang.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.

propertyType

protected short propertyType(java.lang.String propertyName)
Gets the type of property for a specified property name.

Overrides:
propertyType in class DefaultPropertyGroup