|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.jfree.chart.style.AbstractChartStyle
schmitzm.jfree.feature.style.FeatureChartStyle.Dummy
public 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. Instead they can create an
instance of this dummy an pipe their method implementations to the
dummy!
The #applyToFeatureCollection(FeatureCollection)
and
applyToDataset(Dataset)
methods are not implemented by the dummy,
but throw an exception instead!!
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface schmitzm.jfree.feature.style.FeatureChartStyle |
---|
FeatureChartStyle.Dummy |
Field Summary | |
---|---|
protected Map<Integer,String> |
attrNames
Holds the attributes needed to specify the chart data from feature collection (0 = attribute for domain axis; others assigned to the range axis as series). |
protected boolean |
forceCategories
Indicates whether a CategoryDataset is forced for
a numeric domain attribute. |
protected int |
maxAttrCount
Holds the maximum number of attributes the style can be defined defined for (-1 = no limit). |
protected int |
maxAttrIdx
Holds the number of attributes the style is defined for. |
protected Map<Integer,Set<Object>> |
noDataValues
Holds the "No Data" values for each attribute. |
protected Map<Integer,Boolean> |
normalizeAttr
Indicates for each attribute whether the attribute data is normalized (before creating a Dataset ). |
protected boolean |
sortDomainAxis
Indicates whether the features are sorted according to the domain attribute (before creating a Dataset ). |
Fields inherited from class schmitzm.jfree.chart.style.AbstractChartStyle |
---|
axisStyle, bgPaint, borderVisible, descStyle, id, legend, LOGGER, maxRendererDatasetIdx, orientation, plotStyle, rendererStyle, TIPGEN_CAT, TIPGEN_XY, titleStyle, tooltips, type, URLGEN_CAT, URLGEN_XY, urls |
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 |
Constructor Summary | |
---|---|
protected |
FeatureChartStyle.Dummy(String id)
Creates a new dummy. |
protected |
FeatureChartStyle.Dummy(String id,
int maxAttrCount)
Creates a new dummy. |
Method Summary | ||
---|---|---|
void |
addNoDataValue(int idx,
Object noDataValue)
Sets a value, which is interpreted as "No Data". |
|
JFreeChart |
applyToDataset(Dataset dataset)
Does nothing, but always throws a UnsupportedOperationException ,
because the dummy can not provide this functionality. |
|
JFreeChart |
applyToFeatureCollection(
Does nothing, but always throws a UnsupportedOperationException ,
because the dummy can not provide this functionality. |
|
AbstractChartStyle |
copy()
Creates a (deep) clone of this style. |
|
ChartStyle |
copyTo(ChartStyle dest)
Copies all properties of this style to another one. |
|
|
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 sortDomainAxis)
Sets whether the features are sorted according to the domain attribute (before creating a Dataset ). |
Methods inherited from class schmitzm.jfree.chart.style.AbstractChartStyle |
---|
applyToChart, 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, setType, setURLs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface schmitzm.jfree.chart.style.ChartStyle |
---|
applyToChart, 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 |
Field Detail |
---|
protected boolean sortDomainAxis
Dataset
).
protected boolean forceCategories
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.
protected Map<Integer,String> attrNames
protected Map<Integer,Boolean> normalizeAttr
Dataset
).
protected int maxAttrCount
protected int maxAttrIdx
protected Map<Integer,Set<Object>> noDataValues
Constructor Detail |
---|
protected FeatureChartStyle.Dummy(String id)
id
- a (unique) ID for the styleprotected FeatureChartStyle.Dummy(String id, int maxAttrCount)
id
- a (unique) ID for the stylemaxAttrCount
- attribute count needed to specify the chart data
from feature collectionMethod Detail |
---|
public void removeAttribute(int idx)
removeAttribute
in interface FeatureChartStyle
idx
- an attributepublic AbstractChartStyle copy()
AbstractChartStyle
) are ignored
because they are unused for the dummy.
copy
in interface Copyable<ChartStyle>
copy
in class AbstractChartStyle
public ChartStyle copyTo(ChartStyle dest)
AbstractChartStyle
) are ignored
because they are unused for the dummy.
copyTo
in interface Copyable<ChartStyle>
copyTo
in class AbstractChartStyle
dest
- destination object (if null
the copy
is created by copy()
)
dest
or the new instancepublic int getMaxAttributeCount()
getMaxAttributeCount
in interface FeatureChartStyle
public int getAttributeCount()
getAttributeCount
in interface FeatureChartStyle
public String getAttributeName(int idx)
getAttributeName
in interface FeatureChartStyle
idx
- attribute index (0=domain; 1=1st range series;
2=2nd range series; ...)public void setAttributeName(int idx, String attrName)
setAttributeName
in interface FeatureChartStyle
idx
- attribute index (0=domain; 1=1st range series;
2=2nd range series; ...)attrName
- feature attribute namepublic void setSortDomainAxis(boolean sortDomainAxis)
Dataset
).
setSortDomainAxis
in interface FeatureChartStyle
public boolean isSortDomainAxis()
Dataset
).
isSortDomainAxis
in interface FeatureChartStyle
false
as defaultpublic void setForceCategories(boolean forceCategories)
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.
setForceCategories
in interface FeatureChartStyle
public boolean isForceCategories()
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
in interface FeatureChartStyle
false
as defaultpublic void setAttributeNormalized(int idx, Boolean normalize)
Dataset
).
setAttributeNormalized
in interface FeatureChartStyle
idx
- attribute index (0=domain; 1=1st range series;
2=2nd range series; ...)normalize
- indicates the normalize propertypublic boolean isAttributeNormalized(int idx)
Dataset
).
isAttributeNormalized
in interface FeatureChartStyle
idx
- attribute index (0=domain; 1=1st range series;
2=2nd range series; ...)
false
as defaultpublic void setNoDataValues(int idx, Set<Object> noDataValues)
setNoDataValues
in interface FeatureChartStyle
idx
- attribute index the "No Data" values are set fornoDataValues
- the "No Data" valuespublic Set<Object> getNoDataValues(int idx)
getNoDataValues
in interface FeatureChartStyle
idx
- attribute index the "No Data" values are returned forpublic void addNoDataValue(int idx, Object noDataValue)
addNoDataValue
in interface FeatureChartStyle
idx
- attribute index the "No Data" value is set fornoDataValue
- the "No Data" valuepublic boolean removeNoDataValue(int idx, Object noDataValue)
removeNoDataValue
in interface FeatureChartStyle
idx
- attribute index the "No Data" value is removed fornoDataValue
- the "No Data" value to remove
false
if the value was not an "No Data" valuepublic boolean isNoDataValue(int idx, Object value)
isNoDataValue
in interface FeatureChartStyle
idx
- attribute index the "No Data" value is checked forvalue
- an attribute valuepublic <T> T filterNoDataValue(int idx, T value)
null
, otherwise
the value itself.
filterNoDataValue
in interface FeatureChartStyle
idx
- attribute index the "No Data" value is checked forvalue
- an attribute value
null
if the given value is one of the "No data" valuespublic JFreeChart applyToDataset(Dataset dataset)
UnsupportedOperationException
,
because the dummy can not provide this functionality.
applyToDataset
in interface ChartStyle
dataset
- the data for the chartpublic JFreeChart applyToFeatureCollection(fc)
UnsupportedOperationException
,
because the dummy can not provide this functionality.
applyToFeatureCollection
in interface FeatureChartStyle
fc
- a feature collection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |