Enum Class ViewExportFormat

java.lang.Object
java.lang.Enum<ViewExportFormat>
lu.kbra.modelizer_next.ui.export.ViewExportFormat
All Implemented Interfaces:
Serializable, Comparable<ViewExportFormat>, Constable

public enum ViewExportFormat extends Enum<ViewExportFormat>
Supported file formats for diagram view export.
  • Enum Constant Details

  • Method Details

    • values

      public static ViewExportFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ViewExportFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createDefaultOptions

      public ViewExportOptions createDefaultOptions()
      Creates the default options for this file format.
      Returns:
      the created default options
    • export

      public void export(DiagramCanvas canvas, ViewExportRequest request, ViewExportContext context, File outputFile) throws IOException
      Exports a canvas to a file.
      Parameters:
      canvas - canvas instance to export
      request - request with common and format-specific settings
      context - export context values
      outputFile - target file
      Throws:
      IOException - if the file cannot be written
    • getDisplayName

      public String getDisplayName()
      Returns the display name.
      Returns:
      the display name
    • getExtension

      public String getExtension()
      Returns the extension.
      Returns:
      the extension
    • supportsTransparency

      public boolean supportsTransparency()
      Checks whether this format can store transparent pixels.
      Returns:
      true when alpha can be preserved
    • toString

      public String toString()
      Builds a debug string for this view export format.
      Overrides:
      toString in class Enum<ViewExportFormat>
      Returns:
      a debug string for this object