org.eclipse.graphiti.ui.saveasimage
Interface ISaveAsImageConfiguration


public interface ISaveAsImageConfiguration

This interface defines a save as image configuration container, that is used for saving a diagram as an image. The container itself is also capable of providing an image for the figure to save as an image.

Since:
0.10

Field Summary
static int OK
          The return code for configure() that indicates a successful configuration process.
 
Method Summary
 void addExporters(Map<String,Boolean> diagramExporterTypes)
          Should add the given exporters to an internal list.
 int configure()
          Does the actual configuration.
 IFigure getFigure()
          Returns the figure to be saved as an image.
 String getFileExtension()
          Returns the file extension to use.
 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.
 Image getScaledImage()
          Returns the image in the final scaled version that fits the zooom factor etc.
 

Field Detail

OK

static final int OK
The return code for configure() that indicates a successful configuration process.

Method Detail

addExporters

void addExporters(Map<String,Boolean> diagramExporterTypes)
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.

Parameters:
diagramExporterTypes - A Map holding all exporters.

configure

int configure()
Does the actual configuration. May bring up a UI.

Returns:

getFormattedFileExtension

String getFormattedFileExtension()
Returns the selected file extension formatted in a standard way, e.g. converted to lower case.

Returns:
A string holding the file extension

getScaledImage

Image getScaledImage()
Returns the image in the final scaled version that fits the zooom factor etc. the user (or the configure coding) defined.

Returns:
An Image containing what shall be saved.

getFileExtension

String getFileExtension()
Returns the file extension to use.

Returns:
A string holding the file extension

getImageFormat

int getImageFormat()
Returns the image format as defined by the SWT.IMAGE_* constants like SWT#IMAGE_BMP.

Returns:
An integer defining the format

getFigure

IFigure getFigure()
Returns the figure to be saved as an image.

Returns:
The figure to be saved as an image

getImageScaleFactor

double getImageScaleFactor()
Retunrs the scale factor to be used in the saved image.

Returns:
A double value defining the scale factor.


Copyright (c) SAP AG 2005, 2012.