|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.Visual.GraphicalExporter
Graphical Exportation class. This class defines abstract graphical exporters, intended to be used with graphical 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 float[] |
dash
|
protected boolean |
dashed
|
protected CoopnEnv |
env
|
static int |
EPS
Encaspulated postscript. |
protected java.awt.Insets |
insets
|
static int |
MIF
MIF tag. |
protected float |
phase
|
static int |
POSTSCRIPT
Postscript. |
static int |
RTF
RTF tag. |
protected java.io.PrintWriter |
stream
|
protected java.lang.String |
title
|
protected int |
translationX
|
protected int |
translationY
|
protected float |
zoom
|
Constructor Summary | |
protected |
GraphicalExporter(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 |
drawArc(double x,
double y,
double width,
double height,
int startAngle,
int arcAngle)
Draw an elliptical arc, given by its bounding rectangle. |
void |
drawArc(java.awt.Point point,
java.awt.Dimension dim,
int startAngle,
int arcAngle)
Draw an elliptical arc, given by its bounding rectangle. |
void |
drawArc(java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Draw an elliptical arc, given by its bounding rectangle. |
abstract void |
drawArrow(java.awt.geom.GeneralPath path,
boolean fill,
int tipAngle,
int baseAngle,
int length,
java.awt.geom.GeneralPath arrowPath)
Draw a path with a plain arrow at its end. |
abstract void |
drawArrow(java.awt.geom.GeneralPath path,
boolean fill,
int tipAngle,
int baseAngle,
int length,
java.awt.geom.GeneralPath sarrowPath,
java.awt.geom.GeneralPath earrowPath)
Draw a path with a plain arrow at both ends. |
abstract void |
drawArrow(java.awt.geom.GeneralPath path,
int tipAngle,
int baseAngle,
int length,
java.awt.geom.GeneralPath arrowPath)
Draw a path with a stick arrow at its end. |
abstract void |
drawArrow(java.awt.geom.GeneralPath path,
int tipAngle,
int baseAngle,
int length,
java.awt.geom.GeneralPath sarrowPath,
java.awt.geom.GeneralPath earrowPath)
Draw a path with a stick arrow at both ends. |
abstract void |
drawLine(double x1,
double y1,
double x2,
double y2)
Draw a line. |
void |
drawLine(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Draw a line. |
abstract void |
drawPath(java.awt.geom.GeneralPath path)
Draw a path. |
abstract void |
drawPolygon(java.awt.geom.Point2D[] points)
Draw a polygon. |
void |
drawPolygon(java.awt.Polygon polygon)
Draw a polygon. |
abstract void |
drawRectangle(double x,
double y,
double width,
double height)
Draw a rectangle. |
abstract void |
drawRectangle(double x,
double y,
double width,
double height,
int angle)
Draw a rotated rectangle. |
void |
drawRectangle(java.awt.Point point,
java.awt.Dimension dim)
Draw a rectangle. |
void |
drawRectangle(java.awt.Point point,
java.awt.Dimension dim,
int angle)
Draw a rotated rectangle. |
void |
drawRectangle(java.awt.Rectangle rectangle)
Draw a rectangle. |
void |
drawRectangle(java.awt.Rectangle rectangle,
int angle)
Draw a rotated rectangle. |
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. |
abstract void |
fillArc(double x,
double y,
double width,
double height,
int startAngle,
int arcAngle)
Fill an elliptical arc, given by its bounding rectangle. |
abstract void |
fillArc(double x,
double y,
double width,
double height,
int startAngle,
int arcAngle,
float grayValue)
Fill an elliptical arc, given by its bounding rectangle. |
void |
fillArc(java.awt.Point point,
java.awt.Dimension dim,
int startAngle,
int arcAngle)
Fill an elliptical arc, given by its bounding rectangle. |
void |
fillArc(java.awt.Point point,
java.awt.Dimension dim,
int startAngle,
int arcAngle,
float grayValue)
Fill an elliptical arc, given by its bounding rectangle. |
void |
fillArc(java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Fill an elliptical arc, given by its bounding rectangle. |
void |
fillArc(java.awt.Rectangle rectangle,
int startAngle,
int arcAngle,
float grayValue)
Fill an elliptical arc, given by its bounding rectangle. |
abstract void |
fillPolygon(java.awt.geom.Point2D[] points)
Fill a polygon. |
abstract void |
fillPolygon(java.awt.geom.Point2D[] points,
float grayValue)
Fill a polygon. |
void |
fillPolygon(java.awt.Polygon polygon)
Fill a polygon. |
void |
fillPolygon(java.awt.Polygon polygon,
float grayValue)
Fill a polygon. |
abstract void |
fillRectangle(double x,
double y,
double width,
double height)
Fill a rectangle. |
abstract void |
fillRectangle(double x,
double y,
double width,
double height,
float grayValue)
Fill a rectangle. |
abstract void |
fillRectangle(double x,
double y,
double width,
double height,
float grayValue,
int angle)
Fill a rotated rectangle. |
abstract void |
fillRectangle(double x,
double y,
double width,
double height,
int angle)
Fill a rotated rectangle. |
void |
fillRectangle(java.awt.Point point,
java.awt.Dimension dim)
Fill a rectangle. |
void |
fillRectangle(java.awt.Point point,
java.awt.Dimension dim,
float grayValue)
Fill a rectangle. |
void |
fillRectangle(java.awt.Point point,
java.awt.Dimension dim,
float grayValue,
int angle)
Fill a rotated rectangle. |
void |
fillRectangle(java.awt.Point point,
java.awt.Dimension dim,
int angle)
Fill a rotated rectangle. |
void |
fillRectangle(java.awt.Rectangle rectangle)
Fill a rectangle. |
void |
fillRectangle(java.awt.Rectangle rectangle,
float grayValue)
Fill a rectangle. |
void |
fillRectangle(java.awt.Rectangle rectangle,
float grayValue,
int angle)
Fill a rotated rectangle. |
void |
fillRectangle(java.awt.Rectangle rectangle,
int angle)
Fill a rotated rectangle. |
static GraphicalExporter |
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. |
void |
setDashed(float[] dash,
float phase)
Set the current dash style. |
void |
setPlain()
Set the current dash style to plain. |
abstract void |
startElement(GraphicalVisualElement 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
protected boolean dashed
protected float[] dash
protected float phase
Constructor Detail |
protected GraphicalExporter(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(GraphicalVisualElement 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 void setPlain()
public void setDashed(float[] dash, float phase)
dash
- The array representing the dash patternphase
- the offset to start the dash patternpublic 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 abstract void drawLine(double x1, double y1, double x2, double y2)
x1
- x-coordinate of starting pointy1
- y-coordinate of starting pointx2
- x-coordinate of ending pointy2
- y-coordinate of ending pointpublic void drawLine(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
p1
- the starting pointp2
- the ending pointpublic abstract void drawRectangle(double x, double y, double width, double height, int angle)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightangle
- the rotation anglepublic abstract void fillRectangle(double x, double y, double width, double height, int angle)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightangle
- the rotation anglepublic abstract void fillRectangle(double x, double y, double width, double height, float grayValue, int angle)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightgrayValue
- the gray value. 0 means black while 1 means whiteangle
- the rotation anglepublic void drawRectangle(java.awt.Point point, java.awt.Dimension dim, int angle)
point
- starting pointdim
- dimensionangle
- the rotation anglepublic void fillRectangle(java.awt.Point point, java.awt.Dimension dim, int angle)
point
- starting pointdim
- dimensionangle
- the rotation anglepublic void fillRectangle(java.awt.Point point, java.awt.Dimension dim, float grayValue, int angle)
point
- starting pointdim
- dimensiongrayValue
- the gray value. 0 means black while 1 means whiteangle
- the rotation anglepublic void drawRectangle(java.awt.Rectangle rectangle, int angle)
rectangle
- the rectangleangle
- the rotation anglepublic void fillRectangle(java.awt.Rectangle rectangle, int angle)
rectangle
- the rectangleangle
- the rotation anglepublic void fillRectangle(java.awt.Rectangle rectangle, float grayValue, int angle)
rectangle
- the rectanglegrayValue
- the gray value. 0 means black while 1 means whiteangle
- the rotation anglepublic abstract void drawRectangle(double x, double y, double width, double height)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightpublic abstract void fillRectangle(double x, double y, double width, double height)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightpublic abstract void fillRectangle(double x, double y, double width, double height, float grayValue)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightgrayValue
- the gray value. 0 means black while 1 means whitepublic void drawRectangle(java.awt.Point point, java.awt.Dimension dim)
point
- starting pointdim
- dimensionpublic void fillRectangle(java.awt.Point point, java.awt.Dimension dim)
point
- starting pointdim
- dimensionpublic void fillRectangle(java.awt.Point point, java.awt.Dimension dim, float grayValue)
point
- starting pointdim
- dimensiongrayValue
- the gray value. 0 means black while 1 means whitepublic void drawRectangle(java.awt.Rectangle rectangle)
rectangle
- the rectanglepublic void fillRectangle(java.awt.Rectangle rectangle)
rectangle
- the rectanglepublic void fillRectangle(java.awt.Rectangle rectangle, float grayValue)
rectangle
- the rectanglegrayValue
- the gray value. 0 means black while 1 means whitepublic abstract void drawArc(double x, double y, double width, double height, int startAngle, int arcAngle)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcpublic abstract void fillArc(double x, double y, double width, double height, int startAngle, int arcAngle)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcpublic abstract void fillArc(double x, double y, double width, double height, int startAngle, int arcAngle, float grayValue)
x
- x-coordinate of starting pointy
- y-coordinate of starting pointwidth
- widthheight
- heightstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcgrayValue
- the gray value. 0 means black while 1 means whitepublic void drawArc(java.awt.Point point, java.awt.Dimension dim, int startAngle, int arcAngle)
point
- starting pointdim
- dimensionstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcpublic void fillArc(java.awt.Point point, java.awt.Dimension dim, int startAngle, int arcAngle)
point
- starting pointdim
- dimensionstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcgrayValue
- the gray value. 0 means black while 1 means whitepublic void fillArc(java.awt.Point point, java.awt.Dimension dim, int startAngle, int arcAngle, float grayValue)
point
- starting pointdim
- dimensionstartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcgrayValue
- the gray value. 0 means black while 1 means whitepublic void drawArc(java.awt.Rectangle rectangle, int startAngle, int arcAngle)
rectangle
- the rectanglestartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcpublic void fillArc(java.awt.Rectangle rectangle, int startAngle, int arcAngle)
rectangle
- the rectanglestartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcpublic void fillArc(java.awt.Rectangle rectangle, int startAngle, int arcAngle, float grayValue)
rectangle
- the rectanglestartAngle
- the starting angle in degree, trigonometrical sensearcAngle
- the angular extend of the arcgrayValue
- the gray value. 0 means black while 1 means whitepublic abstract void drawPolygon(java.awt.geom.Point2D[] points)
points
- the points of the polygonpublic abstract void fillPolygon(java.awt.geom.Point2D[] points)
points
- the points of the polygonpublic abstract void fillPolygon(java.awt.geom.Point2D[] points, float grayValue)
points
- the points of the polygongrayValue
- the gray value. 0 means black while 1 means whitepublic void drawPolygon(java.awt.Polygon polygon)
polygon
- the polygonpublic void fillPolygon(java.awt.Polygon polygon)
polygon
- the polygonpublic void fillPolygon(java.awt.Polygon polygon, float grayValue)
polygon
- the polygongrayValue
- the gray value. 0 means black while 1 means whitepublic abstract void drawPath(java.awt.geom.GeneralPath path)
path
- the path to drawpublic abstract void drawArrow(java.awt.geom.GeneralPath path, boolean fill, int tipAngle, int baseAngle, int length, java.awt.geom.GeneralPath arrowPath)
path
- the path to drawfill
- true iff the arrow is filledtipAngle
- the tip anglebaseAngle
- the base anglelength
- the length of the arrowarrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parameterspublic abstract void drawArrow(java.awt.geom.GeneralPath path, boolean fill, int tipAngle, int baseAngle, int length, java.awt.geom.GeneralPath sarrowPath, java.awt.geom.GeneralPath earrowPath)
path
- the path to drawfill
- true iff the start arrow is filledtipAngle
- the tip angle of start arrowbaseAngle
- the base angle of start arrowlength
- the length of the start arrowsarrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parametersearrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parameterspublic abstract void drawArrow(java.awt.geom.GeneralPath path, int tipAngle, int baseAngle, int length, java.awt.geom.GeneralPath arrowPath)
path
- the path to drawfill
- true iff the arrow is filledtipAngle
- the tip anglebaseAngle
- the base anglelength
- the length of the arrowarrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parameterspublic abstract void drawArrow(java.awt.geom.GeneralPath path, int tipAngle, int baseAngle, int length, java.awt.geom.GeneralPath sarrowPath, java.awt.geom.GeneralPath earrowPath)
path
- the path to drawfill
- true iff the start arrow is filledtipAngle
- the tip angle of start arrowbaseAngle
- the base angle of start arrowlength
- the length of the start arrowsarrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parametersearrowPath
- an already constructed path equivalent to
the parameters tipangle, baseAngle and length;
exporters should use (and draw) this parameter only if
the format does not support structural
structural descriptions of arrows based on
above parameterspublic static java.lang.String[] supportedFormats(CoopnEnv env)
public static GraphicalExporter 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 |