com.jrefinery.report.targets.pageable
Interface LogicalPage

All Known Implementing Classes:
AlignedLogicalPageWrapper, LogicalPageImpl

public interface LogicalPage

An interface that defines a logical page. A logical page is responsible for distributing the received bands so that they can be printed. Don't make any assumptions how the content gets distributed.

Author:
Thomas Morgner.
See Also:
LogicalPageImpl

Method Summary
 void addBand(java.awt.geom.Rectangle2D bounds, Band band)
          Adds a band to the logical page.
 void close()
          Closes the page.
 float getHeight()
          Returns the page height.
 OutputTarget getOutputTarget()
          Gets the output target.
 java.awt.print.PageFormat getPhysicalPageFormat()
          Returns the physical page format.
 float getWidth()
          Returns the page width.
 boolean isEmpty()
          Returns true if the page is empty, and false otherwise.
 boolean isOpen()
          Returns true if the page is open, and false otherwise.
 LogicalPage newInstance()
          Creates a new instance of a logical page.
 void open()
          Opens the page.
 void replaySpool(Spool operations)
          Replays a spool.A spool is a collection of previously prepared content which should be printed later.
 void setOutputTarget(OutputTarget target)
          Sets the output target for the page.
 Spool spoolBand(java.awt.geom.Rectangle2D bounds, Band band)
          Generate a spool.
 

Method Detail

getWidth

public float getWidth()
Returns the page width.

Returns:
the page width.

getHeight

public float getHeight()
Returns the page height.

Returns:
the page height.

isOpen

public boolean isOpen()
Returns true if the page is open, and false otherwise.

Returns:
true or false.

isEmpty

public boolean isEmpty()
Returns true if the page is empty, and false otherwise.

Returns:
true or false.

close

public void close()
Closes the page.


open

public void open()
Opens the page.


replaySpool

public void replaySpool(Spool operations)
Replays a spool.A spool is a collection of previously prepared content which should be printed later.

Parameters:
operations - the spool that should be replayed.

spoolBand

public Spool spoolBand(java.awt.geom.Rectangle2D bounds,
                       Band band)
                throws OutputTargetException
Generate a spool. A spool is a collection (or macro) of lowlevel processing instruction on how to distribute a band and its contents. When a spool is recorded, all operations needed to replay the spool later are created and stored within the spool object.

The spool can be saved, cloned and replayed at a later time.

Parameters:
bounds - the bounds.
band - the band.
Returns:
a spool.
Throws:
OutputTargetException - if there is a problem with the output target.

addBand

public void addBand(java.awt.geom.Rectangle2D bounds,
                    Band band)
             throws OutputTargetException
Adds a band to the logical page.

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

getPhysicalPageFormat

public java.awt.print.PageFormat getPhysicalPageFormat()
Returns the physical page format. todo: Find a better way of handling this. Support different pageformats in one logical Page (BookStyle).

Returns:
the physical page format.

getOutputTarget

public OutputTarget getOutputTarget()
Gets the output target.

Returns:
the output target.

setOutputTarget

public void setOutputTarget(OutputTarget target)
Sets the output target for the page.

Parameters:
target - the output target.

newInstance

public LogicalPage newInstance()
Creates a new instance of a logical page.

Returns:
a logical page.