cse115.graphics
Class AbstractColorableGraphic
java.lang.Object
cse115.graphics.AbstractGraphic
cse115.graphics.AbstractColorableGraphic
- All Implemented Interfaces:
- CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable
- Direct Known Subclasses:
- Ellipse, FramedEllipse, FramedRectangle, Polygon, Rectangle, Rectangle3D
public abstract class AbstractColorableGraphic
- extends AbstractGraphic
- implements ColorableGraphic
Extends AbstractGraphic to add methods that are relevant to Color
- Author:
- Michael Kozelsky
Created on: Jul 28, 2006
AbstractColorableGraphic.java
Method Summary |
Color |
getColor()
Gets the Color of this Graphic |
void |
paint(Graphics2D gs)
The Paint method partially overrides the superclass method to set the
color of the Graphics2D object |
void |
setColor(Color c)
Sets the Color of this Graphic |
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 |
AbstractColorableGraphic
public AbstractColorableGraphic()
- Creates a new instance of AbstractColorableGraphic
getColor
public Color getColor()
- Gets the Color of this Graphic
- Specified by:
getColor
in interface Colorable
- Returns:
- a java.awt.Color representing the color of this graphic
- See Also:
Colorable.getColor()
setColor
public void setColor(Color c)
- Sets the Color of this Graphic
- Specified by:
setColor
in interface Colorable
- Parameters:
c
- The Color to set the graphic to be- See Also:
Colorable.setColor(java.awt.Color)
paint
public void paint(Graphics2D gs)
- The Paint method partially overrides the superclass method to set the
color of the Graphics2D object
- Specified by:
paint
in interface Graphic
- Overrides:
paint
in class AbstractGraphic
- Parameters:
gs
- The Graphics2D object which will paint this graphic- See Also:
Graphic.paint(java.awt.Graphics2D)