net.moioli.chart.swing
Class SwingGraphicsWrapper
java.lang.Object
net.moioli.chart.swing.SwingGraphicsWrapper
- All Implemented Interfaces:
- net.moioli.chart.GraphicsI
public class SwingGraphicsWrapper
- extends java.lang.Object
- implements net.moioli.chart.GraphicsI
This class wraps some Swing basic methods to the GraphicsI interface used in
MoioChart for drawing, enabling MoioChart to use Swing.
- Version:
- 2005/10/5
- Author:
- Silvio Moioli
Constructor Summary |
SwingGraphicsWrapper(swingwt.awt.Graphics g)
Default constructor, wraps a Swing Graphics object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingGraphicsWrapper
public SwingGraphicsWrapper(swingwt.awt.Graphics g)
- Default constructor, wraps a Swing Graphics object.
- Parameters:
g
- the object to be wrapped.
setColor
public void setColor(java.lang.Object c)
- Specified by:
setColor
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.setColor(Object)
drawLine
public void drawLine(int x1,
int y1,
int x2,
int y2)
- Specified by:
drawLine
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.drawLine(int, int, int, int)
drawString
public void drawString(java.lang.String s,
int x,
int y)
- Specified by:
drawString
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.drawString(String, int, int)
fillPolygon
public void fillPolygon(int[] xPoints,
int[] yPoints,
int n)
- Specified by:
fillPolygon
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.fillPolygon(int[], int[], int)
drawCircle
public void drawCircle(int x,
int y,
int radius)
- Specified by:
drawCircle
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.drawCircle(int, int, int)
getStringWidth
public int getStringWidth(java.lang.String s)
- Specified by:
getStringWidth
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.getStringWidth(String)
getStringHeight
public int getStringHeight()
- Specified by:
getStringHeight
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.getStringHeight()
getBlackColor
public java.lang.Object getBlackColor()
- Specified by:
getBlackColor
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.getBlackColor()
getRandomColor
public java.lang.Object getRandomColor()
- Specified by:
getRandomColor
in interface net.moioli.chart.GraphicsI
- See Also:
GraphicsI.getRandomColor()