org.apache.jmeter.save

## Class SaveGraphicsService

- java.lang.Object
- - org.apache.jmeter.save.SaveGraphicsService

-     public class SaveGraphicsService
      extends java.lang.Object

  Class is responsible for taking a component and saving it as a JPEG, PNG or TIFF. The class is very simple. Thanks to Batik and the developers who worked so hard on it.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `JPEG_EXTENSION`
    `static int` | `PNG`
    `static java.lang.String` | `PNG_EXTENSION`
    `static int` | `TIFF`
    `static java.lang.String` | `TIFF_EXTENSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SaveGraphicsService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `saveJComponent(java.lang.String filename, int type, javax.swing.JComponent component)` Method will save the JComponent as an image.
    `void` | `savePNGWithBatik(java.lang.String filename, java.awt.image.BufferedImage image)` Use Batik to save a PNG of the graph
    `void` | `saveTIFFWithBatik(java.lang.String filename, java.awt.image.BufferedImage image)` Use Batik to save a TIFF file of the graph

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PNG

          public static final int PNG

      See Also:
        Constant Field Values

    - #### TIFF

          public static final int TIFF

      See Also:
        Constant Field Values

    - #### PNG_EXTENSION

          public static final java.lang.String PNG_EXTENSION

      See Also:
        Constant Field Values

    - #### TIFF_EXTENSION

          public static final java.lang.String TIFF_EXTENSION

      See Also:
        Constant Field Values

    - #### JPEG_EXTENSION

          public static final java.lang.String JPEG_EXTENSION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SaveGraphicsService

          public SaveGraphicsService()

  - ### Method Detail

    - #### saveJComponent

          public void saveJComponent(java.lang.String filename,
                                     int type,
                                     javax.swing.JComponent component)

      Method will save the JComponent as an image. The formats are PNG, and TIFF.
      Parameters:
        `filename` - name of the file to store the image into
        `type` - of the image to be stored. Can be one of 0 for PNG or 1 for TIFF
        `component` - to draw the image on

    - #### savePNGWithBatik

          public void savePNGWithBatik(java.lang.String filename,
                                       java.awt.image.BufferedImage image)

      Use Batik to save a PNG of the graph
      Parameters:
        `filename` - name of the file to store the image into
        `image` - to be stored

    - #### saveTIFFWithBatik

          public void saveTIFFWithBatik(java.lang.String filename,
                                        java.awt.image.BufferedImage image)

      Use Batik to save a TIFF file of the graph
      Parameters:
        `filename` - name of the file to store the image into
        `image` - to be stored

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.