| |
|
| java.lang.Object org.jfree.report.elementfactory.ElementFactory org.jfree.report.elementfactory.ShapeElementFactory org.jfree.report.elementfactory.ShapeFieldElementFactory
ShapeFieldElementFactory | public class ShapeFieldElementFactory extends ShapeElementFactory (Code) | | A factory to define Shape field elements.
author: Thomas Morgner |
Method Summary | |
public Element | createElement() Creates the shape field element. | public static ShapeElement | createShapeElement(String name, Rectangle2D bounds, Color paint, Stroke stroke, String fieldname, boolean shouldDraw, boolean shouldFill, boolean shouldScale, boolean keepAspectRatio) Creates a new ShapeElement.
Parameters: name - the name of the new element. Parameters: bounds - the bounds. Parameters: paint - the line color of this element. Parameters: stroke - the stroke of this shape. | public String | getFieldname() Returns the field name from where to read the content of the element. | public String | getFormula() Returns the formula that should be used to compute the value of the field. | public void | setFieldname(String fieldname) Defines the field name from where to read the content of the element. | public void | setFormula(String formula) Assigns a formula to the element to compute the value for this element. |
ShapeFieldElementFactory | public ShapeFieldElementFactory()(Code) | | DefaultConstructor.
|
createShapeElement | public static ShapeElement createShapeElement(String name, Rectangle2D bounds, Color paint, Stroke stroke, String fieldname, boolean shouldDraw, boolean shouldFill, boolean shouldScale, boolean keepAspectRatio)(Code) | | Creates a new ShapeElement.
Parameters: name - the name of the new element. Parameters: bounds - the bounds. Parameters: paint - the line color of this element. Parameters: stroke - the stroke of this shape. For pdf use, restrict toBasicStrokes. Parameters: fieldname - the fieldname from where to get the shape. Parameters: shouldDraw - draw the shape? Parameters: shouldFill - fill the shape? Parameters: shouldScale - scale the shape? Parameters: keepAspectRatio - preserve the aspect ratio? a report element for drawing a line. throws: NullPointerException - if bounds, name or shape are null throws: IllegalArgumentException - if the given alignment is invalid |
getFieldname | public String getFieldname()(Code) | | Returns the field name from where to read the content of the element.
the field name. |
getFormula | public String getFormula()(Code) | | Returns the formula that should be used to compute the value of the field.
The formula must be valid according to the OpenFormula
specifications.
the formula as string. |
setFieldname | public void setFieldname(String fieldname)(Code) | | Defines the field name from where to read the content of the element. The field name
is the name of a datarow column.
Parameters: fieldname - the field name. |
setFormula | public void setFormula(String formula)(Code) | | Assigns a formula to the element to compute the value for this element.
If a formula is defined, it will override the 'field' property.
Parameters: formula - the formula as a string. |
|
|
|