Package net.sf.paperclips
Class AbstractPiece
java.lang.Object
net.sf.paperclips.AbstractPiece
- All Implemented Interfaces:
PrintPiece
An abstract PrintPiece class.
- Author:
- Matthew Hall
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPiece
(AbstractIterator iter, org.eclipse.swt.graphics.Point size) Constructos an AbstractPiece.protected
AbstractPiece
(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Point size) Constructs an AbstractPiece. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.eclipse.swt.graphics.Point
getSize()
Returns the dimensions of this PrintPiece, in pixels.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.paperclips.PrintPiece
dispose, paint
-
Field Details
-
device
protected final org.eclipse.swt.graphics.Device deviceThe device being printed to. -
gc
protected final org.eclipse.swt.graphics.GC gcDeprecated.use the local GC in thePrintPiece.paint(GC, int, int)
method instead.A GC for drawing on the print device.
-
-
Constructor Details
-
AbstractPiece
protected AbstractPiece(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Point size) Constructs an AbstractPiece.- Parameters:
device
- the device being printed to.gc
- a GC for drawing on the print device.size
- the value to be returned by getSize().
-
AbstractPiece
Constructos an AbstractPiece.- Parameters:
iter
- an AbstractIterator containing references to a Device and GC which will be used for printing.size
- the value to be returned by getSize().
-
-
Method Details
-
getSize
public final org.eclipse.swt.graphics.Point getSize()Description copied from interface:PrintPiece
Returns the dimensions of this PrintPiece, in pixels.- Specified by:
getSize
in interfacePrintPiece
- Returns:
- the dimensions of this PrintPiece, in pixels.
-
PrintPiece.paint(GC, int, int)
method instead.