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