类 PNGWriter
java.lang.Object
weka.gui.visualize.JComponentWriter
weka.gui.visualize.PNGWriter
This class takes any JComponent and outputs it to a PNG-file.
Scaling is by default disabled, since we always take a screenshot.
- 版本:
- $Revision: 7059 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
-
构造器概要
构造器构造器说明initializes the objectinitializes the object with the given ComponentPNGWriter
(JComponent c, File f) initializes the object with the given Component and filename -
方法概要
修饰符和类型方法说明void
generates the actual outputreturns the current background colorreturns the name of the writer, to display in the FileChooser.returns the extension (incl.void
further initializationstatic void
for testing onlyvoid
sets the background color to use in creating the JPEG从类继承的方法 weka.gui.visualize.JComponentWriter
getComponent, getCustomHeight, getCustomWidth, getFile, getScalingEnabled, getUseCustomDimensions, getXScale, getYScale, setComponent, setCustomHeight, setCustomWidth, setFile, setScale, setScalingEnabled, setUseCustomDimensions, toOutput, toOutput, toOutput
-
构造器详细资料
-
PNGWriter
public PNGWriter()initializes the object -
PNGWriter
initializes the object with the given Component- 参数:
c
- the component to print in the output format
-
PNGWriter
initializes the object with the given Component and filename- 参数:
c
- the component to print in the output formatf
- the file to store the output in
-
-
方法详细资料
-
initialize
public void initialize()further initialization -
getDescription
returns the name of the writer, to display in the FileChooser. must be overridden in the derived class.- 指定者:
getDescription
在类中JComponentWriter
- 返回:
- the name of the writer
-
getExtension
returns the extension (incl. ".") of the output format, to use in the FileChooser.- 指定者:
getExtension
在类中JComponentWriter
- 返回:
- the file extension
-
getBackground
returns the current background color- 返回:
- the current background color
-
setBackground
sets the background color to use in creating the JPEG- 参数:
c
- the color to use for background
-
generateOutput
generates the actual output- 抛出:
Exception
- if something goes wrong
-
main
for testing only- 参数:
args
- the commandline arguments- 抛出:
Exception
- if something goes wrong
-