Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cgsuite.plugin
Interface Output  view Output download Output.java

All Known Implementing Classes:
ImageOutput, StyledTextOutput, TableOutput

public interface Output

An abstract output scheme that can be converted to any of several forms of output. Combinatorial Game Suite supports numerous object types (various implementations of cgsuite.Game, strings, tables, etc.) and several output methods (plain text, LaTeX, screen images, etc.) Output objects serve as abstract intermediate representations between the internal data structures and the output that users actually see. This avoids excessive code duplication, and simplifies the task of generating output for plug-ins.

It is rarely necessary to implement Output directly. The standard implementations, StyledTextOutput and ImageOutput, should be suitable for most plug-ins.

Version:
0.1.1

Method Summary
 java.lang.String toLatexSource()
          Converts this Output to a LaTeX source fragment.
 java.lang.String toPlainText()
          Converts this Output to a String that is readable as-is.
 java.awt.Image toScreenImage(int pixelWidth)
          Converts this Output to an image suitable for screen display.
 

Method Detail

toPlainText

public java.lang.String toPlainText()
Converts this Output to a String that is readable as-is.


toLatexSource

public java.lang.String toLatexSource()
Converts this Output to a LaTeX source fragment. The resulting String can then be compiled using LaTeX.


toScreenImage

public java.awt.Image toScreenImage(int pixelWidth)
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.