Interface ISaveAsImageConfiguration
- All Known Implementing Classes:
ExportDiagramDialog
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
Modifier and TypeFieldDescriptionstatic final int
The return code forconfigure()
that indicates a successful configuration process. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExporters
(Map<String, Boolean> diagramExporterTypes) Should add the given exporters to an internal list.int
Does the actual configuration.org.eclipse.draw2d.IFigure
Returns the figure to be saved as an image.Returns the file extension to use.Returns the selected file extension formatted in a standard way, e.g.int
Returns the image format as defined by the SWT.IMAGE_* constants likeSWT.IMAGE_BMP
.double
Retunrs the scale factor to be used in the saved image.org.eclipse.swt.graphics.Image
Returns the image in the final scaled version that fits the zooom factor etc.
-
Field Details
-
OK
static final int OKThe return code forconfigure()
that indicates a successful configuration process.- See Also:
-
-
Method Details
-
addExporters
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
- AMap
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
org.eclipse.swt.graphics.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 likeSWT.IMAGE_BMP
.- Returns:
- An integer defining the format
-
getFigure
org.eclipse.draw2d.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.
-