schmitzm.jfree.feature.style
Interface FeatureChartStyle

All Superinterfaces:
ChartStyle, Copyable<ChartStyle>
All Known Implementing Classes:
FeatureBasicChartStyle, FeatureChartStyle.Dummy, FeatureScatterChartStyle

public interface FeatureChartStyle
extends ChartStyle

This interface extends the chart style with several functionalities used to define a chart on a FeatureCollection.

Version:
1.0
Author:
Martin Schmitz

Nested Class Summary
static class FeatureChartStyle.Dummy
          This class defines a dummy implementation of FeatureChartStyle just to maintain the properties of the interface FeatureChartStyle, so sub classes of FeatureChartStyle which usually are derived from a normal ChartStyle implementation must not implement the FeatureChartStyle maintenance each.
 
Field Summary
 
Fields inherited from interface schmitzm.jfree.chart.style.ChartStyle
DOMAIN_AXIS, LOGGER, RANGE_AXIS, RANGE_AXIS2, X_AXIS, Y_AXIS, Y_AXIS_LEFT, Y_AXIS_RIGHT, Y_AXIS2
 
Method Summary
 void addNoDataValue(int idx, Object noDataValue)
          Sets a value, which is interpreted as "No Data".
 JFreeChart applyToFeatureCollection( fc)
          Creates a chart according to the given
<T> T
filterNoDataValue(int idx, T value)
          Checks whether the given value is one of the "No data" values for the attribute.
 int getAttributeCount()
          Returns the number of feature attributes defined in this style.
 String getAttributeName(int idx)
          Returns the name of a feature attribute needed to create a chart for this style.
 int getMaxAttributeCount()
          Returns the maximum number of feature attributes that can be specified by this style.
 Set<Object> getNoDataValues(int idx)
          Returns the values, which are interpreted as "No Data".
 boolean isAttributeNormalized(int idx)
          Returns whether the attribute data is normalized for an attribute (before creating a Dataset).
 boolean isForceCategories()
          Returns whether a CategoryDataset is forced for a numeric domain attribute.
 boolean isNoDataValue(int idx, Object value)
          Checks whether the given value is one of the "No data" values for the attribute.
 boolean isSortDomainAxis()
          Returns whether the features are sorted according to the domain attribute (before creating a Dataset).
 void removeAttribute(int idx)
          Removes all style informations about an attribute and reorganizes the attribute indexes so there is an continuous order.
 boolean removeNoDataValue(int idx, Object noDataValue)
          Removes a "No Data" value for an attribute.
 void setAttributeName(int idx, String attrName)
          Sets the name of a feature attribute needed to create a chart for this style.
 void setAttributeNormalized(int idx, Boolean normalize)
          Sets whether the attribute data is normalized for an attribute (before creating a Dataset).
 void setForceCategories(boolean forceCategories)
          Sets whether a CategoryDataset is forced for a numeric domain attribute.
 void setNoDataValues(int idx, Set<Object> noDataValues)
          Sets the values, which are interpreted as "No Data".
 void setSortDomainAxis(boolean sort)
          Sets whether the features are sorted according to the domain attribute (before creating a Dataset).
 
Methods inherited from interface schmitzm.jfree.chart.style.ChartStyle
applyToChart, applyToDataset, getAxisCount, getAxisStyle, getBackground, getDescStyle, getID, getOrientation, getPlotStyle, getRendererCount, getRendererStyle, getTitleStyle, getType, hasLegend, hasTooltips, hasURLs, isBorderVisible, setAxisStyle, setBackground, setBorderVisible, setDescStyle, setLegend, setOrientation, setPlotStyle, setRendererStyle, setTitleStyle, setTooltips, setURLs
 
Methods inherited from interface skrueger.geotools.Copyable
copy, copyTo
 

Method Detail

getMaxAttributeCount

int getMaxAttributeCount()
Returns the maximum number of feature attributes that can be specified by this style.

Returns:
-1 if there is no limit for range attributes

getAttributeCount

int getAttributeCount()
Returns the number of feature attributes defined in this style.


removeAttribute

void removeAttribute(int idx)
Removes all style informations about an attribute and reorganizes the attribute indexes so there is an continuous order.

Parameters:
idx - an attribute index

getAttributeName

String getAttributeName(int idx)
Returns the name of a feature attribute needed to create a chart for this style.

Parameters:
idx - attribute index (0=domain; 1=1st range series; 2=2nd range series; ...)

setAttributeName

void setAttributeName(int idx,
                      String attrName)
Sets the name of a feature attribute needed to create a chart for this style.

Parameters:
idx - attribute index (0=domain; 1=1st range series; 2=2nd range series; ...)
attrName - feature attribute name

applyToFeatureCollection

JFreeChart applyToFeatureCollection( fc)
Creates a chart according to the given

Parameters:
fc - a feature collection
Throws:
UnsupportedOperationException - if the style can not be applied to the FeatureCollection (e.g. the FeatureCollection does not provide the required attributes)

setSortDomainAxis

void setSortDomainAxis(boolean sort)
Sets whether the features are sorted according to the domain attribute (before creating a Dataset).


isSortDomainAxis

boolean isSortDomainAxis()
Returns whether the features are sorted according to the domain attribute (before creating a Dataset).

Returns:
false as default

setForceCategories

void setForceCategories(boolean forceCategories)
Sets whether a CategoryDataset is forced for a numeric domain attribute. The default is to create XYDataset for a numeric and CategoryDataset for a non-numeric domain attribute.


isForceCategories

boolean isForceCategories()
Returns whether a CategoryDataset is forced for a numeric domain attribute. The default is to create XYDataset for a numeric and CategoryDataset for a non-numeric domain attribute.

Returns:
false as default

setAttributeNormalized

void setAttributeNormalized(int idx,
                            Boolean normalize)
Sets whether the attribute data is normalized for an attribute (before creating a Dataset).

Parameters:
idx - attribute index (0=domain; 1=1st range series; 2=2nd range series; ...)
normalize - indicates the normalize property

isAttributeNormalized

boolean isAttributeNormalized(int idx)
Returns whether the attribute data is normalized for an attribute (before creating a Dataset).

Parameters:
idx - attribute index (0=domain; 1=1st range series; 2=2nd range series; ...)
normalize - indicates the normalize property
Returns:
false as default

setNoDataValues

void setNoDataValues(int idx,
                     Set<Object> noDataValues)
Sets the values, which are interpreted as "No Data".

Parameters:
idx - attribute index the "No Data" values are set for
noDataValues - the "No Data" values

getNoDataValues

Set<Object> getNoDataValues(int idx)
Returns the values, which are interpreted as "No Data".

Parameters:
idx - attribute index the "No Data" values are returned for

addNoDataValue

void addNoDataValue(int idx,
                    Object noDataValue)
Sets a value, which is interpreted as "No Data".

Parameters:
idx - attribute index the "No Data" value is set for
noDataValue - the "No Data" value

removeNoDataValue

boolean removeNoDataValue(int idx,
                          Object noDataValue)
Removes a "No Data" value for an attribute.

Parameters:
idx - attribute index the "No Data" value is removed for
noDataValue - the "No Data" value to remove
Returns:
false if the value was not an "No Data" value

isNoDataValue

boolean isNoDataValue(int idx,
                      Object value)
Checks whether the given value is one of the "No data" values for the attribute.

Parameters:
idx - attribute index the "No Data" value is checked for
value - an attribute value

filterNoDataValue

<T> T filterNoDataValue(int idx,
                        T value)
Checks whether the given value is one of the "No data" values for the attribute. In this case this method returns null, otherwise the value itself.

Parameters:
idx - attribute index the "No Data" value is checked for
value - an attribute value
Returns:
null if the given value is one of the "No data" values