com.jrefinery.report.targets.pageable.physicals
Class PhysicalPage

java.lang.Object
  |
  +--com.jrefinery.report.targets.pageable.physicals.PhysicalPage

public class PhysicalPage
extends java.lang.Object

Represents a physical page.

Here comes the last step of production, the bands are transfered from the logical page to the physical page. That page does not know anything specific about bandtypes and how to handle them, is just able to print all that is fed into the page and that's it. It will not decide when to make a pagebreak, logical page is responsible for that. It is a simple operation container ...

Author:
Thomas Morgner.

Constructor Summary
PhysicalPage(java.awt.print.PageFormat pf, java.awt.geom.Rectangle2D bounds)
          Creates a new physical page.
 
Method Summary
 void addOperation(PhysicalOperation op)
          Adds an operation to the page.
 void flush()
          Clears the list of operations maintained by the page.
 java.awt.geom.Rectangle2D getBounds()
          Return the bounds of this physical Page.
 java.awt.print.PageFormat getPageFormat()
          Get the page format for this physical page.
 boolean isEmpty()
          Returns true if the page is empty, and false otherwise.
 void write(OutputTarget ot)
          Writes the page to an output target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhysicalPage

public PhysicalPage(java.awt.print.PageFormat pf,
                    java.awt.geom.Rectangle2D bounds)
Creates a new physical page.

PageFormat from OutputTarget, bounds define the position in the global context.

Parameters:
pf - the page format.
bounds - the bounds.
Method Detail

addOperation

public void addOperation(PhysicalOperation op)
Adds an operation to the page.

Parameters:
op - the operation.

write

public void write(OutputTarget ot)
           throws OutputTargetException
Writes the page to an output target.

Parameters:
ot - the output target.
Throws:
OutputTargetException - if there is a problem with the output target.

flush

public void flush()
Clears the list of operations maintained by the page.


getBounds

public java.awt.geom.Rectangle2D getBounds()
Return the bounds of this physical Page. These bounds are defined by the logical page, and the physical page should use these bounds to correct the placement of the given elements.

Returns:
the bounds

getPageFormat

public java.awt.print.PageFormat getPageFormat()
Get the page format for this physical page.

Returns:
a clone of the page format.

isEmpty

public boolean isEmpty()
Returns true if the page is empty, and false otherwise. A page is empty if no operations have been added since the last call to flush().

Returns:
true, if no operations were performed on this page since the last flush, false otherwise.