Class BigPrint

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

public final class BigPrint extends Object implements Print
A wrapper for prints whose minimum size is too large to fit on one page. The target's content is divided across multiple pages like a spreadsheet. Pages are printed in order left-to-right, then top-to-bottom.

Note that this print lays out content under the assumption that every page will have the same pixel width and height. If a BigPrint is wrapped in a print that violates this expectation, it is likely that the output will skip and/or repeat certain portions of the target's content. Some examples of this behavior:

  • BorderPrint changes the available page height of the target, depending on whether the top and bottom borders are open or closed.
  • ColumnPrint often changes the width from column to column, if the total width is not evenly divisible by the number of columns.
  • Constructor Details

    • BigPrint

      public BigPrint(Print target)
      Constructs a BigPrint.
      Parameters:
      target -
  • Method Details

    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getTarget

      public Print getTarget()
      Returns the wrapped print which is being split across pages.
      Returns:
      the wrapped print which is being split across pages.
    • 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.