An expression that takes values from one or more fields in the current row of the
report, builds a
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
| Method from org.jfree.report.modules.misc.survey.SurveyScaleExpression Detail: |
public Object clone() throws CloneNotSupportedException {
final SurveyScaleExpression fva = (SurveyScaleExpression) super.clone();
fva.fieldList = (ArrayList) this.fieldList.clone();
return fva;
}
|
public String[] getField() {
return (String[]) fieldList.toArray(new String[fieldList.size()]);
}
|
public String getField(int idx) {
return (String) this.fieldList.get(idx);
}
|
public int getHighest() {
return highest;
}
|
public int getLowest() {
return lowest;
}
|
public Shape getOverrideShape() {
return this.overrideShape;
}
Returns the override shape. |
public String getRangeLowerBoundField() {
return this.rangeLowerBoundField;
}
Returns the name of the field containing the lower bound of the range that is to be
highlighted on the scale. |
public Paint getRangePaint() {
return rangePaint;
}
|
public String getRangeUpperBoundField() {
return this.rangeUpperBoundField;
}
Returns the name of the field containing the upper bound of the range that is to be
highlighted on the scale. |
public Object getValue() {
final SurveyScale result =
new SurveyScale(this.lowest, this.highest, collectValues());
if (this.rangeLowerBoundField != null && this.rangeUpperBoundField != null)
{
final Number b0 = (Number) getDataRow().get(this.rangeLowerBoundField);
final Number b1 = (Number) getDataRow().get(this.rangeUpperBoundField);
result.setRangeLowerBound(b0);
result.setRangeUpperBound(b1);
}
result.setRangePaint(this.rangePaint);
if (this.overrideShape != null)
{
result.setShape(0, this.overrideShape);
result.setShapeFilled(0, this.overrideShapeFilled);
}
return result;
}
Returns a SurveyScale instance that is set up to display the values in the
current row. |
public boolean isOverrideShapeFilled() {
return overrideShapeFilled;
}
|
public void setField(String[] fields) {
this.fieldList.clear();
this.fieldList.addAll(Arrays.asList(fields));
}
|
public void setField(int index,
String field) {
if (fieldList.size() == index)
{
fieldList.add(field);
}
else
{
fieldList.set(index, field);
}
}
|
public void setHighest(int highest) {
this.highest = highest;
}
|
public void setLowest(int lowest) {
this.lowest = lowest;
}
|
public void setOverrideShape(Shape shape) {
this.overrideShape = shape;
}
Sets the override shape. The 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). |
public void setOverrideShapeFilled(boolean b) {
this.overrideShapeFilled = b;
}
Sets a flag that controls whether the override shape is filled or not. |
public void setRangeLowerBoundField(String field) {
this.rangeLowerBoundField = field;
}
Sets the name of the field containing the lower bound of the range that is to be
highlighted on the scale. Set this to null if you have no range to
highlight. |
public void setRangePaint(Paint rangePaint) {
if (rangePaint == null)
{
throw new NullPointerException();
}
this.rangePaint = rangePaint;
}
|
public void setRangeUpperBoundField(String field) {
this.rangeUpperBoundField = field;
}
Sets the name of the field containing the upper bound of the range that is to be
highlighted on the scale. Set this to null if you have no range to
highlight. |