Documentation of 'jhplot.io.images.ExportVGraphics' Java class.
ExportVGraphics
jhplot.io.images

Class ExportVGraphics



  • public class ExportVGraphics
    extends java.lang.Object
    Export graphics in different formats.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ExportVGraphics() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void export(java.awt.Component CanvasPanel, java.lang.String rootKey, java.lang.String file)
      Fast export of the canvas to an image file.
      static void exportDialog(java.awt.Component component, java.lang.String rootKey, javax.swing.JFrame frame)
      Exports the image to some graphic format.
      static java.io.File getSelectedFileWithExtension(javax.swing.JFileChooser c)
      Returns the selected file from a JFileChooser, including the extension from the file filter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExportVGraphics

        public ExportVGraphics()
    • Method Detail

      • export

        public static void export(java.awt.Component CanvasPanel,
                                  java.lang.String rootKey,
                                  java.lang.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(java.awt.Component component,
                                        java.lang.String rootKey,
                                        javax.swing.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 java.io.File getSelectedFileWithExtension(javax.swing.JFileChooser c)
        Returns the selected file from a JFileChooser, including the extension from the file filter.

DMelt 3.0 © DataMelt by jWork.ORG