|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.CodeVisual.Format
This class implements the basic functionality for formatting. Subclasses implement the actual formatting by overriding the formatting methods.
Field Summary | |
static int |
ANSI
ANSI format. |
protected int |
colnum
|
protected boolean |
contextMode
|
protected java.lang.String[] |
conversions
|
protected int[] |
conversionsLength
|
static int |
defaultFontSize
Default font size. |
static int |
defaultTabSize
Default tab size. |
protected CoopnEnv |
env
|
protected int |
fontsize
|
static java.lang.String[] |
formatNames
Format names. |
static int |
FORMATNUMBER
Number of kinds of formats. |
static int |
HTML
HTMLtext format. |
static int |
LATEX
LATEX format. |
static int |
MIF
MIF format. |
protected java.io.PrintWriter |
out
|
static int |
PLAIN
Plain text format. |
protected boolean |
tabMode
|
protected int |
tabsize
|
Method Summary | |
int |
getFontSize()
Get the fontsize used when adding the context. |
static Format |
getFormatter(java.io.PrintWriter stream,
int format,
boolean contextMode,
boolean tabMode,
CoopnEnv env)
Get an exporter for a particular format. |
int |
getTabSize()
Get the tabsize used when expanding tabs. |
protected void |
resetColor()
Reset the current color to normal. |
protected void |
setColor(java.awt.Color color)
Set the current color to the parameter color. |
void |
setFontSize(int size)
Set the fontsize used when adding the context. |
void |
setTabSize(int size)
Set the tabsize used when expanding tabs. |
static java.lang.String[] |
supportedFormats(CoopnEnv env)
Get the supported formats. |
protected java.lang.String |
write(java.lang.String text,
int tabsize)
Write the given string using the supplied tabsize |
protected void |
writeContext(java.lang.String title)
The context, optionnaly present, insure that the produced document is a stand-alone document. |
protected void |
writeDocumentFooter()
|
protected void |
writeDocumentHeader()
Headers and footers are most outer texts, and are allway present |
protected void |
writeEndContext()
|
protected void |
writeEndText()
|
protected void |
writeStartText()
Start and end texts encompass the data of the document |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FORMATNUMBER
public static final int PLAIN
public static final int ANSI
public static final int HTML
public static final int LATEX
public static final int MIF
public static final java.lang.String[] formatNames
FORMATNUMBER
protected java.io.PrintWriter out
protected java.lang.String[] conversions
protected int[] conversionsLength
public static int defaultTabSize
public static int defaultFontSize
protected int colnum
protected int tabsize
protected int fontsize
protected boolean contextMode
protected boolean tabMode
protected CoopnEnv env
Method Detail |
public int getTabSize()
public int getFontSize()
public void setTabSize(int size)
public void setFontSize(int size)
public static java.lang.String[] supportedFormats(CoopnEnv env)
public static Format getFormatter(java.io.PrintWriter stream, int format, boolean contextMode, boolean tabMode, CoopnEnv env)
stream
- the stream used to write the external formatting
instructionsformat
- the format to use, one of the valid indexes
of the array returned bytitle
- the titlebounds
- the logical bounds of the pictureinsets
- the logical inset of the picturezoom
- the zoom factor to use, in percentenv
- the environmentjava.lang.IllegalArgumentException
- an argument is erroneous.protected void writeDocumentHeader()
protected void writeDocumentFooter()
protected void writeContext(java.lang.String title)
protected void writeEndContext()
protected void writeStartText()
protected void writeEndText()
protected void setColor(java.awt.Color color)
protected void resetColor()
protected java.lang.String write(java.lang.String text, int tabsize)
text
- The string to writetabsize
- The tabsize to use
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |