graphics
Class Ellipse
java.lang.Object
graphics.AbstractGraphic
graphics.AbstractColorableGraphic
graphics.Ellipse
- All Implemented Interfaces:
- CenterLocatable, IColorable, IColorableGraphic, IGraphic, ILocatable, IRotatable, ISizeable
- Direct Known Subclasses:
- BouncingBall, BouncingBall
public class Ellipse
- extends AbstractColorableGraphic
A Graphic that is in the shape of an Ellipse. If the height and width are set
to be the same thing, lo and behold, a circle emerges.
- Author:
- Michael Kozelsky
Created on: Jul 28, 2006
Ellipse.java
Constructor Summary |
Ellipse()
Creates a new instance of Ellipse with a Dimension of 0,0 and Location of
0,0 |
Method Summary |
void |
actualPaint(Graphics2D gs,
Point location,
Dimension dimension)
This method uses the Graphics2D object to paint an ellipse onto the
container at a specified point with a specified dimension |
Shape |
getShape()
Should return a java.awt.Shape representation of this graphic. |
Methods inherited from class graphics.AbstractGraphic |
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setDimension, setLocation, setMovement, setRotation |
Ellipse
public Ellipse()
- Creates a new instance of Ellipse with a Dimension of 0,0 and Location of
0,0
actualPaint
public void actualPaint(Graphics2D gs,
Point location,
Dimension dimension)
- This method uses the Graphics2D object to paint an ellipse onto the
container at a specified point with a specified dimension
- Parameters:
gs
- The Graphics2D object to do the paintinglocation
- The point at which to paint the Ellipsedimension
- The dimension of the Ellipse to paint- See Also:
IGraphic.actualPaint(java.awt.Graphics2D,
java.awt.Point, java.awt.Dimension)
getShape
public Shape getShape()
- Description copied from interface:
IGraphic
- Should return a java.awt.Shape representation of this graphic.
The shape is used as a delegate for the methods: contains, intersects, etc.
- Returns:
- a java.awt.geom.Ellipse2D.Double
- See Also:
IGraphic.getShape()