fr.orsay.lri.varna.models.export
Class SecStrDrawingProducer

java.lang.Object
  extended by fr.orsay.lri.varna.models.export.SecStrDrawingProducer
Direct Known Subclasses:
PSExport, SVGExport, XFIGExport

public abstract class SecStrDrawingProducer
extends Object


Field Summary
protected  Color _backgroundColor
           
private  Vector<GraphicElement> _commands
           
protected  Color _curColor
           
protected  int _font
           
protected  double _fontsize
           
private  double _scale
           
private  double _xmax
           
private  double _xmin
           
private  double _ymax
           
private  double _ymin
           
static int FONT_COURIER
           
static int FONT_COURIER_BOLD
           
static int FONT_COURIER_BOLD_OBLIQUE
           
static int FONT_COURIER_OBLIQUE
           
static int FONT_HELVETICA
           
static int FONT_HELVETICA_BOLD
           
static int FONT_HELVETICA_BOLD_OBLIQUE
           
static int FONT_HELVETICA_OBLIQUE
           
static int FONT_TIMES_BOLD
           
static int FONT_TIMES_BOLD_ITALIC
           
static int FONT_TIMES_ITALIC
           
static int FONT_TIMES_ROMAN
           
 
Constructor Summary
SecStrDrawingProducer()
           
 
Method Summary
 void drawArc(Point2D.Double origine, double width, double height, double startAngle, double endAngle)
           
abstract  String drawArcS(Point2D.Double origine, double width, double height, double startAngle, double endAngle)
           
 void drawCircle(double x, double y, double radius, double thickness)
           
abstract  String drawCircleS(Point2D.Double base, double radius, double thickness)
           
 void drawLine(double x0, double y0, double x1, double y1, double thickness)
           
abstract  String drawLineS(Point2D.Double orig, Point2D.Double dest, double thickness)
           
 void drawPolygon(double[] xtab, double[] ytab, double thickness)
           
 void drawPolygon(GeneralPath p, double thickness)
           
abstract  String drawPolygonS(Point2D.Double[] points, double thickness)
           
 void drawRectangle(double x, double y, double w, double h, double thickness)
           
abstract  String drawRectangleS(Point2D.Double orig, Point2D.Double dims, double thickness)
           
 void drawText(double x, double y, String txt)
           
abstract  String drawTextS(Point2D.Double base, String txt)
           
 String export()
           
 void fillCircle(double x, double y, double radius, double thickness, Color color)
           
abstract  String fillCircleS(Point2D.Double base, double radius, double thickness, Color color)
           
 void fillPolygon(double[] xtab, double[] ytab, Color color)
           
 void fillPolygon(GeneralPath p, Color color)
           
abstract  String fillPolygonS(Point2D.Double[] points, Color color)
           
 void fillRectangle(double x, double y, double w, double h, Color color)
           
abstract  String footerS()
           
 Rectangle2D.Double getBoundingBox()
           
 double getCurFontSize()
           
 Color getCurrentColor()
           
 int getCurrentFont()
           
abstract  String headerS(Rectangle2D.Double bb)
           
 void removeBackgroundColor()
           
 void reset()
           
private  void resetBoundingBox()
           
 void setBackgroundColor(Color col)
           
 void setColor(Color col)
           
 String setColorS(Color col)
           
 void setFont(int font, double size)
           
abstract  String setFontS(int font, double size)
           
 void setScale(double sc)
           
private  Point2D.Double transform(double x, double y, double factor, double dx, double dy)
           
private  Point2D.Double transform(Point2D.Double p, double factor, double dx, double dy)
           
private  void updateBoundingBox(double x, double y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_TIMES_ROMAN

public static final int FONT_TIMES_ROMAN
See Also:
Constant Field Values

FONT_TIMES_BOLD

public static final int FONT_TIMES_BOLD
See Also:
Constant Field Values

FONT_TIMES_ITALIC

public static final int FONT_TIMES_ITALIC
See Also:
Constant Field Values

FONT_TIMES_BOLD_ITALIC

public static final int FONT_TIMES_BOLD_ITALIC
See Also:
Constant Field Values

FONT_HELVETICA

public static final int FONT_HELVETICA
See Also:
Constant Field Values

FONT_HELVETICA_OBLIQUE

public static final int FONT_HELVETICA_OBLIQUE
See Also:
Constant Field Values

FONT_HELVETICA_BOLD

public static final int FONT_HELVETICA_BOLD
See Also:
Constant Field Values

FONT_HELVETICA_BOLD_OBLIQUE

public static final int FONT_HELVETICA_BOLD_OBLIQUE
See Also:
Constant Field Values

FONT_COURIER

public static final int FONT_COURIER
See Also:
Constant Field Values

FONT_COURIER_BOLD

public static final int FONT_COURIER_BOLD
See Also:
Constant Field Values

FONT_COURIER_OBLIQUE

public static final int FONT_COURIER_OBLIQUE
See Also:
Constant Field Values

FONT_COURIER_BOLD_OBLIQUE

public static final int FONT_COURIER_BOLD_OBLIQUE
See Also:
Constant Field Values

_commands

private Vector<GraphicElement> _commands

_scale

private double _scale

_xmin

private double _xmin

_ymin

private double _ymin

_xmax

private double _xmax

_ymax

private double _ymax

_curColor

protected Color _curColor

_backgroundColor

protected Color _backgroundColor

_fontsize

protected double _fontsize

_font

protected int _font
Constructor Detail

SecStrDrawingProducer

public SecStrDrawingProducer()
Method Detail

getCurrentColor

public Color getCurrentColor()

getCurFontSize

public double getCurFontSize()

getCurrentFont

public int getCurrentFont()

drawLineS

public abstract String drawLineS(Point2D.Double orig,
                                 Point2D.Double dest,
                                 double thickness)

drawArcS

public abstract String drawArcS(Point2D.Double origine,
                                double width,
                                double height,
                                double startAngle,
                                double endAngle)

drawTextS

public abstract String drawTextS(Point2D.Double base,
                                 String txt)

drawRectangleS

public abstract String drawRectangleS(Point2D.Double orig,
                                      Point2D.Double dims,
                                      double thickness)

drawCircleS

public abstract String drawCircleS(Point2D.Double base,
                                   double radius,
                                   double thickness)

fillCircleS

public abstract String fillCircleS(Point2D.Double base,
                                   double radius,
                                   double thickness,
                                   Color color)

drawPolygonS

public abstract String drawPolygonS(Point2D.Double[] points,
                                    double thickness)

fillPolygonS

public abstract String fillPolygonS(Point2D.Double[] points,
                                    Color color)

setFontS

public abstract String setFontS(int font,
                                double size)

setColorS

public String setColorS(Color col)

headerS

public abstract String headerS(Rectangle2D.Double bb)

footerS

public abstract String footerS()

resetBoundingBox

private void resetBoundingBox()

updateBoundingBox

private void updateBoundingBox(double x,
                               double y)

drawLine

public void drawLine(double x0,
                     double y0,
                     double x1,
                     double y1,
                     double thickness)

drawArc

public void drawArc(Point2D.Double origine,
                    double width,
                    double height,
                    double startAngle,
                    double endAngle)

drawText

public void drawText(double x,
                     double y,
                     String txt)

drawRectangle

public void drawRectangle(double x,
                          double y,
                          double w,
                          double h,
                          double thickness)

fillRectangle

public void fillRectangle(double x,
                          double y,
                          double w,
                          double h,
                          Color color)

drawCircle

public void drawCircle(double x,
                       double y,
                       double radius,
                       double thickness)

setColor

public void setColor(Color col)

setBackgroundColor

public void setBackgroundColor(Color col)

removeBackgroundColor

public void removeBackgroundColor()

fillCircle

public void fillCircle(double x,
                       double y,
                       double radius,
                       double thickness,
                       Color color)

drawPolygon

public void drawPolygon(double[] xtab,
                        double[] ytab,
                        double thickness)

drawPolygon

public void drawPolygon(GeneralPath p,
                        double thickness)

fillPolygon

public void fillPolygon(GeneralPath p,
                        Color color)

fillPolygon

public void fillPolygon(double[] xtab,
                        double[] ytab,
                        Color color)

setFont

public void setFont(int font,
                    double size)

setScale

public void setScale(double sc)

getBoundingBox

public Rectangle2D.Double getBoundingBox()

transform

private Point2D.Double transform(Point2D.Double p,
                                 double factor,
                                 double dx,
                                 double dy)

transform

private Point2D.Double transform(double x,
                                 double y,
                                 double factor,
                                 double dx,
                                 double dy)

export

public String export()

reset

public void reset()