Package com.actelion.research.gui.swing
Class SwingDrawContext
- java.lang.Object
-
- com.actelion.research.gui.swing.SwingDrawContext
-
- All Implemented Interfaces:
GenericDrawContext
public class SwingDrawContext extends java.lang.Object implements GenericDrawContext
-
-
Constructor Summary
Constructors Constructor Description SwingDrawContext(java.awt.Graphics2D g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawCenteredString(double x, double y, java.lang.String s)
void
drawCircle(double x, double y, double d)
void
drawDottedLine(double x1, double y1, double x2, double y2)
void
drawImage(double x, double y, java.awt.Image image)
void
drawLine(double x1, double y1, double x2, double y2)
void
drawPolygon(GenericPolygon p)
void
drawRectangle(double x, double y, double w, double h)
void
drawString(double x, double y, java.lang.String s)
void
fillCircle(double x, double y, double d)
void
fillPolygon(GenericPolygon p)
void
fillRectangle(double x, double y, double w, double h)
java.awt.geom.Rectangle2D
getBounds(java.lang.String s)
java.awt.Color
getColor()
int
getFontSize()
float
getLineWidth()
void
setClip(double x, double y, double w, double h)
void
setColor(java.awt.Color color)
void
setFont(int size, boolean isBold, boolean isItalic)
void
setLineWidth(float lineWidth)
-
-
-
Method Detail
-
getFontSize
public int getFontSize()
- Specified by:
getFontSize
in interfaceGenericDrawContext
-
setFont
public void setFont(int size, boolean isBold, boolean isItalic)
- Specified by:
setFont
in interfaceGenericDrawContext
-
drawLine
public void drawLine(double x1, double y1, double x2, double y2)
- Specified by:
drawLine
in interfaceGenericDrawContext
-
drawDottedLine
public void drawDottedLine(double x1, double y1, double x2, double y2)
- Specified by:
drawDottedLine
in interfaceGenericDrawContext
-
drawRectangle
public void drawRectangle(double x, double y, double w, double h)
- Specified by:
drawRectangle
in interfaceGenericDrawContext
-
fillRectangle
public void fillRectangle(double x, double y, double w, double h)
- Specified by:
fillRectangle
in interfaceGenericDrawContext
-
drawCircle
public void drawCircle(double x, double y, double d)
- Specified by:
drawCircle
in interfaceGenericDrawContext
-
fillCircle
public void fillCircle(double x, double y, double d)
- Specified by:
fillCircle
in interfaceGenericDrawContext
-
drawPolygon
public void drawPolygon(GenericPolygon p)
- Specified by:
drawPolygon
in interfaceGenericDrawContext
-
fillPolygon
public void fillPolygon(GenericPolygon p)
- Specified by:
fillPolygon
in interfaceGenericDrawContext
-
getLineWidth
public float getLineWidth()
- Specified by:
getLineWidth
in interfaceGenericDrawContext
-
setLineWidth
public void setLineWidth(float lineWidth)
- Specified by:
setLineWidth
in interfaceGenericDrawContext
-
getColor
public java.awt.Color getColor()
- Specified by:
getColor
in interfaceGenericDrawContext
-
setColor
public void setColor(java.awt.Color color)
- Specified by:
setColor
in interfaceGenericDrawContext
-
drawString
public void drawString(double x, double y, java.lang.String s)
- Specified by:
drawString
in interfaceGenericDrawContext
-
drawCenteredString
public void drawCenteredString(double x, double y, java.lang.String s)
- Specified by:
drawCenteredString
in interfaceGenericDrawContext
-
getBounds
public java.awt.geom.Rectangle2D getBounds(java.lang.String s)
- Specified by:
getBounds
in interfaceGenericDrawContext
-
drawImage
public void drawImage(double x, double y, java.awt.Image image)
- Specified by:
drawImage
in interfaceGenericDrawContext
-
setClip
public void setClip(double x, double y, double w, double h)
- Specified by:
setClip
in interfaceGenericDrawContext
-
-