|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfable.framework.imageprint.ImagePrintUtils
public class ImagePrintUtils
| Constructor Summary | |
|---|---|
ImagePrintUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
dialogPrintImage(org.eclipse.swt.widgets.Shell shell,
org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
Prints an image, first bringing up a PrintDialog. |
static void |
drawImage(org.eclipse.swt.graphics.Drawable drawable,
org.eclipse.swt.graphics.Point drawableDPI,
org.eclipse.swt.graphics.Rectangle bounds,
org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
A general method for drawing an image on a Drawable using parameters from a PrintSettings. |
static void |
paintPreview(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.widgets.Canvas canvas,
org.eclipse.swt.graphics.Rectangle canvasBounds,
org.eclipse.swt.graphics.Image image,
PrintSettings settings)
A general method for painting a canvas with a print preview in response to a PaintEvent. |
static boolean |
printControl(org.eclipse.swt.widgets.Control control)
Brings up a PrintDialog to print the given Control with the default print settings. |
static boolean |
printControl(org.eclipse.swt.widgets.Control control,
PrintSettings settings)
Brings up a PrintDialog to print the given Control. |
static void |
printImage(org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
Prints an image without bringing up a PrintDialog. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImagePrintUtils()
| Method Detail |
|---|
public static boolean printControl(org.eclipse.swt.widgets.Control control)
control - The control to print.
public static boolean printControl(org.eclipse.swt.widgets.Control control,
PrintSettings settings)
control - The control to print.settings - The desired PrinterSettings or null to use the default.
public static boolean dialogPrintImage(org.eclipse.swt.widgets.Shell shell,
org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
shell - The Shell parent for the dialog.image - The image. Cannot be null.imageDPI - The image DPI, typically the the Display DPI. Use (72, 72) if
you don't know what else to use.settings - The desired PrinterSettings or null to use the default.
public static void printImage(org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
image - The image. Cannot be null.imageDPI - The image DPI, typically the the Display DPI. Use (72, 72) if
you don't know what else to use.settings - The desired PrinterSettings or null to use the default.
public static void drawImage(org.eclipse.swt.graphics.Drawable drawable,
org.eclipse.swt.graphics.Point drawableDPI,
org.eclipse.swt.graphics.Rectangle bounds,
org.eclipse.swt.graphics.Image image,
org.eclipse.swt.graphics.Point imageDPI,
PrintSettings settings)
drawable - Where to draw the image. Cannot be null.drawableDPI - The DPI of the Drawable. If null will use (72,72).bounds - The bounds of the area on the Drawable to use.image - The image. Cannot be null.imageDPI - The image DPI, typically the the Display DPI. If null will use
(72,72).settings - The desired PrinterSettings or null to use the default.
public static void paintPreview(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.widgets.Canvas canvas,
org.eclipse.swt.graphics.Rectangle canvasBounds,
org.eclipse.swt.graphics.Image image,
PrintSettings settings)
ev - The paint event.canvas - The canvas.gc - The GC to use.printer - The desired Printer or null to use the default printer.image - The image. Cannot be null.settings - The desired PrinterSettings or null to use the default.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||