API documentation of the 'jhplot.io.images.ExportVGraphics' Java class
ExportVGraphics
jhplot.io.images

Class ExportVGraphics

ExportVGraphics
jhplot.io.images

Class ExportVGraphics



  • public class ExportVGraphicsextends Object
    Export graphics in different formats.
    • Constructor Detail

      • ExportVGraphics

        public ExportVGraphics()
    • Method Detail

      • export

        public static void export(Component CanvasPanel,                          String rootKey,                          String file)
        Fast export of the canvas to an image file. The correct export is only possible if Graphics2D is extended by VectorGraphics of FreeHep. This depends on the extension:
        SVG - Scalable Vector Graphics (SVG)
        SVGZ - compressed SVG
        JPG
        PNG
        PDF
        EPS
        PS.
        Note: EPS, PDF and PS are derived from SVG. Use SVGZ to have smaller file sizes.

        No questions will be asked and existing file will be rewritten

        Parameters:
        file - Output file with the proper extension (SVG, SVGZ, JPG, PNG, PDF, EPS, PS). If no extension, PNG file is assumed.
        CanvasPane - component to export.
      • exportDialog

        public static void exportDialog(Component component,                                String rootKey,                                JFrame frame)
        Exports the image to some graphic format.
        Parameters:
        component - to export to image
        rootKey - is a key from where export is happeing
        frame - parent fram if any.
      • getSelectedFileWithExtension

        public static File getSelectedFileWithExtension(JFileChooser c)
        Returns the selected file from a JFileChooser, including the extension from the file filter.

DMelt 2.0 © DataMelt by jWork.ORG