|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.CodeVisual.CodeExporter
Code Exportation class. This class defines abstract code exporters, intended to be used with code visualisations. All interactions with an exporter object are made in the logical coordinate space, where 1 inch corresponds to 81,92 logical units.
Field Summary | |
protected java.awt.Rectangle |
bounds
|
protected java.awt.Color |
color
|
protected CoopnEnv |
env
|
static int |
EPS
Encaspulated postscript. |
protected java.awt.Insets |
insets
|
static int |
MIF
MIF tag. |
static int |
POSTSCRIPT
Postscript. |
static int |
RTF
RTF. |
protected java.io.PrintWriter |
stream
|
protected java.lang.String |
title
|
protected int |
translationX
|
protected int |
translationY
|
protected float |
zoom
|
Constructor Summary | |
protected |
CodeExporter(java.io.PrintWriter stream,
java.lang.String title,
java.awt.Rectangle bounds,
java.awt.Insets insets,
int zoom,
CoopnEnv env)
|
Method Summary | |
void |
dispose()
Terminates an exportation, and dispose the exporter object. |
abstract void |
drawText(double x,
double y,
java.lang.String text,
java.awt.Font font)
Draw a text. |
void |
drawText(java.awt.geom.Point2D point,
java.lang.String text,
java.awt.Font font)
Draw a text. |
abstract void |
endElement()
End an element. |
static CodeExporter |
getExporter(java.io.PrintWriter stream,
int format,
java.lang.String title,
java.awt.Rectangle bounds,
java.awt.Insets insets,
int zoom,
CoopnEnv env)
Get an exporter for a particular format. |
protected abstract void |
header()
|
void |
setColor(java.awt.Color color)
Set the current color. |
abstract void |
startElement(java.lang.String element)
Start an element. |
static java.lang.String[] |
supportedFormats(CoopnEnv env)
Get the supported formats. |
protected abstract void |
trailer()
|
void |
translate(int x,
int y)
Translate the current user space. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EPS
public static final int MIF
public static final int POSTSCRIPT
public static final int RTF
protected java.io.PrintWriter stream
protected java.lang.String title
protected java.awt.Rectangle bounds
protected java.awt.Insets insets
protected float zoom
protected CoopnEnv env
protected int translationX
protected int translationY
protected java.awt.Color color
Constructor Detail |
protected CodeExporter(java.io.PrintWriter stream, java.lang.String title, java.awt.Rectangle bounds, java.awt.Insets insets, int zoom, CoopnEnv env)
Method Detail |
public void dispose()
protected abstract void header()
protected abstract void trailer()
public abstract void startElement(java.lang.String element)
element
- the element to startpublic abstract void endElement()
public void translate(int x, int y)
x
- x-displacementy
- y-displacementpublic void setColor(java.awt.Color color)
color
- the new colorpublic abstract void drawText(double x, double y, java.lang.String text, java.awt.Font font)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointtext
- textfont
- fontpublic void drawText(java.awt.geom.Point2D point, java.lang.String text, java.awt.Font font)
point
- starting pointtext
- textfont
- fontpublic static java.lang.String[] supportedFormats(CoopnEnv env)
public static CodeExporter getExporter(java.io.PrintWriter stream, int format, java.lang.String title, java.awt.Rectangle bounds, java.awt.Insets insets, int zoom, 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |