graphics
Class AbstractColorableGraphic
java.lang.Object
graphics.AbstractGraphic
graphics.AbstractColorableGraphic
- All Implemented Interfaces:
- CenterLocatable, IColorable, IColorableGraphic, IGraphic, ILocatable, IRotatable, ISizeable
- Direct Known Subclasses:
- Ellipse, FramedEllipse, FramedRectangle, Polygon, Rectangle, Rectangle3D
public abstract class AbstractColorableGraphic
- extends AbstractGraphic
- implements IColorableGraphic
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 graphics.AbstractGraphic |
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getMovement, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setDimension, setLocation, setMovement, setRotation |
Methods inherited from interface graphics.IGraphic |
actualPaint, addMouseListener, addMouseMotionListener, contains, getBounds, getContainer, getMouseListeners, getMouseMotionListeners, getMovement, getShape, intersects, setContainer, setMovement |
AbstractColorableGraphic
public AbstractColorableGraphic()
- Creates a new instance of AbstractColorableGraphic
getColor
public Color getColor()
- Gets the Color of this Graphic
- Specified by:
getColor
in interface IColorable
- Returns:
- a java.awt.Color representing the color of this graphic
- See Also:
IColorable.getColor()
setColor
public void setColor(Color c)
- Sets the Color of this Graphic
- Specified by:
setColor
in interface IColorable
- Parameters:
c
- The Color to set the graphic to be- See Also:
IColorable.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 IGraphic
- Overrides:
paint
in class AbstractGraphic
- Parameters:
gs
- The Graphics2D object which will paint this graphic- See Also:
IGraphic.paint(java.awt.Graphics2D)