public class SaveGraphicsService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JPEG_EXTENSION |
static int |
PNG |
static String |
PNG_EXTENSION |
static int |
TIFF |
static String |
TIFF_EXTENSION |
Constructor and Description |
---|
SaveGraphicsService() |
Modifier and Type | Method and 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
|
public static final int PNG
public static final int TIFF
public static final String PNG_EXTENSION
public static final String TIFF_EXTENSION
public static final String JPEG_EXTENSION
public void saveJComponent(String filename, int type, JComponent component)
public void savePNGWithBatik(String filename, BufferedImage image)
filename
- name of the file to store the image intoimage
- to be storedpublic void saveTIFFWithBatik(String filename, BufferedImage image)
filename
- name of the file to store the image intoimage
- to be storedCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.