|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.ItemFactory
A factory used to create elements and bands using a single line command. The factory creates elements suitable for the static layout.
Constructor Summary | |
protected |
ItemFactory()
Constructor. |
Method Summary | |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.text.DateFormat format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullString,
java.text.DateFormat format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.text.DateFormat format,
java.lang.String function)
Deprecated. use createDateElement instead, as all DataAccess has been unified |
static TextElement |
createDateFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String function)
Deprecated. use createDateElement instead, as all DataAccess has been unified |
static TextElement |
createGeneralElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String function)
Deprecated. don't use the itemfactory for that kind of element or use the createStringElement method |
static Group |
createGroup(java.lang.String name,
java.util.List fields,
GroupFooter footer,
GroupHeader header)
Creates a new group with the specified name and GroupHeader and -footer. |
static Band |
createGroupFooter(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint)
Creates a GroupFooter-band with the specified height and the DefaultFont and DefaultPaint given. |
static Band |
createGroupHeader(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint,
boolean pageBreak)
Creates a GroupHeader-band with the specified height and the DefaultFont and DefaultPaint given. |
static ImageElement |
createImageDataRowElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field)
Creates a new ImageElement. |
static ImageElement |
createImageDataRowElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field,
boolean scale)
Creates a new ImageElement. |
static ImageElement |
createImageDataRowElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field,
boolean scale,
boolean keepAspectRatio)
Creates a new ImageElement. |
static ImageElement |
createImageElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.net.URL source)
Creates a new ImageElement. |
static ImageElement |
createImageElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.net.URL source,
boolean scale)
Creates a new ImageElement. |
static ImageElement |
createImageElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.net.URL source,
boolean scale,
boolean keepAspectRatio)
Creates a new ImageElement. |
static ImageElement |
createImageFieldElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field)
Deprecated. use createImageDataRowElement instead |
static ImageElement |
createImageFunctionElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String function)
Deprecated. use createImageDataRowElement instead |
static ImageElement |
createImageURLElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field)
Creates a new ImageElement, which is fed from an URL stored in the datasource. |
static ImageElement |
createImageURLElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field,
boolean scale)
Creates a new ImageElement, which is fed from an URL stored in the datasource. |
static ImageElement |
createImageURLElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field,
boolean scale,
boolean keepAspectRatio)
Creates a new ImageElement, which is fed from an URL stored in the datasource. |
static ImageElement |
createImageURLField(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String field)
Deprecated. use createImageURLElement instead |
static ImageElement |
createImageURLFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.lang.String function)
Deprecated. use createImageURLElement instead |
static Band |
createItemBand(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint)
Creates an ItemBand. |
static TextElement |
createLabelElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String labeltext)
Creates a new TextElement containing a label. |
static TextElement |
createLabelElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String labeltext)
Creates a new TextElement containing a label. |
static ShapeElement |
createLineShapeElement(java.lang.String name,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.geom.Line2D shape)
Creates a new LineShapeElement. |
static TextElement |
createMultilineTextElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String field)
Deprecated. use createStringElement instead |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.text.NumberFormat format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullString,
java.text.NumberFormat format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.text.NumberFormat format,
java.lang.String function)
Deprecated. use createNumberElement instead |
static TextElement |
createNumberFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String format,
java.lang.String function)
Deprecated. use createNumberElement instead |
static Band |
createPageFooter(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint,
boolean onfirstpage,
boolean onlastpage)
Creates a PageFooter-band with the specified height and the DefaultFont and DefaultPaint given. |
static Band |
createPageHeader(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint,
boolean onfirstpage,
boolean onlastpage)
Creates a PageHeader-band with the specified height and the DefaultFont and DefaultPaint given. |
static ShapeElement |
createRectangleShapeElement(java.lang.String name,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.geom.Rectangle2D shape,
boolean shouldDraw,
boolean shouldFill)
Creates a new RectangleShapeElement. |
static JFreeReport |
createReport(java.lang.String name,
ReportHeader rheader,
ReportFooter rfooter,
PageHeader pheader,
PageFooter pfooter,
GroupList groups,
ItemBand items,
ExpressionCollection functions,
ExpressionCollection expressions,
java.awt.print.PageFormat pageformat,
javax.swing.table.TableModel data)
Creates a new report. |
static Band |
createReportFooter(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint,
boolean isownpage)
Creates a ReportFooter-band with the specified height and the DefaultFont and DefaultPaint given. |
static Band |
createReportHeader(float height,
java.awt.Font defaultFont,
java.awt.Paint defaultPaint,
boolean isownpage)
Creates a ReportHeader-band with the specified height and the DefaultFont and DefaultPaint given. |
static TextElement |
createResourceElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color color,
int alignment,
int valignment,
java.awt.Font font,
java.lang.String nullValue,
java.lang.String resourceBase,
java.lang.String field)
creates a ResourceElement. |
static TextElement |
createResourceLabel(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullValue,
java.lang.String resourceBase,
java.lang.String resourceKey)
creates a ResourceElement. |
static ShapeElement |
createShapeElement(java.lang.String name,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Shape shape,
boolean shouldDraw,
boolean shouldFill)
Deprecated. this methods has to extract the bounds from the shape and correct the shape by using an AffineTransform. Use one of the createShape methods, that allow you to supply separate bounds and shapes. |
static ShapeElement |
createShapeElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Shape shape,
boolean shouldDraw,
boolean shouldFill,
boolean shouldScale)
Creates a new ShapeElement. |
static ShapeElement |
createShapeElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Shape shape,
boolean shouldDraw,
boolean shouldFill,
boolean shouldScale,
boolean keepAspectRatio)
Creates a new ShapeElement. |
static ShapeElement |
createShapeElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.lang.String fieldname,
boolean shouldDraw,
boolean shouldFill,
boolean shouldScale,
boolean keepAspectRatio)
Creates a new ShapeElement. |
static TextElement |
createStringElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String field)
Creates a new TextElement without any additional filtering. |
static TextElement |
createStringElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
int valign,
java.awt.Font font,
java.lang.String nullString,
java.lang.String field)
Creates a new TextElement without any additional filtering. |
static TextElement |
createStringFunction(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Paint paint,
int alignment,
java.awt.Font font,
java.lang.String nullString,
java.lang.String function)
Deprecated. use createStringElement instead |
static void |
setElementBounds(Element e,
java.awt.geom.Rectangle2D bounds)
A utility method for setting the element bounds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ItemFactory()
Method Detail |
public static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat-formatstring used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignmentvalign
- the vertical text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat-formatstring used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.text.DateFormat format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String nullString, java.text.DateFormat format, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.valign
- the vertical text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is nullformat
- the SimpleDateFormat used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullformat
- the SimpleDateFormat-formatstring used to format the datefunction
- the function name to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.text.DateFormat format, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullformat
- the SimpleDateFormat-formatstring used to format the datefunction
- the function name to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createGeneralElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfunction
- the function to retrieve values from
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.net.URL source)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)source
- the source url from where to load the image
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.net.URL source, boolean scale)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the color of this element (currently not used).source
- the source url from where to load the image.scale
- scale the image?
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.net.URL source, boolean scale, boolean keepAspectRatio)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the color of this element (currently not used).source
- the source url from where to load the image.scale
- scale the image?keepAspectRatio
- preserve the aspect ratio?
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageURLField(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)field
- the name of the column/function/expression that returns the URL for the image.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageURLElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)field
- the name of the column/function/expression that returns the URL for the image.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageURLElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field, boolean scale)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the color of this element (currently not used).field
- the name of the column/function/expression that returns the URL for the image.scale
- scale the image?
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageURLElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field, boolean scale, boolean keepAspectRatio)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)field
- the name of the column/function/expression that returns the URL for the image.scale
- true if the content should be scaled to fit.keepAspectRatio
- preserve the aspect ratio.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageURLFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)function
- the name of the function that returns the image URL.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageFieldElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)field
- the name of the column/function/expression that returns the URL for the image.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageDataRowElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)field
- the name of the column/function/expression that returns the URL for the image.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageDataRowElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field, boolean scale)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the color of this element (currently not used).field
- the name of the column/function/expression that returns the URL for the image.scale
- scale the image?
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageDataRowElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String field, boolean scale, boolean keepAspectRatio)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the color of this element (currently not used).field
- the name of the column/function/expression that returns the URL for the image.scale
- scale the image?keepAspectRatio
- preserve the aspect ratio?
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ImageElement createImageFunctionElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the color of this element (currently not used)function
- the name of the function that returns the URL for the image.
java.lang.NullPointerException
- if bounds, name or source are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createLabelElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String labeltext)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementlabeltext
- the text to display
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createLabelElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String labeltext)
TextElement
containing a label.
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the text color of this text element.alignment
- the horizontal alignment.valign
- the vertical alignment.font
- the font for this element.labeltext
- the text to display.
java.lang.NullPointerException
- if bounds, name, format or field are null
.
java.lang.IllegalArgumentException
- if the given alignment is invalid.public static ShapeElement createLineShapeElement(java.lang.String name, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.geom.Line2D shape)
name
- the name of the new elementpaint
- the line color of this elementstroke
- the stroke of this shape. For pdf use, restrict to BasicStokes.shape
- the Line2D shape
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ShapeElement createShapeElement(java.lang.String name, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Shape shape, boolean shouldDraw, boolean shouldFill)
name
- the name of the new element.paint
- the line color of this element.stroke
- the stroke of this shape. For pdf use, restrict to BasicStrokes.shape
- the shape.shouldDraw
- draw the shape?shouldFill
- fill the shape?
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ShapeElement createShapeElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Shape shape, boolean shouldDraw, boolean shouldFill, boolean shouldScale)
name
- the name of the new element.bounds
- the bounds.paint
- the line color of this element.stroke
- the stroke of this shape. For pdf use, restrict to BasicStrokes.shape
- the shape.shouldDraw
- draw the shape?shouldFill
- fill the shape?shouldScale
- scale the shape?
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ShapeElement createShapeElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Shape shape, boolean shouldDraw, boolean shouldFill, boolean shouldScale, boolean keepAspectRatio)
name
- the name of the new element.bounds
- the bounds.paint
- the line color of this element.stroke
- the stroke of this shape. For pdf use, restrict to BasicStrokes.shape
- the shape.shouldDraw
- draw the shape?shouldFill
- fill the shape?shouldScale
- scale the shape?keepAspectRatio
- preserve the aspect ratio?
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ShapeElement createShapeElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, java.awt.Stroke stroke, java.lang.String fieldname, boolean shouldDraw, boolean shouldFill, boolean shouldScale, boolean keepAspectRatio)
name
- the name of the new element.bounds
- the bounds.paint
- the line color of this element.stroke
- the stroke of this shape. For pdf use, restrict to BasicStrokes.fieldname
- the fieldname from where to get the shape.shouldDraw
- draw the shape?shouldFill
- fill the shape?shouldScale
- scale the shape?keepAspectRatio
- preserve the aspect ratio?
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static ShapeElement createRectangleShapeElement(java.lang.String name, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.geom.Rectangle2D shape, boolean shouldDraw, boolean shouldFill)
name
- the name of the new elementpaint
- the line color of this elementstroke
- the stroke of this shape. For pdf use, restrict to BasicStokes.shape
- the Rectangle2D shapeshouldDraw
- a flag controlling whether or not the shape outline is drawn.shouldFill
- a flag controlling whether or not the shape interior is filled.
java.lang.NullPointerException
- if bounds, name or shape are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createMultilineTextElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values from
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.text.NumberFormat format, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values fromformat
- the NumberFormat used in this number element
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String nullString, java.text.NumberFormat format, java.lang.String field)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the text color of this text element.alignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this element.nullString
- the text used when the value of this element is null.field
- the field in the datamodel to retrieve values from.format
- the NumberFormat used in this number element.
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the fieldname in the datamodel to retrieve values fromformat
- the DecimalFormatString used in this text field
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String field)
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the text color of this text element.alignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this element.nullString
- t he text used when the value of this element is null.field
- the fieldname in the datamodel to retrieve values from.format
- the DecimalFormatString used in this text field.
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String format, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfunction
- the function to retrieve values fromformat
- the DecimalFormatString used in this text field
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.text.NumberFormat format, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfunction
- the function to retrieve values fromformat
- the NumberFormat used in this text field
Number
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createStringElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values from
String
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createStringElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, int valign, java.awt.Font font, java.lang.String nullString, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values from
String
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createStringFunction(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Paint paint, int alignment, java.awt.Font font, java.lang.String nullString, java.lang.String function)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullfunction
- the name of the function to retrieve values from
String
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static Band createGroupFooter(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this band
public static Band createGroupHeader(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint, boolean pageBreak)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this bandpageBreak
- a flag indicating whether to do a pagebreak before this header is printed
public static Band createPageFooter(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint, boolean onfirstpage, boolean onlastpage)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this bandonfirstpage
- a flag indicating whether to print this footer on the first page of the
reportonlastpage
- a flag indicating whether to print this footer on the last page of the
report
public static Band createPageHeader(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint, boolean onfirstpage, boolean onlastpage)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this bandonfirstpage
- a flag indicating whether to print this footer on the first page of the
reportonlastpage
- a flag indicating whether to print this footer on the last page of the
report
public static Band createReportFooter(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint, boolean isownpage)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this bandisownpage
- a flag indicating whether to issue a pagebreak before the report footer is
printed
public static Band createReportHeader(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint, boolean isownpage)
height
- the height of the band in pointsdefaultFont
- the default font for this banddefaultPaint
- the default paint for this bandisownpage
- a flag indicating whether to issue a pagebreak after the report header is
printed
public static Band createItemBand(float height, java.awt.Font defaultFont, java.awt.Paint defaultPaint)
height
- the height of the band in points.defaultFont
- the default font for this band.defaultPaint
- the default paint for this band.
public static Group createGroup(java.lang.String name, java.util.List fields, GroupFooter footer, GroupHeader header)
name
- the name of the groupfields
- the fields as a list of strings (optional)footer
- the optional groupfooterheader
- the optional groupheader
public static JFreeReport createReport(java.lang.String name, ReportHeader rheader, ReportFooter rfooter, PageHeader pheader, PageFooter pfooter, GroupList groups, ItemBand items, ExpressionCollection functions, ExpressionCollection expressions, java.awt.print.PageFormat pageformat, javax.swing.table.TableModel data)
name
- the name of the report.rheader
- the optional report header.rfooter
- the optional report footer.pheader
- the optional page header.pfooter
- the optional page footer.groups
- the list of groups for this report (optional).items
- the itemband for this report (optional).functions
- the (optional) functions used in this report.expressions
- the (optional) expressions used in this report.pageformat
- the (optional) default pageformat.data
- the data for this report, which is optional at this point.
public static void setElementBounds(Element e, java.awt.geom.Rectangle2D bounds)
e
- the element.bounds
- the bounds.public static TextElement createResourceElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color color, int alignment, int valignment, java.awt.Font font, java.lang.String nullValue, java.lang.String resourceBase, java.lang.String field)
java.util.ResourceBundle
.
name
- the name of the element (null allowed)bounds
- the element's boundscolor
- the text color of the elementalignment
- the element's horizontal text alignmentvalignment
- the element's vertical text alignmentfont
- the elements fontnullValue
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values fromresourceBase
- the classname/basename of the assigned resource bundle
public static TextElement createResourceLabel(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, int alignment, int valign, java.awt.Font font, java.lang.String nullValue, java.lang.String resourceBase, java.lang.String resourceKey)
java.util.ResourceBundle
.
name
- the name of the element (null allowed)bounds
- the element's boundspaint
- the text color of the elementalignment
- the element's horizontal text alignmentvalign
- the element's vertical text alignmentfont
- the elements fontnullValue
- the text used when the value of this element is nullresourceKey
- the key which is used to query the resource bundleresourceBase
- the classname/basename of the assigned resource bundle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |