| |
|
| java.lang.Object org.jfree.report.elementfactory.ElementFactory org.jfree.report.elementfactory.ImageElementFactory org.jfree.report.elementfactory.ImageURLFieldElementFactory
ImageURLFieldElementFactory | public class ImageURLFieldElementFactory extends ImageElementFactory (Code) | | A factory to define ImageURLFieldElements. These elements expect an java.net.URL or an
String as content and will display the image content of that URL in the report.
author: Thomas Morgner |
Method Summary | |
public Element | createElement() Creates the image URL field element based on the defined properties. | public static ImageElement | createImageURLElement(String name, Rectangle2D bounds, String field) Creates a new ImageElement, which is fed from an URL stored in the datasource.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: field - the name of the column/function/expression that returns the URL for theimage. | public static ImageElement | createImageURLElement(String name, Rectangle2D bounds, String field, boolean scale) Creates a new ImageElement, which is fed from an URL stored in the datasource. | public static ImageElement | createImageURLElement(String name, Rectangle2D bounds, String field, boolean scale, boolean keepAspectRatio) Creates a new ImageElement, which is fed from an URL stored in the datasource.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: field - the name of the column/function/expression that returns theURL for the image. Parameters: scale - true if the content should be scaled to fit. Parameters: keepAspectRatio - preserve the aspect ratio. | public URL | getBaseURL() Returns the base url. | 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 | setBaseURL(URL baseURL) Defines a BaseURL for the new element. | 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. |
ImageURLFieldElementFactory | public ImageURLFieldElementFactory()(Code) | | DefaultConstructor.
|
createImageURLElement | public static ImageElement createImageURLElement(String name, Rectangle2D bounds, String field)(Code) | | Creates a new ImageElement, which is fed from an URL stored in the datasource.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: field - the name of the column/function/expression that returns the URL for theimage. a report element for displaying an image based on a URL. throws: NullPointerException - if bounds, name or source are null throws: IllegalArgumentException - if the given alignment is invalid |
createImageURLElement | public static ImageElement createImageURLElement(String name, Rectangle2D bounds, String field, boolean scale)(Code) | | Creates a new ImageElement, which is fed from an URL stored in the datasource.
Parameters: name - the name of the new element. Parameters: bounds - the bounds of the new element. Parameters: field - the name of the column/function/expression that returns the URL for theimage. Parameters: scale - scale the image? a report element for displaying an image based on a URL. throws: NullPointerException - if bounds, name or source are null throws: IllegalArgumentException - if the given alignment is invalid |
createImageURLElement | public static ImageElement createImageURLElement(String name, Rectangle2D bounds, String field, boolean scale, boolean keepAspectRatio)(Code) | | Creates a new ImageElement, which is fed from an URL stored in the datasource.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: field - the name of the column/function/expression that returns theURL for the image. Parameters: scale - true if the content should be scaled to fit. Parameters: keepAspectRatio - preserve the aspect ratio. a report element for displaying an image based on a URL. throws: NullPointerException - if bounds, name or source are null throws: IllegalArgumentException - if the given alignment is invalid |
getBaseURL | public URL getBaseURL()(Code) | | Returns the base url. The BaseURL is used to resolve relative URLs found in the
datasource.
the base url. |
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. |
setBaseURL | public void setBaseURL(URL baseURL)(Code) | | Defines a BaseURL for the new element. The BaseURL is used to resolve relative URLs found in the
datasource.
Parameters: baseURL - the base URL. |
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. |
|
|
|