Interface ModelImageExporter
public interface ModelImageExporter
Interface for exporting a model to an image.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a filter with the file types that this exporter can handle.Returns the mime type of the image type.boolean
Returns true if this exporter should be visible to the user.void
write
(MTCompleteModel model, MTLanguage language, OutputStream output, Map<String, Object> properties) Writes the model to the output stream.default void
write
(MTCompleteModel model, MTLanguage language, OutputStream output, Properties properties)
-
Method Details
-
isVisibleInUI
boolean isVisibleInUI()Returns true if this exporter should be visible to the user.- Returns:
- true if this exporter should be visible to the user.
-
getFilter
FileNameExtensionFilter getFilter()Returns a filter with the file types that this exporter can handle. Note that all filters returned from this method must be equal.- Returns:
- a filter with the file types that this exporter can handle.
-
getMimeType
String getMimeType()Returns the mime type of the image type.- Returns:
- the mime type of the image type.
-
write
void write(MTCompleteModel model, MTLanguage language, OutputStream output, Map<String, Object> properties) throws IOExceptionWrites the model to the output stream. Note that this should NOT be called on the EDT. Added this method because we need to pass more complex attributes to the renderer.- Parameters:
model
- the model to write.language
- The language to write.output
- the stream the image is written to.properties
- properties to the exporter for implementation specific functionality, can be null.- Throws:
IOException
- if the writing failed.
-
write
default void write(MTCompleteModel model, MTLanguage language, OutputStream output, Properties properties) throws IOException - Throws:
IOException
-