|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.targets.pageable.physicals.LogicalPageImpl
A simple logical page implementation. Does work with a single physical page and is not yet able to distribute its contents.
Constructor Summary | |
LogicalPageImpl(java.awt.print.PageFormat format)
Creates a new logical page, where the physical page format is equal to the logical page format. |
|
LogicalPageImpl(java.awt.print.PageFormat log,
java.awt.print.PageFormat phys)
Creates a new logical page. |
Method Summary | |
void |
addBand(java.awt.geom.Rectangle2D bounds,
Band band)
Add all elements from the band to this logical page. |
void |
close()
Close this logical page and all physical pages. |
protected OperationFactory |
createOperationFactory()
Initializes the operations factory. |
float |
getHeight()
Get the height of this logical page. |
OperationFactory |
getOperationFactory()
Gets the local instance of the operations factory. |
OutputTarget |
getOutputTarget()
Returns the OutputTarget used to display the contents of this logical page. |
java.awt.print.PageFormat |
getPageFormat()
Returns the logical page format. |
PhysicalPage |
getPhysicalPage(int x,
int y)
Returns the physical page at a particular row and column of the PageGrid. |
java.awt.print.PageFormat |
getPhysicalPageFormat()
Returns the physical page format. |
float |
getWidth()
Get the width of this logical page. |
boolean |
isEmpty()
Test whether this page is empty. |
boolean |
isOpen()
Test whether is logical page is opened and bands can be added to the page. |
LogicalPage |
newInstance()
Returns a new instance of this logical page, fully initialized as this page, but without this pages state cloned. |
void |
open()
Opens the logical page. |
void |
replaySpool(Spool operations)
Replays a previously recorded spool. |
void |
setOutputTarget(OutputTarget ot)
Defines the OutputTarget that is used to finally print the content. |
void |
setPageFormat(java.awt.print.PageFormat format)
Sets the logical page format. |
void |
setPhysicalPageFormat(java.awt.print.PageFormat format)
Sets the physical page format. |
Spool |
spoolBand(java.awt.geom.Rectangle2D bounds,
Band band)
Creates a spool made up of the contents generated from the given Band. |
protected void |
spoolBand(java.awt.geom.Rectangle2D bounds,
Band band,
Spool spool)
Creates a spool made up of the contents generated from the given Band. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogicalPageImpl(java.awt.print.PageFormat format)
format
- the page format.public LogicalPageImpl(java.awt.print.PageFormat log, java.awt.print.PageFormat phys)
log
- the logical page format.phys
- the physical page format.Method Detail |
public OperationFactory getOperationFactory()
protected OperationFactory createOperationFactory()
public PhysicalPage getPhysicalPage(int x, int y)
x
- the X-Coordinate in the page grid.y
- the Y-Coordinate in the page grid.
public void setOutputTarget(OutputTarget ot)
setOutputTarget
in interface LogicalPage
ot
- the outputTarget, must not be null
java.lang.NullPointerException
- if the given OutputTarget is nullpublic OutputTarget getOutputTarget()
getOutputTarget
in interface LogicalPage
public java.awt.print.PageFormat getPageFormat()
public void setPageFormat(java.awt.print.PageFormat format)
format
- the page format (null not permitted).public java.awt.print.PageFormat getPhysicalPageFormat()
getPhysicalPageFormat
in interface LogicalPage
public void setPhysicalPageFormat(java.awt.print.PageFormat format)
format
- the page format.public void addBand(java.awt.geom.Rectangle2D bounds, Band band) throws OutputTargetException
addBand
in interface LogicalPage
bounds
- where to add the band. The bands were calculated by the PageLayouterband
- the band which will be added to the page
OutputTargetException
- if the band addition failedpublic void replaySpool(Spool operations)
replaySpool
in interface LogicalPage
operations
- the operations.public Spool spoolBand(java.awt.geom.Rectangle2D bounds, Band band) throws OutputTargetException
bounds
.
Spooling is the process of creating operations suitable for the physical pages.
ToDo: Support distribution over multiple pages ...
spoolBand
in interface LogicalPage
bounds
- the bounds that define where to print the given band on this logical pageband
- the band that should be spooled/printed
OutputTargetException
- if there is a problem with the output target.protected void spoolBand(java.awt.geom.Rectangle2D bounds, Band band, Spool spool) throws OutputTargetException
bounds
.
Spooling is the process of creating operations suitable for the physical pages. The generated operations are added to the given spool.
ToDo: Support distribution over multiple pages ...
bounds
- the bounds that define where to print the given band on this logical pageband
- the band that should be spooled/printedspool
- the spool which collects the generated operations.
OutputTargetException
- if there is a problem with the output target.public void close()
close
in interface LogicalPage
public boolean isOpen()
isOpen
in interface LogicalPage
public void open()
open
in interface LogicalPage
public boolean isEmpty()
isEmpty
in interface LogicalPage
public float getWidth()
getWidth
in interface LogicalPage
public float getHeight()
getHeight
in interface LogicalPage
public LogicalPage newInstance()
newInstance
in interface LogicalPage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |