Package org.apache.jmeter.save
Class SaveGraphicsService
-
- All Implemented Interfaces:
public class SaveGraphicsService
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 public final static int
PNG
public final static int
TIFF
public final static String
PNG_EXTENSION
public final static String
TIFF_EXTENSION
public final static String
JPEG_EXTENSION
-
Constructor Summary
Constructors Constructor Description SaveGraphicsService()
-
Method Summary
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 graph void
saveTIFFWithBatik(String filename, BufferedImage image)
Use Batik to save a TIFF file of the graph -
-
Method Detail
-
saveJComponent
void saveJComponent(String filename, int type, 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 intotype
- of the image to be stored.component
- to draw the image on
-
savePNGWithBatik
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
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
-
-
-
-