Package net.sf.paperclips
Class SeriesPrint
java.lang.Object
net.sf.paperclips.SeriesPrint
- All Implemented Interfaces:
Print
A Print which displays its child prints in series. Each element in the series
is displayed one at a time (no more than one child per page, although one
Print may span several pages).
Use this class as the top-level Print when several distinct Prints should be batched into one print job, but printed on separate pages.
- Author:
- Matthew Hall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given print to this SeriesPrint.void
Adds the given prints to this SeriesPrint.boolean
Print[]
getItems()
Returns an array of items in the series.int
hashCode()
iterator
(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc) Returns a PrintIterator for laying out the contents of this Print.int
size()
Returns the number of Prints that have been added to this SeriesPrint.
-
Constructor Details
-
SeriesPrint
public SeriesPrint()
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
add
Adds the given prints to this SeriesPrint.- Parameters:
items
- the Prints to add
-
add
Adds the given print to this SeriesPrint.- Parameters:
item
- the Print to add
-
size
public int size()Returns the number of Prints that have been added to this SeriesPrint.- Returns:
- the number of Prints that have been added to this SeriesPrint.
-
getItems
Returns an array of items in the series.- Returns:
- an array of items in the series.
-
iterator
public PrintIterator iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc) Description copied from interface:Print
Returns a PrintIterator for laying out the contents of this Print. The iterator uses a snapshot of the print at the time this method is invoked, so subsequent changes to the Print will not affect the output of the iterator.
-