Package net.sf.paperclips
Class SeriesPrint
- java.lang.Object
-
- net.sf.paperclips.SeriesPrint
-
- All Implemented Interfaces:
Print
public class SeriesPrint extends java.lang.Object implements 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.
-
-
Constructor Summary
Constructors Constructor Description SeriesPrint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Print item)
Adds the given print to this SeriesPrint.void
add(Print[] items)
Adds the given prints to this SeriesPrint.boolean
equals(java.lang.Object obj)
Print[]
getItems()
Returns an array of items in the series.int
hashCode()
PrintIterator
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.
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
add
public void add(Print[] items)
Adds the given prints to this SeriesPrint.- Parameters:
items
- the Prints to add
-
add
public void add(Print item)
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
public Print[] 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.
-
-