ConForM.CoopnTools.CoKer.Visual
Class GraphicalPSExporter

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.Visual.GraphicalExporter
        |
        +--ConForM.CoopnTools.CoKer.Visual.GraphicalPSExporter

public class GraphicalPSExporter
extends GraphicalExporter

Postscript Graphical Exportation class. This class defines postscript graphical exporters, both for standard postscript and for encapsulated postscript. It 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.


Fields inherited from class ConForM.CoopnTools.CoKer.Visual.GraphicalExporter
bounds, color, dash, dashed, env, EPS, insets, MIF, phase, POSTSCRIPT, RTF, stream, title, translationX, translationY, zoom
 
Constructor Summary
GraphicalPSExporter(java.io.PrintWriter stream, java.lang.String title, java.awt.Rectangle bounds, java.awt.Insets insets, int zoom, boolean encapsulated, CoopnEnv env)
           
GraphicalPSExporter(java.io.PrintWriter stream, java.lang.String title, java.awt.Rectangle bounds, java.awt.Insets insets, int zoom, CoopnEnv env)
           
 
Method Summary
 void drawArc(double x, double y, double width, double height, int startAngle, int arcAngle)
          Draw an elliptical arc, given by its bounding rectangle.
 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.
 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.
 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.
 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.
 void drawLine(double x1, double y1, double x2, double y2)
          Draw a line.
 void drawPath(java.awt.geom.GeneralPath path)
          Draw a path.
 void drawPolygon(java.awt.geom.Point2D[] points)
          Draw a polygon.
 void drawRectangle(double x, double y, double width, double height)
          Draw a rectangle.
 void drawRectangle(double x, double y, double width, double height, int angle)
          Draw a rotated rectangle.
 void drawText(double x, double y, java.lang.String text, java.awt.Font font)
          Draw a text.
 void endElement()
          End an element.
 void fillArc(double x, double y, double width, double height, int startAngle, int arcAngle)
          Fill an elliptical arc, given by its bounding rectangle.
 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 fillPolygon(java.awt.geom.Point2D[] points)
          Fill a polygon.
 void fillPolygon(java.awt.geom.Point2D[] points, float grayValue)
          Fill a polygon.
 void fillRectangle(double x, double y, double width, double height)
          Fill a rectangle.
 void fillRectangle(double x, double y, double width, double height, float grayValue)
          Fill a rectangle.
 void fillRectangle(double x, double y, double width, double height, float grayValue, int angle)
          Fill a rotated rectangle.
 void fillRectangle(double x, double y, double width, double height, int angle)
          Fill a rotated rectangle.
protected  void header()
           
 void setColor(java.awt.Color color)
          Set the current color.
 void startElement(GraphicalVisualElement element)
          Start an element.
protected  void trailer()
           
 void translate(int x, int y)
          Translate the current user space.
 
Methods inherited from class ConForM.CoopnTools.CoKer.Visual.GraphicalExporter
dispose, drawArc, drawArc, drawLine, drawPolygon, drawRectangle, drawRectangle, drawRectangle, drawRectangle, drawText, fillArc, fillArc, fillArc, fillArc, fillPolygon, fillPolygon, fillRectangle, fillRectangle, fillRectangle, fillRectangle, fillRectangle, fillRectangle, fillRectangle, fillRectangle, getExporter, setDashed, setPlain, supportedFormats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicalPSExporter

public GraphicalPSExporter(java.io.PrintWriter stream,
                           java.lang.String title,
                           java.awt.Rectangle bounds,
                           java.awt.Insets insets,
                           int zoom,
                           CoopnEnv env)

GraphicalPSExporter

public GraphicalPSExporter(java.io.PrintWriter stream,
                           java.lang.String title,
                           java.awt.Rectangle bounds,
                           java.awt.Insets insets,
                           int zoom,
                           boolean encapsulated,
                           CoopnEnv env)
Method Detail

header

protected void header()
Overrides:
header in class GraphicalExporter

trailer

protected void trailer()
Overrides:
trailer in class GraphicalExporter

translate

public void translate(int x,
                      int y)
Translate the current user space.
Overrides:
translate in class GraphicalExporter
Parameters:
x - x-displacement
y - y-displacement

setColor

public void setColor(java.awt.Color color)
Set the current color.
Overrides:
setColor in class GraphicalExporter
Parameters:
color - the new color

startElement

public void startElement(GraphicalVisualElement element)
Start an element.
Overrides:
startElement in class GraphicalExporter
Parameters:
element - the element to start

endElement

public void endElement()
End an element.
Overrides:
endElement in class GraphicalExporter

drawText

public void drawText(double x,
                     double y,
                     java.lang.String text,
                     java.awt.Font font)
Draw a text.
Overrides:
drawText in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
text - text
font - font

drawLine

public void drawLine(double x1,
                     double y1,
                     double x2,
                     double y2)
Draw a line.
Overrides:
drawLine in class GraphicalExporter
Parameters:
x1 - x-coordinate of starting point
y1 - y-coordinate of starting point
x2 - x-coordinate of ending point
y2 - y-coordinate of ending point

drawRectangle

public void drawRectangle(double x,
                          double y,
                          double width,
                          double height,
                          int angle)
Draw a rotated rectangle.
Overrides:
drawRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
angle - the rotation angle

fillRectangle

public void fillRectangle(double x,
                          double y,
                          double width,
                          double height,
                          int angle)
Fill a rotated rectangle.
Overrides:
fillRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
angle - the rotation angle

fillRectangle

public void fillRectangle(double x,
                          double y,
                          double width,
                          double height,
                          float grayValue,
                          int angle)
Fill a rotated rectangle. The shape is filled with a grey texture, the tint of which is given by a real number.
Overrides:
fillRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
grayValue - the gray value. 0 means black while 1 means white
angle - the rotation angle

drawRectangle

public void drawRectangle(double x,
                          double y,
                          double width,
                          double height)
Draw a rectangle.
Overrides:
drawRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height

fillRectangle

public void fillRectangle(double x,
                          double y,
                          double width,
                          double height)
Fill a rectangle.
Overrides:
fillRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height

fillRectangle

public void fillRectangle(double x,
                          double y,
                          double width,
                          double height,
                          float grayValue)
Fill a rectangle. The shape is filled with a grey texture, the tint of which is given by a real number.
Overrides:
fillRectangle in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
grayValue - the gray value. 0 means black while 1 means white

drawArc

public void drawArc(double x,
                    double y,
                    double width,
                    double height,
                    int startAngle,
                    int arcAngle)
Draw an elliptical arc, given by its bounding rectangle.
Overrides:
drawArc in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
startAngle - the starting angle in degree, trigonometrical sense
arcAngle - the angular extend of the arc

fillArc

public void fillArc(double x,
                    double y,
                    double width,
                    double height,
                    int startAngle,
                    int arcAngle)
Fill an elliptical arc, given by its bounding rectangle.
Overrides:
fillArc in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
startAngle - the starting angle in degree, trigonometrical sense
arcAngle - the angular extend of the arc

fillArc

public 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. The shape is filled with a grey texture, the tint of which is given by a real number.
Overrides:
fillArc in class GraphicalExporter
Parameters:
x - x-coordinate of starting point
y - y-coordinate of starting point
width - width
height - height
startAngle - the starting angle in degree, trigonometrical sense
arcAngle - the angular extend of the arc
grayValue - the gray value. 0 means black while 1 means white

drawPolygon

public void drawPolygon(java.awt.geom.Point2D[] points)
Draw a polygon.
Overrides:
drawPolygon in class GraphicalExporter
Parameters:
points - the points of the polygon

fillPolygon

public void fillPolygon(java.awt.geom.Point2D[] points)
Fill a polygon.
Overrides:
fillPolygon in class GraphicalExporter
Parameters:
points - the points of the polygon

fillPolygon

public void fillPolygon(java.awt.geom.Point2D[] points,
                        float grayValue)
Fill a polygon. The shape is filled with a grey texture, the tint of which is given by a real number.
Overrides:
fillPolygon in class GraphicalExporter
Parameters:
points - the points of the polygon
grayValue - the gray value. 0 means black while 1 means white

drawPath

public void drawPath(java.awt.geom.GeneralPath path)
Draw a path.
Overrides:
drawPath in class GraphicalExporter
Parameters:
path - the path to draw

drawArrow

public 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.
Overrides:
drawArrow in class GraphicalExporter
Parameters:
path - the path to draw
fill - true iff the arrow is filled
tipAngle - the tip angle
baseAngle - the base angle
length - the length of the arrow
arrowPath - 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 parameters

drawArrow

public 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.
Overrides:
drawArrow in class GraphicalExporter
Parameters:
path - the path to draw
fill - true iff the start arrow is filled
tipAngle - the tip angle of start arrow
baseAngle - the base angle of start arrow
length - the length of the start arrow
sarrowPath - 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 parameters
earrowPath - 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 parameters

drawArrow

public 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.
Overrides:
drawArrow in class GraphicalExporter
Parameters:
path - the path to draw
tipAngle - the tip angle
baseAngle - the base angle
length - the length of the arrow
arrowPath - 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 parameters

drawArrow

public 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.
Overrides:
drawArrow in class GraphicalExporter
Parameters:
path - the path to draw
tipAngle - the tip angle of start arrow
baseAngle - the base angle of start arrow
length - the length of the start arrow
sarrowPath - 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 parameters
earrowPath - 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 parameters