public class BMPWriter extends JComponentWriter
| Modifier and Type | Field and Description |
|---|---|
protected Color |
m_Background
the background color
|
DEBUG, m_CustomHeight, m_CustomWidth, m_ScalingEnabled, m_UseCustomDimensions, m_xScale, m_yScale| Constructor and Description |
|---|
BMPWriter()
initializes the object
|
BMPWriter(JComponent c)
initializes the object with the given Component
|
BMPWriter(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.
|
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
|
getComponent, getCustomHeight, getCustomWidth, getFile, getScalingEnabled, getUseCustomDimensions, getXScale, getYScale, setComponent, setCustomHeight, setCustomWidth, setFile, setScale, setScalingEnabled, setUseCustomDimensions, toOutput, toOutput, toOutputprotected Color m_Background
public BMPWriter()
public BMPWriter(JComponent c)
c - the component to print in the output formatpublic BMPWriter(JComponent c, File f)
c - the component to print in the output formatf - the file to store the output inpublic void initialize()
initialize in class JComponentWriterpublic 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 void generateOutput()
throws Exception
generateOutput in class JComponentWriterException - if something goes wrongCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.