Package lu.kbra.modelizer_next.ui.export
Enum Class ViewExportFormat
- All Implemented Interfaces:
Serializable,Comparable<ViewExportFormat>,Constable
Supported file formats for diagram view export.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionCreates the default options for this file format.voidexport(DiagramCanvas canvas, ViewExportRequest request, ViewExportContext context, File outputFile) Exports a canvas to a file.Returns the display name.Returns the extension.booleanChecks whether this format can store transparent pixels.toString()Builds a debug string for this view export format.static ViewExportFormatReturns the enum constant of this class with the specified name.static ViewExportFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SVG
-
PNG
-
JPEG
-
BMP
-
TIFF
-
TIF
-
WEBP
-
PDF
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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 exportrequest- request with common and format-specific settingscontext- export context valuesoutputFile- target file- Throws:
IOException- if the file cannot be written
-
getDisplayName
Returns the display name.- Returns:
- the display name
-
getExtension
Returns the extension.- Returns:
- the extension
-
supportsTransparency
public boolean supportsTransparency()Checks whether this format can store transparent pixels.- Returns:
truewhen alpha can be preserved
-
toString
Builds a debug string for this view export format.- Overrides:
toStringin classEnum<ViewExportFormat>- Returns:
- a debug string for this object
-