Package net.sf.paperclips
Class FactoryPrint
java.lang.Object
net.sf.paperclips.FactoryPrint
- All Implemented Interfaces:
Print
Deprecated.
This class will be removed in a future release.
An ill-conceived class I wish I could take back.
- Author:
- Matthew
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
convertToString
(Object obj) Deprecated.Converts the argument to a String.protected abstract Print
Deprecated.Compose and return a Print appropriate for the concrete class.protected EmptyPrint
empty()
Deprecated.Constructs and returns an EmptyPrint of size (0, 0).protected EmptyPrint
empty
(int width, int height) Deprecated.Constructs and returns an EmptyPrint with the given size.protected int
Deprecated.Returns the default spacing, in points, for GridPrints.protected org.eclipse.swt.graphics.Point
Deprecated.Returns the default image DPI.protected org.eclipse.swt.graphics.FontData
Deprecated.Returns the default label font.protected org.eclipse.swt.graphics.FontData
Deprecated.Returns the default text font.protected org.eclipse.swt.graphics.ImageData
getImageData
(String filename) Deprecated.Creates and returns an ImageData using the given filename.getPrint()
Deprecated.Returns the Print created by this factory.protected GridPrint
Deprecated.Returns a GridPrint with columns using the given argument.protected GridPrint
Deprecated.Returns a GridPrint with the given columns and spacing.protected ImagePrint
image
(InputStream is) Deprecated.Returns an ImagePrint with the given image, and the default DPI.protected ImagePrint
image
(InputStream is, org.eclipse.swt.graphics.Point dpi) Deprecated.Returns an ImagePrint with the given image and DPI.protected ImagePrint
Deprecated.Returns an ImagePrint with the given image, and the default DPI.protected ImagePrint
Deprecated.Returns an ImagePrint with the given image and DPI.protected ImagePrint
image
(org.eclipse.swt.graphics.ImageData imageData) Deprecated.Returns an ImagePrint with the given image data, using the default DPI.protected ImagePrint
image
(org.eclipse.swt.graphics.ImageData imageData, org.eclipse.swt.graphics.Point dpi) Deprecated.Returns an ImagePrint with the given image data and DPI.iterator
(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc) Deprecated.Returns a PrintIterator for the Print returned from a call to createPrint().protected TextPrint
Deprecated.Returns a TextPrint with the given text.protected TextPrint
Deprecated.Returns a TextPrint with the given text and alignment.protected LayerPrint
layer()
Deprecated.Constructs and returns a new LayerPrint.protected TextPrint
Deprecated.Returns a TextPrint whose text represents the given parameter.protected TextPrint
Deprecated.Returns a TextPrint whose text represents the given parameter.protected TextPrint
Deprecated.Returns a TextPrint with the given text.protected TextPrint
Deprecated.Returns a TextPrint with the given text and alignment.
-
Constructor Details
-
FactoryPrint
public FactoryPrint()Deprecated.Default constructor.
-
-
Method Details
-
getPrint
Deprecated.Returns the Print created by this factory.- Returns:
- the Print created by this factory.
-
iterator
public PrintIterator iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc) Deprecated.Returns a PrintIterator for the Print returned from a call to createPrint(). -
createPrint
Deprecated.Compose and return a Print appropriate for the concrete class. Subclasses must override this method to create the Print.- Returns:
- a Print appropriate for the concrete class.
-
convertToString
Deprecated.Converts the argument to a String. This method is used by the TextPrint factory methods which accept an Object.- Parameters:
obj
- the object to convert.- Returns:
- This implementation returns the result of obj.toString(), or an empty string if the argument is null. Override this method to change this behavior.
-
getDefaultTextFont
protected org.eclipse.swt.graphics.FontData getDefaultTextFont()Deprecated.Returns the default text font. All TextPrints returned from the text(...) methods are set to this font. This implementation uses TextPrint.DEFAULT_FONT_DATA as the default text font. Override this method to change the default text font.- Returns:
- the default text font.
-
getDefaultLabelFont
protected org.eclipse.swt.graphics.FontData getDefaultLabelFont()Deprecated.Returns the default label font. All TextPrints returned from the label(...) methods are set to this font. This implementation uses TextPrint.DEFAULT_FONT_DATA as the default label font. Override this method to change the default label font.- Returns:
- the default label font.
-
getDefaultGridSpacing
protected int getDefaultGridSpacing()Deprecated.Returns the default spacing, in points, for GridPrints. All GridPrints returned from the grid(String) method(s) have their vertical and horizontal spacing set to this value. This implementation returns 0 as the default spacing. Override this method to change the default grid spacing.- Returns:
- the default spacing, in points, between GridPrint cells.
-
text
Deprecated.Returns a TextPrint whose text represents the given parameter. The returned object will be set to the default text font.- Parameters:
obj
- the object that the returned TextPrint will represent.- Returns:
- a TextPrint whose text represents the given parameter.
- See Also:
-
text
Deprecated.Returns a TextPrint whose text represents the given parameter. The returned object will be set to the default text font.- Parameters:
obj
- the object that the returned TextPrint will represent.align
- the alignment property for the returned TextPrint.- Returns:
- a TextPrint whose text represents the given parameter.
- See Also:
-
text
Deprecated.Returns a TextPrint with the given text. The returned object will be set to the default text font.- Parameters:
text
- the text property for the returned TextPrint- Returns:
- a TextPrint with the given text.
- See Also:
-
text
Deprecated.Returns a TextPrint with the given text and alignment. The returned object will be set to the default text font.- Parameters:
text
- the text property for the returned TextPrintalign
- the alignment property for the returned TextPrint.- Returns:
- a TextPrint with the given text and alignment.
- See Also:
-
label
Deprecated.Returns a TextPrint with the given text. The returned object will be set to the default label font.- Parameters:
text
- the text property for the returned TextPrint- Returns:
- a TextPrint with the given text.
- See Also:
-
label
Deprecated.Returns a TextPrint with the given text and alignment. The returned object will be set to the default label font.- Parameters:
text
- the text property for the returned TextPrintalign
- the alignment property for the returned TextPrint.- Returns:
- a TextPrint with the given text and alignment.
- See Also:
-
getDefaultImageDPI
protected org.eclipse.swt.graphics.Point getDefaultImageDPI()Deprecated.Returns the default image DPI. All ImagePrints returned from the image(...) methods are set to this DPI. This implementation uses (300, 300) as the default DPI. Override this method to change the default image DPI.- Returns:
- the default image DPI.
-
getImageData
Deprecated.Creates and returns an ImageData using the given filename. All ImagePrints returned from the image(...) methods are set to this DPI. This implementation uses the ImageData(String filename) constructor to generate the ImageData. Override this method to change this behavior.- Parameters:
filename
- the filename of the image to load.- Returns:
- an ImageData containing the image from the given filename.
-
image
Deprecated.Returns an ImagePrint with the given image, and the default DPI.- Parameters:
filename
- the filename of the image to load.- Returns:
- an ImagePrint with the given image.
- See Also:
-
image
Deprecated.Returns an ImagePrint with the given image and DPI.- Parameters:
filename
- the filename of the image to load.dpi
- the DPI at which the image is to be printed.- Returns:
- an ImagePrint with the given image and DPI.
-
image
Deprecated.Returns an ImagePrint with the given image, and the default DPI.- Parameters:
is
- an input stream the image will be loaded from.- Returns:
- an ImagePrint with the given image, and the default DPI.
-
image
Deprecated.Returns an ImagePrint with the given image and DPI.- Parameters:
is
- an InputStream which the image will be loaded from.dpi
- the DPI the image will be printed at.- Returns:
- an ImagePrint with the given image and DPI.
-
image
Deprecated.Returns an ImagePrint with the given image data, using the default DPI.- Parameters:
imageData
- the ImageData of the image to print.- Returns:
- an ImagePrint with the given image data, using the default DPI.
-
image
protected ImagePrint image(org.eclipse.swt.graphics.ImageData imageData, org.eclipse.swt.graphics.Point dpi) Deprecated.Returns an ImagePrint with the given image data and DPI.- Parameters:
imageData
- the ImageData of the image to print.dpi
- the DPI the image will be printed at.- Returns:
- an ImagePrint with the given image data and DPI.
-
grid
Deprecated.Returns a GridPrint with columns using the given argument. The returned object will have the horizontal and vertical cell spacing set to the default spacing.- Parameters:
columns
- comma-separated list of column specs.- Returns:
- a GridPrint with columns using the given argument.
- See Also:
-
grid
Deprecated.Returns a GridPrint with the given columns and spacing. The returned object will have the horizontal and vertical cell spacing set to the default spacing.- Parameters:
columns
- comma-separated list of column specs.spacing
- the spacing, in points, between cells in he GridPrint.- Returns:
- a GridPrint with the specified column configuration and spacing.
- See Also:
-
layer
Deprecated.Constructs and returns a new LayerPrint.- Returns:
- a new LayerPrint.
-
empty
Deprecated.Constructs and returns an EmptyPrint of size (0, 0).- Returns:
- a new EmptyPrint of size (0, 0).
-
empty
Deprecated.Constructs and returns an EmptyPrint with the given size.- Parameters:
width
- the width, in points.height
- the height, in points.- Returns:
- a new EmptyPrint with the given size.
-