Module omix.api

Interface PaintHandlerInterface


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
  • 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

      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:

      Portable Network Graphics (*.png)

      Parameters:
      suffix -
      Returns:
      description
    • supportsOption

      boolean supportsOption​(String suffix, PaintHandlerInterface.PaintOption option)
      Determines if the give file format supports a paint option.
      Parameters:
      suffix - the format describing filename suffix
      option - paint option
      Returns:
      option supported
      Since:
      Omix 1.3.11
    • getPaintDevice

      PaintDeviceInterface getPaintDevice​(URLConnection connection, QSize size, QColor background) throws IOException, PaintException
      Returns 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 or MoviePaintDeviceInterface
      Throws:
      IOException - for any kind of file write errors.
      PaintException - for any kind of errors during the paint procedure.