|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.function.AbstractExpression
org.pentaho.reporting.engine.classic.core.modules.misc.survey.SurveyScaleExpression
public class SurveyScaleExpression
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 ContentFieldType
.
Constructor Summary | |
---|---|
SurveyScaleExpression()
|
|
SurveyScaleExpression(int lowest,
int highest)
Creates a new expression. |
|
SurveyScaleExpression(int lowest,
int highest,
String lowerBoundsField,
String upperBoundsField,
Shape shape)
Creates a new expression. |
Method Summary | |
---|---|
Object |
clone()
Clones the expression. |
String[] |
getField()
|
String |
getField(int idx)
|
int |
getHighest()
|
int |
getLowest()
|
Shape |
getOverrideShape()
Returns the override shape. |
String |
getRangeLowerBoundField()
Returns the name of the field containing the lower bound of the range that is to be highlighted on the scale. |
Paint |
getRangePaint()
|
String |
getRangeUpperBoundField()
Returns the name of the field containing the upper bound of the range that is to be highlighted on the scale. |
Object |
getValue()
Returns a SurveyScale instance that is set up to display the values in the current row. |
boolean |
isOverrideShapeFilled()
|
void |
setField(int index,
String field)
|
void |
setField(String[] fields)
|
void |
setHighest(int highest)
|
void |
setLowest(int lowest)
|
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 |
setRangeLowerBoundField(String field)
Sets the name of the field containing the lower bound of the range that is to be highlighted on the scale. |
void |
setRangePaint(Paint rangePaint)
|
void |
setRangeUpperBoundField(String field)
Sets the name of the field containing the upper bound of the range that is to be highlighted on the scale. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
---|
getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SurveyScaleExpression()
public SurveyScaleExpression(int lowest, int highest)
lowest
- the lowest value on the response scale.highest
- the highest value on the response scale.public SurveyScaleExpression(int lowest, int highest, String lowerBoundsField, String upperBoundsField, Shape shape)
lowest
- the lowest value on the response scale.highest
- the highest value on the response scale.lowerBoundsField
- the name of the field containing the lower bound of the highlighted range
(null
permitted).upperBoundsField
- the name of the field containing the upper bound of the highlighted range
(null
permitted).shape
- a shape that will be used to override the shape displayed for the first series
(null
permitted).Method Detail |
---|
public String getRangeLowerBoundField()
null
).public void setRangeLowerBoundField(String field)
null
if you have no range to highlight.
field
- the field name (null
permitted).public String getRangeUpperBoundField()
null
).public void setRangeUpperBoundField(String field)
null
if you have no range to highlight.
field
- the field name (null
permitted).public Shape getOverrideShape()
null
).public void setOverrideShape(Shape shape)
SurveyScale
is created with a set of default shapes, this method allows you
to replace the *first* shape if you need to (leave it as null
otherwise).
shape
- the shape (null
permitted).public void setOverrideShapeFilled(boolean b)
b
- the flag.public int getLowest()
public void setLowest(int lowest)
public int getHighest()
public void setHighest(int highest)
public Object getValue()
SurveyScale
instance that is set up to display the values in the current row.
SurveyScale
instance.public Object clone() throws CloneNotSupportedException
clone
in interface Expression
clone
in class AbstractExpression
CloneNotSupportedException
- this should never happen.public String[] getField()
public void setField(String[] fields)
public String getField(int idx)
public void setField(int index, String field)
public boolean isOverrideShapeFilled()
public Paint getRangePaint()
public void setRangePaint(Paint rangePaint)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |