Package net.sf.paperclips
Class NoBreakPrint
- java.lang.Object
-
- net.sf.paperclips.NoBreakPrint
-
- All Implemented Interfaces:
Print
public class NoBreakPrint extends java.lang.Object implements Print
A print wrapper which prevents its target from being broken into multiple pieces when printed. If there isn't enough room to print the target in one piece on the current page (or column, if it's inside a ColumnPrint), it will be printed on the next page (or column).Care must be taken when using this class to avoid unprintable documents. If the target of a NoBreakPrint does not fit in the available space on the print device, the entire document will fail to print.
-
-
Constructor Summary
Constructors Constructor Description NoBreakPrint(Print target)
Constructs a NoBreakPrint with the given target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Print
getTarget()
Returns the print which will not be broken across pages.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.
-
-
-
Constructor Detail
-
NoBreakPrint
public NoBreakPrint(Print target)
Constructs a NoBreakPrint with the given target.- Parameters:
target
- the print to
-
-
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
-
getTarget
public Print getTarget()
Returns the print which will not be broken across pages.- Returns:
- the print which will not be broken 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.
-
-