Package net.sf.jasperreports.engine
Class JRAbstractChartCustomizer
- java.lang.Object
-
- net.sf.jasperreports.engine.JRAbstractChartCustomizer
-
- All Implemented Interfaces:
JRChartCustomizer,NamedChartCustomizer
public abstract class JRAbstractChartCustomizer extends Object implements NamedChartCustomizer
Abstract implementation ofJRChartCustomizerthat provides access to parameter, variable and field values.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected JRFillChartchartprotected JRBaseFillerfiller-
Fields inherited from interface net.sf.jasperreports.engine.JRChartCustomizer
CUSTOMIZER_CLASS_PROPERTY_PREFIX, CUSTOMIZER_PROPERTY_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRAbstractChartCustomizer()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleangetBooleanProperty(String propertySuffix)StringgetCustomizerPropertyName(String propertySuffix)DoublegetDoubleProperty(String propertySuffix)protected ObjectgetFieldValue(String fieldName)Returns the value of a report field.protected ObjectgetFieldValue(String fieldName, boolean fromInputDataset)Returns the value of a report or input dataset field.FloatgetFloatProperty(String propertySuffix)IntegergetIntegerProperty(String propertySuffix)protected ObjectgetParameterValue(String parameterName)Returns the value of a report parameter.protected ObjectgetParameterValue(String parameterName, boolean fromInputDataset)Returns the value of a report or input dataset parameter.StringgetProperty(String propertySuffix)protected ObjectgetVariableValue(String variableName)Returns the value of a report variable.protected ObjectgetVariableValue(String variableName, boolean fromInputDataset)Returns the value of a report or input dataset variable.voidinit(JRFillChart chart)Initializes the chart customizer.voidsetName(String name)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRChartCustomizer
customize
-
-
-
-
Field Detail
-
chart
protected JRFillChart chart
-
filler
protected JRBaseFiller filler
-
-
Method Detail
-
init
public void init(JRFillChart chart)
Initializes the chart customizer.- Parameters:
chart- the fill chart object
-
getParameterValue
protected final Object getParameterValue(String parameterName)
Returns the value of a report parameter.- Parameters:
parameterName- the parameter name- Returns:
- the value of a report parameter
-
getParameterValue
protected final Object getParameterValue(String parameterName, boolean fromInputDataset)
Returns the value of a report or input dataset parameter.The input dataset differs from the report dataset when the chart uses a sub dataset as input.
- Parameters:
parameterName- the parameter namefromInputDataset- whether the parameter belongs to the input dataset rather than the report.This is usefull only when the chart uses a sub dataset as input.
- Returns:
- the value of the parameter
-
getVariableValue
protected final Object getVariableValue(String variableName)
Returns the value of a report variable.- Parameters:
variableName- the variable name- Returns:
- the value of a report variable
-
getVariableValue
protected final Object getVariableValue(String variableName, boolean fromInputDataset)
Returns the value of a report or input dataset variable.The input dataset differs from the report dataset when the chart uses a sub dataset as input.
- Parameters:
variableName- the variable namefromInputDataset- whether the variable belongs to the input dataset rather than the report.This is usefull only when the chart uses a sub dataset as input.
- Returns:
- the value of the variable
-
getFieldValue
protected final Object getFieldValue(String fieldName)
Returns the value of a report field.- Parameters:
fieldName- the field name- Returns:
- the value of a report field
-
getFieldValue
protected final Object getFieldValue(String fieldName, boolean fromInputDataset)
Returns the value of a report or input dataset field.The input dataset differs from the report dataset when the chart uses a sub dataset as input.
- Parameters:
fieldName- the field namefromInputDataset- whether the field belongs to the input dataset rather than the report.This is usefull only when the chart uses a sub dataset as input.
- Returns:
- the value of the field
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceNamedChartCustomizer
-
-