Class SeriesPrint

java.lang.Object
net.sf.paperclips.SeriesPrint
All Implemented Interfaces:
Print

public class SeriesPrint extends 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
     
  • Method Summary

    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
     
    Returns an array of items in the series.
    int
     
    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
    Returns the number of Prints that have been added to this SeriesPrint.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SeriesPrint

      public SeriesPrint()
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class 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.
      Specified by:
      iterator in interface Print
      Parameters:
      device - the graphics device this Print will be drawn onto.
      gc - the graphics context to be used for calculating layout and drawing the Print's contents.
      Returns:
      a PrintIterator for laying out the contents of this Print.