java.lang.Object
cgsuite.plugin.ImageOutput
- All Implemented Interfaces:
- Output
- public class ImageOutput
- extends java.lang.Object
- implements Output
An image to display as output. This class serves as a wrapper to hold an
explicit Image until it needs to be displayed as output. The
toScreenImage 55 method just returns the image
supplied to the constructor.
An alternate text representation can also be supplied for use in
non-graphical environments.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
image
private java.awt.Image image
alternate
private java.lang.String alternate
ImageOutput
public ImageOutput(java.awt.Image image)
- Constructs a new
ImageOutput with the specified image.
ImageOutput
public ImageOutput(java.awt.Image image,
java.lang.String alternate)
- Constructs a new
ImageOutput with the specified image
and text representation.
toPlainText
public java.lang.String toPlainText()
- Description copied from interface:
Output
- Converts this
Output to a String that is
readable as-is.
- Specified by:
toPlainText in interface Output
toLatexSource
public java.lang.String toLatexSource()
- Description copied from interface:
Output
- Converts this
Output to a LaTeX source fragment. The
resulting String can then be compiled using LaTeX.
- Specified by:
toLatexSource in interface Output
toScreenImage
public java.awt.Image toScreenImage(int pixelWidth)
- Description copied from interface:
Output
- Converts this
Output to an image suitable for screen
display. The Combinatorial Game Suite user interface calls this method
to display worksheet output.
The pixelWidth parameter is the desired width of the
image, in pixels. It is not an absolute requirement. The
Output object will generate an image that fits within
pixelWidth provided that this does not otherwise
compromise the readability of the display.
- Specified by:
toScreenImage in interface Output