fable.framework.imageprint
Class ImagePrintSetupDialog

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

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

ImagePrintSetupDialog is a dialog to set print settings. It works with a copy of the image and disposes the copy when done.

Author:
Kenneth Evans, Jr.

Field Summary
static java.lang.String[][] hAlignNames
           
static java.lang.String[][] vAlignNames
           
 
Constructor Summary
ImagePrintSetupDialog(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.graphics.Image image, PrintSettings settings)
          ImagePrintSetupDialog constructor with default style.
ImagePrintSetupDialog(org.eclipse.swt.widgets.Shell parent, int style, org.eclipse.swt.graphics.Image image, PrintSettings settings)
          ImagePrintSetupDialog 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
 

Field Detail

hAlignNames

public static final java.lang.String[][] hAlignNames

vAlignNames

public static final java.lang.String[][] vAlignNames
Constructor Detail

ImagePrintSetupDialog

public ImagePrintSetupDialog(org.eclipse.swt.widgets.Shell parent,
                             org.eclipse.swt.graphics.Image image,
                             PrintSettings settings)
ImagePrintSetupDialog 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.

ImagePrintSetupDialog

public ImagePrintSetupDialog(org.eclipse.swt.widgets.Shell parent,
                             int style,
                             org.eclipse.swt.graphics.Image image,
                             PrintSettings settings)
ImagePrintSetupDialog 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.