fable.framework.imageprint
Class ImagePrintPreviewDialog

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by fable.framework.imageprint.ImagePrintPreviewDialog

public class ImagePrintPreviewDialog
extends org.eclipse.swt.widgets.Dialog

ImagePrintPreviewDialog is a dialog for previewing an image. It works with a copy of the image and disposes the copy when done.

Author:
Kenneth Evans, Jr.

Constructor Summary
ImagePrintPreviewDialog(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.graphics.Image image, PrintSettings settings)
          ImagePrintPreviewDialog constructor with default style.
ImagePrintPreviewDialog(org.eclipse.swt.widgets.Shell parent, int style, org.eclipse.swt.graphics.Image image, PrintSettings settings)
          ImagePrintPreviewDialog constructor
 
Method Summary
 org.eclipse.swt.graphics.Point getCanvasSize()
           
 PrintSettings open()
          Creates and then opens the dialog.
 void setCanvasSize(org.eclipse.swt.graphics.Point canvasSize)
           
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePrintPreviewDialog

public ImagePrintPreviewDialog(org.eclipse.swt.widgets.Shell parent,
                               org.eclipse.swt.graphics.Image image,
                               PrintSettings settings)
ImagePrintPreviewDialog constructor with default style.

Parameters:
parent - The parent of this control
image - The image for the preview. Will not show an image preview if null.
settings - The input PrintSettings. Will construct a default one if null.

ImagePrintPreviewDialog

public ImagePrintPreviewDialog(org.eclipse.swt.widgets.Shell parent,
                               int style,
                               org.eclipse.swt.graphics.Image image,
                               PrintSettings settings)
ImagePrintPreviewDialog constructor

Parameters:
parent - The parent of this control
style - The style settings.
image - The image for the preview. Will not show an image preview if null.
settings - The input PrintSettings. Will construct a default one if null.
Method Detail

open

public PrintSettings open()
Creates and then opens the dialog. Note that setting or getting whether to use portrait or not must be handled separately.

Returns:
The new value of the PrintSettings.

getCanvasSize

public org.eclipse.swt.graphics.Point getCanvasSize()
Returns:
The value of canvasSize.

setCanvasSize

public void setCanvasSize(org.eclipse.swt.graphics.Point canvasSize)
Parameters:
canvasSize - The new value for canvasSize.