cse115.graphics
Class FramedEllipse

java.lang.Object
  extended by cse115.graphics.AbstractGraphic
      extended by cse115.graphics.AbstractColorableGraphic
          extended by cse115.graphics.FramedEllipse
All Implemented Interfaces:
CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable

public class FramedEllipse
extends AbstractColorableGraphic

A Graphic that is in the outline 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
FramedEllipse()
          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 cse115.graphics.AbstractColorableGraphic
getColor, paint, setColor
 
Methods inherited from class cse115.graphics.AbstractGraphic
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setDimension, setLocation, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cse115.graphics.Graphic
addMouseListener, addMouseMotionListener, contains, getBounds, getMouseListeners, getMouseMotionListeners, intersects, setContainer
 
Methods inherited from interface cse115.graphics.Sizeable
getDimension, setDimension
 
Methods inherited from interface cse115.graphics.CenterLocatable
getCenterLocation, setCenterLocation
 
Methods inherited from interface cse115.graphics.Locatable
getLocation, move, setLocation
 
Methods inherited from interface cse115.graphics.Rotatable
getRotation, rotate, setRotation
 

Constructor Detail

FramedEllipse

public FramedEllipse()
Creates a new instance of Ellipse with a Dimension of 0,0 and Location of 0,0

Method Detail

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 painting
location - The point at which to paint the Ellipse
dimension - The dimension of the Ellipse to paint
See Also:
Graphic.actualPaint(java.awt.Graphics2D, java.awt.Point, java.awt.Dimension)

getShape

public Shape getShape()
Description copied from interface: Graphic
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:
Graphic.getShape()