schmitzm.jfree.feature.style
Interface FeatureChartStyle

All Superinterfaces:
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
 JFreeChart applyToFeatureCollection(FeatureCollection fc)
          Creates a chart according to the given
 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.
 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 isSortDomainAxis()
          Returns whether the features are sorted according to the domain attribute (before creating a Dataset).
 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 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
 

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.


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(FeatureCollection 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