java.lang.Object
org.jhotdraw8.draw.io.AbstractExportOutputFormat
- All Implemented Interfaces:
ExportOutputFormat
- Direct Known Subclasses:
BitmapExportOutputFormat,PrinterExportFormat
AbstractExportOutputFormat.
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from interface org.jhotdraw8.draw.io.ExportOutputFormat
EXPORT_DRAWING_DPI_KEY, EXPORT_DRAWING_KEY, EXPORT_PAGES_DPI_KEY, EXPORT_PAGES_KEY, EXPORT_SLICES_DPI_KEY, EXPORT_SLICES_KEY, EXPORT_SLICES_RESOLUTION_2X_KEY, EXPORT_SLICES_RESOLUTION_3X_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringImmutableMap<Key<?>, Object> booleanbooleanbooleanbooleanbooleanprotected abstract booleanvoidsetOptions(ImmutableMap<Key<?>, Object> options) protected abstract voidwritePage(Path file, Page page, javafx.scene.Node node, int pageCount, int pageNumber, int internalPageNumber) Writes a page.protected voidwritePages(@Nullable Path dir, String basename, Drawing drawing) protected voidwritePages(@Nullable Path dir, String basename, Drawing drawing, List<Page> pages, Map<Key<?>, Object> hints) Writes all pages of the drawing.protected abstract booleanwriteSlice(Path file, Slice slice, javafx.scene.Node node, double dpi) Writes the node to the specified file as a Slice.protected voidwriteSlices(@Nullable Path dir, Drawing drawing)
-
Constructor Details
-
AbstractExportOutputFormat
public AbstractExportOutputFormat()
-
-
Method Details
-
getExtension
-
isExportDrawing
public boolean isExportDrawing() -
isExportPages
public boolean isExportPages() -
isExportSlices
public boolean isExportSlices() -
isExportSlices2x
public boolean isExportSlices2x() -
isExportSlices3x
public boolean isExportSlices3x() -
isResolutionIndependent
protected abstract boolean isResolutionIndependent() -
writePage
protected abstract void writePage(Path file, Page page, javafx.scene.Node node, int pageCount, int pageNumber, int internalPageNumber) throws IOException Writes a page.- Parameters:
file- the output file or nullpage- the page figurenode- the node of the drawingpageCount- the page countpageNumber- the page numberinternalPageNumber- the internal page number of the page figure- Throws:
IOException- if writing fails
-
writePages
- Throws:
IOException
-
writePages
protected void writePages(@Nullable Path dir, String basename, Drawing drawing, List<Page> pages, Map<Key<?>, Object> hints) throws IOExceptionWrites all pages of the drawing.- Parameters:
dir- the output directory, null for print outputbasename- the basename of the pages, null for print outputdrawing- the drawingpages- the pageshints- the hints- Throws:
IOException- in case of failure
-
writeSlice
protected abstract boolean writeSlice(Path file, Slice slice, javafx.scene.Node node, double dpi) throws IOException Writes the node to the specified file as a Slice. May destroy the state of the node in the process!- Parameters:
file- a fileslice- the Slicenode- a nodedpi- dots per inch- Returns:
- returns true if the state of the node was destroyed
- Throws:
IOException- in case of failure
-
writeSlices
- Throws:
IOException
-
getOptions
- Specified by:
getOptionsin interfaceExportOutputFormat
-
setOptions
- Specified by:
setOptionsin interfaceExportOutputFormat
-