public abstract class GraphicsAdaptor extends Object
Constructor and Description |
---|
GraphicsAdaptor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
generateOutput(File file)
Generates the outputs and saves the results to the supplied file.
|
void |
generateOutput(String filename)
Generates the outputs and saves the results to a file with the supplied name.
|
abstract Graphics2D |
getGraphics(int width,
int height)
Returns a
Graphics2D object for this GraphicsAdaptor of the given width and height. |
abstract String |
getGraphicsExtension()
Returns the file extension for the graphics file format of this
GraphicsAdaptor . |
public abstract Graphics2D getGraphics(int width, int height) throws IOException
Graphics2D
object for this GraphicsAdaptor
of the given width and height.
This object may be used for plotting using the standard Graphics2D
methods.width
- the widthheight
- the heightGraphics2D
objectIOException
- if the graphics device could not be created (only applies to some adaptors)public void generateOutput(String filename) throws IOException
filename
- the file nameIOException
- if the output could not be writtenpublic abstract void generateOutput(File file) throws IOException
file
- the fileIOException
- if the output could not be writtenpublic abstract String getGraphicsExtension()
GraphicsAdaptor
.