public interface PaintHandlerInterface
This interface can be derived in order to implement exporting the
network diagram into images and movies.
- Since:
- Omix 1.3
- Author:
- Dr. Peter Droste, Omix Visualization
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PaintHandlerInterface.PaintOption
Options of a PaintDevice -
Method Summary
Modifier and Type Method Description String
getDescription(String suffix)
This method tells the image export procedure the description of the given file name suffix.
Example: "Portable Network Graphics" for suffix "png".
This description is displayed in the file dialog:PaintDeviceInterface
getPaintDevice(URLConnection connection, QSize size, QColor background)
Returns a paint device which is able to generate a specific image or video file format.String[]
getSuffixes()
This method tells the image export procedure the supported file name suffixes.boolean
supportsOption(String suffix, PaintHandlerInterface.PaintOption option)
Determines if the give file format supports a paint option.
-
Method Details
-
getSuffixes
String[] getSuffixes()This method tells the image export procedure the supported file name suffixes.- Returns:
- array of file suffixes.
Example: new String[]{"png", "jpg", "svg"};
-
getDescription
This method tells the image export procedure the description of the given file name suffix.
Example: "Portable Network Graphics" for suffix "png".
This description is displayed in the file dialog:Portable Network Graphics (*.png)
- Parameters:
suffix
-- Returns:
- description
-
supportsOption
Determines if the give file format supports a paint option.- Parameters:
suffix
- the format describing filename suffixoption
- paint option- Returns:
- option supported
- Since:
- Omix 1.3.11
-
getPaintDevice
PaintDeviceInterface getPaintDevice(URLConnection connection, QSize size, QColor background) throws IOException, PaintExceptionReturns a paint device which is able to generate a specific image or video file format.- Parameters:
connection
- to the target file.size
- size of the graphics scene to be exported.background
- background color.- Returns:
- an instance of
PaintDeviceInterface
orMoviePaintDeviceInterface
- Throws:
IOException
- for any kind of file write errors.PaintException
- for any kind of errors during the paint procedure.
-