org.eclipse.graphiti.ui.internal.util.ui.print

## Class PrintFigureDialog

- java.lang.Object
- - org.eclipse.jface.window.Window
  - - org.eclipse.jface.dialogs.Dialog
    - - org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog
      - - org.eclipse.graphiti.ui.internal.util.ui.print.PrintFigureDialog

All Implemented Interfaces:
  EventListener, IPrintConfiguration, IShellProvider, ModifyListener, PaintListener, SelectionListener, SWTEventListener

    public class PrintFigureDialog
    extends AbstractFigureSelectionDialog
    implements IPrintConfiguration, ModifyListener, PaintListener

This is a dialog to choose positioning and scaling for a print operation.

See Also:
  `PrintFigureScaleableOperation`

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.jface.window.Window

`Window.IExceptionHandler`

### Field Summary

Fields
`static String` `decimalNumberFormat`
`static double[]` `SCALE_FACTORS`

### Fields inherited from class org.eclipse.jface.dialogs.Dialog

`blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS`

### Fields inherited from class org.eclipse.jface.window.Window

`CANCEL, OK`

### Fields inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration

`OK`

### Constructor Summary

Constructors
Constructor and Description
`PrintFigureDialog(Shell shell, org.eclipse.gef.GraphicalViewer graphicalViewer, Printer printer)` Creates a new PrintFigureDialog.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `buttonPressed(int buttonID)` This method is currently not used, since "normal" user would not need it.
`int` `configure()` Configures this container.
`double` `getCurrentScale()`
`double` `getMaximumOfXYImageScaleFactors()`
`IPrintPreferences` `getPreferences()` Returns the printer preferences as given through this dialog.
`Printer` `getPrinter()` Returns the `Printer` to be used.
`double` `getPrinterScaleFactor()`
`void` `modifyText(ModifyEvent e)`
`void` `paintControl(PaintEvent e)`
`void` `updateControls()`
`void` `widgetSelected(SelectionEvent e)`

### Methods inherited from class org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog

`cleanUp, getFigure, getGraphicalViewer, getImage, getScaledImage, setScaledImage, setScaledImage, widgetDefaultSelected`

### Methods inherited from class org.eclipse.jface.dialogs.Dialog

`applyDialogFont, close, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, create, getBlockedHandler, getImage, setBlockedHandler, shortenText`

### Methods inherited from class org.eclipse.jface.window.Window

`getDefaultImage, getDefaultImages, getDefaultOrientation, getReturnCode, getShell, getWindowManager, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setWindowManager`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration

`cleanUp, getFigure, getScaledImage`

### Methods inherited from interface org.eclipse.swt.events.SelectionListener

`widgetDefaultSelectedAdapter, widgetSelectedAdapter`

### Field Detail

#### decimalNumberFormat

    public static final String decimalNumberFormat

See Also:
  Constant Field Values

#### SCALE_FACTORS

    public static final double[] SCALE_FACTORS

### Constructor Detail

#### PrintFigureDialog

    public PrintFigureDialog(Shell shell,
                             org.eclipse.gef.GraphicalViewer graphicalViewer,
                             Printer printer)

Creates a new PrintFigureDialog.

Parameters:
  `shell` - The Shell of this dialog.
  `graphicalViewer` - The GraphicalViewer, which to print.
  `printer` - The printer, to which to print

### Method Detail

#### updateControls

    public void updateControls()

Overrides:
  `updateControls` in class `AbstractFigureSelectionDialog`

#### paintControl

    public void paintControl(PaintEvent e)

Specified by:
  `paintControl` in interface `PaintListener`

#### buttonPressed

    public void buttonPressed(int buttonID)

This method is currently not used, since "normal" user would not need it.

Overrides:
  `buttonPressed` in class `Dialog`

#### modifyText

    public void modifyText(ModifyEvent e)

Specified by:
  `modifyText` in interface `ModifyListener`

#### widgetSelected

    public void widgetSelected(SelectionEvent e)

Specified by:
  `widgetSelected` in interface `SelectionListener`
Overrides:
  `widgetSelected` in class `AbstractFigureSelectionDialog`

#### getPrinterScaleFactor

    public double getPrinterScaleFactor()

#### getPreferences

    public IPrintPreferences getPreferences()

Returns the printer preferences as given through this dialog.

Specified by:
  `getPreferences` in interface `IPrintConfiguration`
Returns:
  The printer preferences as given through this dialog.

#### getCurrentScale

    public double getCurrentScale()

#### getPrinter

    public Printer getPrinter()

Description copied from interface: `IPrintConfiguration`
Returns the `Printer` to be used.

Specified by:
  `getPrinter` in interface `IPrintConfiguration`
Returns:
  The printer.

#### getMaximumOfXYImageScaleFactors

    public double getMaximumOfXYImageScaleFactors()

Returns:
  maximum of scale factor for x- and y-axis as stored in `_preferences`.

#### configure

    public int configure()

Description copied from interface: `IPrintConfiguration`
Configures this container. May e.g. mean that a popup is presented to the user, but also simply some default values are set.

Specified by:
  `configure` in interface `IPrintConfiguration`
Returns:
  The return code of this operation. Anything else than 0 will be interpreted as a cancellation request.