Class SurveyScaleExpression
java.lang.Object
org.jfree.report.expressions.AbstractExpression
org.jfree.report.expressions.ColumnAggregationExpression
org.jfree.report.modules.misc.survey.SurveyScaleExpression
- All Implemented Interfaces:
Serializable
,Cloneable
,Expression
An expression that takes values from one or more fields in the current row of the
report, builds a
SurveyScale
instance that will present those values, and
returns that instance as the expression result. The fields used by the expression are
defined using properties named '0', '1', ... 'N', which need to be specified after the
expression is created. These fields should contain Number
instances.The SurveyScale
class implements the Drawable interface, so it can be displayed
using a DrawableElement.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aSurveyScale
instance that is set up to display the values in the current row.protected int
int
int
Returns the override shape.boolean
void
setHighestValue
(int highestValue) void
setLowestValue
(int lowestValue) void
setOverrideShape
(Shape shape) Sets the override shape.void
setOverrideShapeFilled
(boolean b) Sets a flag that controls whether the override shape is filled or not.void
setRangeLowerBound
(Number rangeLowerBound) void
setRangePaint
(Paint rangePaint) void
setRangeUpperBound
(Number rangeUpperBound) Methods inherited from class org.jfree.report.expressions.ColumnAggregationExpression
getFieldValues, getFieldValues
Methods inherited from class org.jfree.report.expressions.AbstractExpression
clone, getDataRow, getInstance, getName, getParentLocale, getReportConfiguration, getResourceBundleFactory, getRuntime, isDeepTraversing, isPrecompute, isPreserve, setDeepTraversing, setName, setPrecompute, setPreserve, setRuntime
-
Constructor Details
-
SurveyScaleExpression
public SurveyScaleExpression()
-
-
Method Details
-
getFieldListParameterPosition
protected int getFieldListParameterPosition()- Specified by:
getFieldListParameterPosition
in classColumnAggregationExpression
-
getRangeLowerBound
-
setRangeLowerBound
-
getRangeUpperBound
-
setRangeUpperBound
-
getLowestValue
public int getLowestValue() -
setLowestValue
public void setLowestValue(int lowestValue) -
getHighestValue
public int getHighestValue() -
setHighestValue
public void setHighestValue(int highestValue) -
getOverrideShape
Returns the override shape.- Returns:
- The override shape (possibly
null
).
-
setOverrideShape
Sets the override shape. TheSurveyScale
is created with a set of default shapes, this method allows you to clearFromParent the *first* shape if you need to (leave it asnull
otherwise).- Parameters:
shape
- the shape (null
permitted).
-
setOverrideShapeFilled
public void setOverrideShapeFilled(boolean b) Sets a flag that controls whether the override shape is filled or not.- Parameters:
b
- the flag.
-
computeValue
Returns aSurveyScale
instance that is set up to display the values in the current row.- Specified by:
computeValue
in interfaceExpression
- Returns:
- a
SurveyScale
instance. - Throws:
DataSourceException
-
isOverrideShapeFilled
public boolean isOverrideShapeFilled() -
getRangePaint
-
setRangePaint
-