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

## Class ExportDiagramDialog

- 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.ExportDiagramDialog

All Implemented Interfaces:
  java.util.EventListener, ISaveAsImageConfiguration, IShellProvider, ModifyListener, SelectionListener, SWTEventListener

    public class ExportDiagramDialog
    extends AbstractFigureSelectionDialog
    implements ModifyListener, ISaveAsImageConfiguration

This is a simple dialog to choose the image-format and the image-scale-factor for a save-as-image operation.

### Nested Class Summary

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

`Window.IExceptionHandler`

### Field Summary

Fields
`static java.lang.String[]` `HEIGHTS`
`static double[]` `SCALE_FACTORS`
`static java.lang.String[]` `WIDTHS`

### 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.saveasimage.ISaveAsImageConfiguration

`OK`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addExporters(java.util.Map<java.lang.String,java.lang.Boolean> diagramExporterTypes)` Should add the given exporters to an internal list.
`int` `configure()` Does the actual configuration.
`java.lang.String` `getFileExtension()` Returns the file extension to use.
`java.lang.String` `getFormattedFileExtension()` Returns the selected file extension formatted in a standard way, e.g.
`int` `getImageFormat()` Returns the image format as defined by the SWT.IMAGE_* constants like `SWT.IMAGE_BMP`.
`double` `getImageScaleFactor()` Retunrs the scale factor to be used in the saved image.
`void` `modifyText(ModifyEvent e)`
`void` `updateControls()`

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

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

### 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.saveasimage.ISaveAsImageConfiguration

`getFigure, getScaledImage`

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

`widgetDefaultSelectedAdapter, widgetSelectedAdapter`

### Field Detail

#### WIDTHS

    public static final java.lang.String[] WIDTHS

#### HEIGHTS

    public static final java.lang.String[] HEIGHTS

#### SCALE_FACTORS

    public static final double[] SCALE_FACTORS

### Constructor Detail

#### ExportDiagramDialog

    public ExportDiagramDialog(Shell shell,
                               org.eclipse.gef.GraphicalViewer graphicalViewer)

Creates a new ExportDiagramDialog.

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

### Method Detail

#### configure

    public int configure()

Description copied from interface: `ISaveAsImageConfiguration`
Does the actual configuration. May bring up a UI.

Specified by:
  `configure` in interface `ISaveAsImageConfiguration`
Returns:

#### addExporters

    public void addExporters(java.util.Map<java.lang.String,java.lang.Boolean> diagramExporterTypes)

Description copied from interface: `ISaveAsImageConfiguration`
Should add the given exporters to an internal list. Clients may use this list to let users select in an UI from the exporters or programmatically decide which one to use.

Specified by:
  `addExporters` in interface `ISaveAsImageConfiguration`
Parameters:
  `diagramExporterTypes` - A `Map` holding all exporters.

#### modifyText

    public void modifyText(ModifyEvent e)

Specified by:
  `modifyText` in interface `ModifyListener`

#### updateControls

    public void updateControls()

Overrides:
  `updateControls` in class `AbstractFigureSelectionDialog`

#### getImageFormat

    public final int getImageFormat()

Description copied from interface: `ISaveAsImageConfiguration`
Returns the image format as defined by the SWT.IMAGE_* constants like `SWT.IMAGE_BMP`.

Specified by:
  `getImageFormat` in interface `ISaveAsImageConfiguration`
Returns:
  An integer defining the format

#### getFormattedFileExtension

    public final java.lang.String getFormattedFileExtension()

Description copied from interface: `ISaveAsImageConfiguration`
Returns the selected file extension formatted in a standard way, e.g. converted to lower case.

Specified by:
  `getFormattedFileExtension` in interface `ISaveAsImageConfiguration`
Returns:
  A string holding the file extension

#### getFileExtension

    public final java.lang.String getFileExtension()

Description copied from interface: `ISaveAsImageConfiguration`
Returns the file extension to use.

Specified by:
  `getFileExtension` in interface `ISaveAsImageConfiguration`
Returns:
  A string holding the file extension

#### getImageScaleFactor

    public double getImageScaleFactor()

Description copied from interface: `ISaveAsImageConfiguration`
Retunrs the scale factor to be used in the saved image.

Specified by:
  `getImageScaleFactor` in interface `ISaveAsImageConfiguration`
Returns:
  A double value defining the scale factor.