org.jfree.report.modules.misc.survey

Class SurveyScaleExpression

public class SurveyScaleExpression extends ColumnAggregationExpression implements Serializable

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.
Constructor Summary
SurveyScaleExpression()
Method Summary
ObjectcomputeValue()
Returns a SurveyScale instance that is set up to display the values in the current row.
protected intgetFieldListParameterPosition()
intgetHighestValue()
intgetLowestValue()
ShapegetOverrideShape()
Returns the override shape.
NumbergetRangeLowerBound()
PaintgetRangePaint()
NumbergetRangeUpperBound()
booleanisOverrideShapeFilled()
voidsetHighestValue(int highestValue)
voidsetLowestValue(int lowestValue)
voidsetOverrideShape(Shape shape)
Sets the override shape.
voidsetOverrideShapeFilled(boolean b)
Sets a flag that controls whether the override shape is filled or not.
voidsetRangeLowerBound(Number rangeLowerBound)
voidsetRangePaint(Paint rangePaint)
voidsetRangeUpperBound(Number rangeUpperBound)

Constructor Detail

SurveyScaleExpression

public SurveyScaleExpression()

Method Detail

computeValue

public Object computeValue()
Returns a SurveyScale instance that is set up to display the values in the current row.

Returns: a SurveyScale instance.

getFieldListParameterPosition

protected int getFieldListParameterPosition()

getHighestValue

public int getHighestValue()

getLowestValue

public int getLowestValue()

getOverrideShape

public Shape getOverrideShape()
Returns the override shape.

Returns: The override shape (possibly null).

getRangeLowerBound

public Number getRangeLowerBound()

getRangePaint

public Paint getRangePaint()

getRangeUpperBound

public Number getRangeUpperBound()

isOverrideShapeFilled

public boolean isOverrideShapeFilled()

setHighestValue

public void setHighestValue(int highestValue)

setLowestValue

public void setLowestValue(int lowestValue)

setOverrideShape

public void setOverrideShape(Shape shape)
Sets the override shape. The SurveyScale is created with a set of default shapes, this method allows you to clearFromParent the *first* shape if you need to (leave it as null 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.

setRangeLowerBound

public void setRangeLowerBound(Number rangeLowerBound)

setRangePaint

public void setRangePaint(Paint rangePaint)

setRangeUpperBound

public void setRangeUpperBound(Number rangeUpperBound)