public class JPEGWriter extends JComponentWriter
| Constructor and Description |
|---|
JPEGWriter()
initializes the object.
|
JPEGWriter(JComponent c)
initializes the object with the given Component.
|
JPEGWriter(JComponent c,
File f)
initializes the object with the given Component and filename.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateOutput()
generates the actual output.
|
Color |
getBackground()
returns the current background color.
|
String |
getDescription()
returns the name of the writer, to display in the FileChooser.
|
String |
getExtension()
returns the extension (incl.
|
float |
getQuality()
returns the quality the JPEG will be stored in.
|
void |
initialize()
further initialization.
|
static void |
main(String[] args)
for testing only.
|
void |
setBackground(Color c)
sets the background color to use in creating the JPEG.
|
void |
setQuality(float q)
sets the quality the JPEG is saved in.
|
getComponent, getCustomHeight, getCustomWidth, getFile, getScalingEnabled, getUseCustomDimensions, getXScale, getYScale, setComponent, setCustomHeight, setCustomWidth, setFile, setScale, setScalingEnabled, setUseCustomDimensions, toOutput, toOutput, toOutputpublic JPEGWriter()
public JPEGWriter(JComponent c)
c - the component to print in the output formatpublic JPEGWriter(JComponent c, File f)
c - the component to print in the output formatf - the file to store the output inpublic void initialize()
public String getDescription()
getDescription in class JComponentWriterpublic String getExtension()
getExtension in class JComponentWriterpublic Color getBackground()
public void setBackground(Color c)
c - the color to use for backgroundpublic float getQuality()
public void setQuality(float q)
q - the quality to usepublic void generateOutput()
throws Exception
Exception - if something goes wrongCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.