fr.orsay.lri.varna.models.export
Class SwingGraphics
java.lang.Object
fr.orsay.lri.varna.models.export.SwingGraphics
- All Implemented Interfaces:
- VueVARNAGraphics
public class SwingGraphics
- extends Object
- implements VueVARNAGraphics
Method Summary |
private BasicStroke |
deriveStroke(BasicStroke s,
double t)
|
void |
draw(GeneralPath s)
|
void |
drawArc(double x,
double y,
double rx,
double ry,
double angleStart,
double angleEnd)
|
void |
drawCircle(double x,
double y,
double r)
|
void |
drawLine(double x1,
double y1,
double x2,
double y2)
|
void |
drawRect(double x,
double y,
double w,
double h)
|
void |
drawRoundRect(double x,
double y,
double w,
double h,
double rx,
double ry)
|
void |
drawString(String s,
double x,
double y)
|
void |
drawStringCentered(String res,
double x,
double y)
|
void |
fill(GeneralPath s)
|
void |
fillCircle(double x,
double y,
double r)
|
void |
fillRect(double x,
double y,
double w,
double h)
|
void |
fillRoundRect(double x,
double y,
double w,
double h,
double rx,
double ry)
|
Color |
getColor()
|
Dimension |
getStringDimension(String s)
|
void |
setColor(Color c)
|
void |
setDashedStroke()
|
void |
setFont(Font f)
|
void |
setPlainStroke()
|
void |
setStrokeThickness(double t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_dashedStroke
private BasicStroke _dashedStroke
_plainStroke
private BasicStroke _plainStroke
_g2d
Graphics2D _g2d
_debug
private boolean _debug
SwingGraphics
public SwingGraphics(Graphics2D g2d)
getStringDimension
public Dimension getStringDimension(String s)
- Specified by:
getStringDimension
in interface VueVARNAGraphics
drawStringCentered
public void drawStringCentered(String res,
double x,
double y)
- Specified by:
drawStringCentered
in interface VueVARNAGraphics
draw
public void draw(GeneralPath s)
- Specified by:
draw
in interface VueVARNAGraphics
drawArc
public void drawArc(double x,
double y,
double rx,
double ry,
double angleStart,
double angleEnd)
- Specified by:
drawArc
in interface VueVARNAGraphics
drawLine
public void drawLine(double x1,
double y1,
double x2,
double y2)
- Specified by:
drawLine
in interface VueVARNAGraphics
drawCircle
public void drawCircle(double x,
double y,
double r)
- Specified by:
drawCircle
in interface VueVARNAGraphics
drawRect
public void drawRect(double x,
double y,
double w,
double h)
- Specified by:
drawRect
in interface VueVARNAGraphics
drawRoundRect
public void drawRoundRect(double x,
double y,
double w,
double h,
double rx,
double ry)
- Specified by:
drawRoundRect
in interface VueVARNAGraphics
drawString
public void drawString(String s,
double x,
double y)
fill
public void fill(GeneralPath s)
- Specified by:
fill
in interface VueVARNAGraphics
fillCircle
public void fillCircle(double x,
double y,
double r)
- Specified by:
fillCircle
in interface VueVARNAGraphics
fillRect
public void fillRect(double x,
double y,
double w,
double h)
- Specified by:
fillRect
in interface VueVARNAGraphics
fillRoundRect
public void fillRoundRect(double x,
double y,
double w,
double h,
double rx,
double ry)
- Specified by:
fillRoundRect
in interface VueVARNAGraphics
getColor
public Color getColor()
- Specified by:
getColor
in interface VueVARNAGraphics
setColor
public void setColor(Color c)
- Specified by:
setColor
in interface VueVARNAGraphics
setDashedStroke
public void setDashedStroke()
- Specified by:
setDashedStroke
in interface VueVARNAGraphics
setFont
public void setFont(Font f)
- Specified by:
setFont
in interface VueVARNAGraphics
setPlainStroke
public void setPlainStroke()
- Specified by:
setPlainStroke
in interface VueVARNAGraphics
deriveStroke
private BasicStroke deriveStroke(BasicStroke s,
double t)
setStrokeThickness
public void setStrokeThickness(double t)
- Specified by:
setStrokeThickness
in interface VueVARNAGraphics