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 voiddrawCenteredString(double x, double y, java.lang.String s)voiddrawCircle(double x, double y, double d)voiddrawDottedLine(double x1, double y1, double x2, double y2)voiddrawImage(double x, double y, java.awt.Image image)voiddrawLine(double x1, double y1, double x2, double y2)voiddrawPolygon(GenericPolygon p)voiddrawRectangle(double x, double y, double w, double h)voiddrawString(double x, double y, java.lang.String s)voidfillCircle(double x, double y, double d)voidfillPolygon(GenericPolygon p)voidfillRectangle(double x, double y, double w, double h)java.awt.geom.Rectangle2DgetBounds(java.lang.String s)java.awt.ColorgetColor()intgetFontSize()floatgetLineWidth()voidsetClip(double x, double y, double w, double h)voidsetColor(java.awt.Color color)voidsetFont(int size, boolean isBold, boolean isItalic)voidsetLineWidth(float lineWidth)
-
-
-
Method Detail
-
getFontSize
public int getFontSize()
- Specified by:
getFontSizein interfaceGenericDrawContext
-
setFont
public void setFont(int size, boolean isBold, boolean isItalic)- Specified by:
setFontin interfaceGenericDrawContext
-
drawLine
public void drawLine(double x1, double y1, double x2, double y2)- Specified by:
drawLinein interfaceGenericDrawContext
-
drawDottedLine
public void drawDottedLine(double x1, double y1, double x2, double y2)- Specified by:
drawDottedLinein interfaceGenericDrawContext
-
drawRectangle
public void drawRectangle(double x, double y, double w, double h)- Specified by:
drawRectanglein interfaceGenericDrawContext
-
fillRectangle
public void fillRectangle(double x, double y, double w, double h)- Specified by:
fillRectanglein interfaceGenericDrawContext
-
drawCircle
public void drawCircle(double x, double y, double d)- Specified by:
drawCirclein interfaceGenericDrawContext
-
fillCircle
public void fillCircle(double x, double y, double d)- Specified by:
fillCirclein interfaceGenericDrawContext
-
drawPolygon
public void drawPolygon(GenericPolygon p)
- Specified by:
drawPolygonin interfaceGenericDrawContext
-
fillPolygon
public void fillPolygon(GenericPolygon p)
- Specified by:
fillPolygonin interfaceGenericDrawContext
-
getLineWidth
public float getLineWidth()
- Specified by:
getLineWidthin interfaceGenericDrawContext
-
setLineWidth
public void setLineWidth(float lineWidth)
- Specified by:
setLineWidthin interfaceGenericDrawContext
-
getColor
public java.awt.Color getColor()
- Specified by:
getColorin interfaceGenericDrawContext
-
setColor
public void setColor(java.awt.Color color)
- Specified by:
setColorin interfaceGenericDrawContext
-
drawString
public void drawString(double x, double y, java.lang.String s)- Specified by:
drawStringin interfaceGenericDrawContext
-
drawCenteredString
public void drawCenteredString(double x, double y, java.lang.String s)- Specified by:
drawCenteredStringin interfaceGenericDrawContext
-
getBounds
public java.awt.geom.Rectangle2D getBounds(java.lang.String s)
- Specified by:
getBoundsin interfaceGenericDrawContext
-
drawImage
public void drawImage(double x, double y, java.awt.Image image)- Specified by:
drawImagein interfaceGenericDrawContext
-
setClip
public void setClip(double x, double y, double w, double h)- Specified by:
setClipin interfaceGenericDrawContext
-
-