|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrefinery.report.targets.pageable.output.AbstractOutputTarget
com.jrefinery.report.targets.pageable.output.G2OutputTarget
A report output target that uses a Graphics2D object to draw the report. This allows reports to be printed on the screen and on the printer.
| Field Summary |
| Fields inherited from interface com.jrefinery.report.targets.pageable.OutputTarget |
AUTHOR, TITLE |
| Constructor Summary | |
G2OutputTarget(java.awt.Graphics2D g2,
java.awt.print.PageFormat pageFormat)
Constructs an output target for drawing to a Java Graphics2D object. |
|
G2OutputTarget(java.awt.Graphics2D g2,
java.awt.print.PageFormat physPageFormat,
java.awt.print.PageFormat logPageFormat)
Constructs an output target for drawing to a Java Graphics2D object. |
|
G2OutputTarget(LogicalPage page,
java.awt.Graphics2D graphics)
Creates a new output target. |
|
| Method Summary | |
void |
beginPage(PhysicalPage page)
A page is starting. |
void |
close()
Closes the target. |
void |
configure(ReportConfiguration config)
Configures the output target. |
OutputTarget |
createDummyWriter()
Creates an output target that mimics a real output target, but produces no output. |
static java.awt.Graphics2D |
createEmptyGraphics()
Creates an empty graphics by using a 1x1 pixel buffered image. |
SizeCalculator |
createTextSizeCalculator(FontDefinition font)
Creates a size calculator for the current state of the output target. |
void |
drawDrawable(DrawableContainer drawable)
Draws a drawable relative to the current position. |
void |
drawImage(ImageReference image)
Draws the image contained in the given ImageReference. |
void |
drawShape(java.awt.Shape shape)
Draws a shape. |
void |
drawString(java.lang.String text)
Draws a string inside a rectangular area (the lower edge is aligned with the baseline of the text). |
void |
endPage()
A page has ended. |
void |
fillShape(java.awt.Shape shape)
Fills a shape. |
FontDefinition |
getFont()
Returns the current font. |
java.awt.Paint |
getPaint()
Returns the current paint. |
java.awt.Stroke |
getStroke()
Returns the Stroke for the Graphics2D context. |
boolean |
isOpen()
Returns true if the output target is open, and false otherwise. |
void |
open()
Opens the target. |
void |
setFont(FontDefinition font)
Sets the font. |
void |
setOperationBounds(java.awt.geom.Rectangle2D bounds)
Sets the operation bounds. |
void |
setPaint(java.awt.Paint paint)
Sets the paint. |
void |
setStroke(java.awt.Stroke stroke)
Sets the Stroke for the Graphics2D context. |
| Methods inherited from class com.jrefinery.report.targets.pageable.output.AbstractOutputTarget |
createContentFactory, getContentFactory, getHorizontalAlignmentBorder, getLogicalPage, getOperationBounds, getProperty, getProperty, getPropertyNames, getVerticalAlignmentBorder, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public G2OutputTarget(LogicalPage page,
java.awt.Graphics2D graphics)
page - the logical page.graphics - the graphics device.
public G2OutputTarget(java.awt.Graphics2D g2,
java.awt.print.PageFormat physPageFormat,
java.awt.print.PageFormat logPageFormat)
g2 - the graphics device.physPageFormat - the page format for the physical page used to print the report.logPageFormat - the page format for the logical page used to layout the report.
public G2OutputTarget(java.awt.Graphics2D g2,
java.awt.print.PageFormat pageFormat)
g2 - the graphics device.pageFormat - the page format.| Method Detail |
public static java.awt.Graphics2D createEmptyGraphics()
public void open()
throws OutputTargetException
OutputTargetException - if there is a problem with the output target.public void close()
public boolean isOpen()
true if the output target is open, and false otherwise.
public void beginPage(PhysicalPage page)
page - the physical page.
public void endPage()
throws OutputTargetException
OutputTargetException - if there is a problem with the target.public void setFont(FontDefinition font)
font - the font.public FontDefinition getFont()
public void setPaint(java.awt.Paint paint)
paint - The paint.public java.awt.Paint getPaint()
public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
throws OutputTargetException
stroke - the stroke.
OutputTargetException - this exception is not thrown here.public void drawShape(java.awt.Shape shape)
shape - The shape.public void fillShape(java.awt.Shape shape)
shape - The shape.public void drawImage(ImageReference image)
image - the image reference used to contain the image.public void drawString(java.lang.String text)
text - The text.public OutputTarget createDummyWriter()
public void configure(ReportConfiguration config)
There are no configuration parameters that affect this output target, so this method does nothing.
config - the configuration.public SizeCalculator createTextSizeCalculator(FontDefinition font)
font - the font.
public void setOperationBounds(java.awt.geom.Rectangle2D bounds)
setOperationBounds in interface OutputTargetsetOperationBounds in class AbstractOutputTargetbounds - the bounds.public void drawDrawable(DrawableContainer drawable)
drawable - the drawable to draw.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||