Package org.apache.jmeter.save
Class SaveGraphicsService
- java.lang.Object
-
- org.apache.jmeter.save.SaveGraphicsService
-
public class SaveGraphicsService extends 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 Description static String
JPEG_EXTENSION
static int
PNG
static String
PNG_EXTENSION
static int
TIFF
static String
TIFF_EXTENSION
-
Constructor Summary
Constructors Constructor Description SaveGraphicsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
saveJComponent(String filename, int type, JComponent component)
Method will save the JComponent as an image.void
savePNGWithBatik(String filename, BufferedImage image)
Use Batik to save a PNG of the graphvoid
saveTIFFWithBatik(String filename, BufferedImage image)
Use Batik to save a TIFF file of the graph
-
-
-
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 String PNG_EXTENSION
- See Also:
- Constant Field Values
-
TIFF_EXTENSION
public static final String TIFF_EXTENSION
- See Also:
- Constant Field Values
-
JPEG_EXTENSION
public static final String JPEG_EXTENSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
saveJComponent
public void saveJComponent(String filename, int type, JComponent component)
Method will save the JComponent as an image. The formats are PNG, and TIFF.
-
savePNGWithBatik
public void savePNGWithBatik(String filename, BufferedImage image)
Use Batik to save a PNG of the graph- Parameters:
filename
- name of the file to store the image intoimage
- to be stored
-
saveTIFFWithBatik
public void saveTIFFWithBatik(String filename, BufferedImage image)
Use Batik to save a TIFF file of the graph- Parameters:
filename
- name of the file to store the image intoimage
- to be stored
-
-