|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.Plotter
public class Plotter
Plot a Plottable object to file. This is roughly analoguous to java printing which provides a Graphics2D to a Printable object, which the Printable can then render itself to, before being printed
| Nested Class Summary | |
|---|---|
static interface |
Plotter.Plottable
Interface for classes which create charts capable of being plotted via a third party rendering library to a vector based graphics format |
| Field Summary | |
|---|---|
static int |
DIFAX
Specifies a format of DIFAX |
static String[] |
FORMATS
The different file formats supported |
static int |
JPG
Specifies a format of JPG |
static int |
PDF
Specifies a format of PDF |
static int |
PNG
Specifies a format of PNG |
static int |
PS
Specifies a format of Postscript |
static int |
SVG
Specifies a format of SVG |
static int |
TIFF
Specifies a format of PS2 |
| Constructor Summary | |
|---|---|
Plotter(int format,
String filename)
Create a plotter |
|
Plotter(int format,
String filename,
boolean monochrome)
Create a plotter |
|
Plotter(String filename)
ctor |
|
| Method Summary | |
|---|---|
int |
getFormat()
Find out which format the plotter is plotting to |
JComponent |
getPreview(Plotter.Plottable plottable)
Get the preview of the given plot |
void |
handleError(Exception exc)
handle the error. |
void |
plot(Plotter.Plottable plottable)
Plot a plottable object to the file specified in the constructor |
void |
setColourDepth(int colourDepth)
Set color depth |
void |
setFilename(String filename)
Set the filename |
void |
setMonochrome(boolean monochrome)
set monochrome |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SVG
public static final int PNG
public static final int JPG
public static final int PS
public static final int PDF
public static final int TIFF
public static final int DIFAX
public static final String[] FORMATS
| Constructor Detail |
|---|
public Plotter(int format,
String filename)
format - The format of the distination file SVG, PNG or PSfilename - The filename to plot topublic Plotter(String filename)
filename - file to write to
public Plotter(int format,
String filename,
boolean monochrome)
format - The format of the distination file SVG, PNG or PSfilename - The filename to plot tomonochrome - Set to true if all colours are to be plotted as
either pure black or pure white| Method Detail |
|---|
public void handleError(Exception exc)
throws Exception
exc - The error.
Exception - On badnesspublic void setFilename(String filename)
filename - the filenamepublic void setMonochrome(boolean monochrome)
monochrome - is monochromepublic void setColourDepth(int colourDepth)
colourDepth - the depthpublic int getFormat()
public void plot(Plotter.Plottable plottable)
throws FileNotFoundException,
IOException,
Exception
plottable - The object to be plotted
Exception - On badness
FileNotFoundException - On badness
IOException - On badness
public JComponent getPreview(Plotter.Plottable plottable)
throws FileNotFoundException,
IOException
plottable - plot to preview
FileNotFoundException - On badness
IOException - On badness
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||