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:
java.io.Serializable,java.lang.Cloneable,Expression
public class SurveyScaleExpression extends ColumnAggregationExpression implements java.io.Serializable
An expression that takes values from one or more fields in the current row of the report, builds aSurveyScaleinstance 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 containNumberinstances.TheSurveyScaleclass implements the Drawable interface, so it can be displayed using a DrawableElement.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SurveyScaleExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcomputeValue()Returns aSurveyScaleinstance that is set up to display the values in the current row.protected intgetFieldListParameterPosition()intgetHighestValue()intgetLowestValue()java.awt.ShapegetOverrideShape()Returns the override shape.java.lang.NumbergetRangeLowerBound()java.awt.PaintgetRangePaint()java.lang.NumbergetRangeUpperBound()booleanisOverrideShapeFilled()voidsetHighestValue(int highestValue)voidsetLowestValue(int lowestValue)voidsetOverrideShape(java.awt.Shape shape)Sets the override shape.voidsetOverrideShapeFilled(boolean b)Sets a flag that controls whether the override shape is filled or not.voidsetRangeLowerBound(java.lang.Number rangeLowerBound)voidsetRangePaint(java.awt.Paint rangePaint)voidsetRangeUpperBound(java.lang.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
-
-
-
-
Method Detail
-
getFieldListParameterPosition
protected int getFieldListParameterPosition()
- Specified by:
getFieldListParameterPositionin classColumnAggregationExpression
-
getRangeLowerBound
public java.lang.Number getRangeLowerBound()
-
setRangeLowerBound
public void setRangeLowerBound(java.lang.Number rangeLowerBound)
-
getRangeUpperBound
public java.lang.Number getRangeUpperBound()
-
setRangeUpperBound
public void setRangeUpperBound(java.lang.Number rangeUpperBound)
-
getLowestValue
public int getLowestValue()
-
setLowestValue
public void setLowestValue(int lowestValue)
-
getHighestValue
public int getHighestValue()
-
setHighestValue
public void setHighestValue(int highestValue)
-
getOverrideShape
public java.awt.Shape getOverrideShape()
Returns the override shape.- Returns:
- The override shape (possibly
null).
-
setOverrideShape
public void setOverrideShape(java.awt.Shape shape)
Sets the override shape. TheSurveyScaleis created with a set of default shapes, this method allows you to clearFromParent the *first* shape if you need to (leave it asnullotherwise).- Parameters:
shape- the shape (nullpermitted).
-
setOverrideShapeFilled
public void setOverrideShapeFilled(boolean b)
Sets a flag that controls whether the override shape is filled or not.- Parameters:
b- the flag.
-
computeValue
public java.lang.Object computeValue() throws DataSourceExceptionReturns aSurveyScaleinstance that is set up to display the values in the current row.- Specified by:
computeValuein interfaceExpression- Returns:
- a
SurveyScaleinstance. - Throws:
DataSourceException
-
isOverrideShapeFilled
public boolean isOverrideShapeFilled()
-
getRangePaint
public java.awt.Paint getRangePaint()
-
setRangePaint
public void setRangePaint(java.awt.Paint rangePaint)
-
-