graphics
Class AbstractColorableGraphic

java.lang.Object
  extended by graphics.AbstractGraphic
      extended by 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

Constructor Summary
AbstractColorableGraphic()
          Creates a new instance of AbstractColorableGraphic
 
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 class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface graphics.IGraphic
actualPaint, addMouseListener, addMouseMotionListener, contains, getBounds, getContainer, getMouseListeners, getMouseMotionListeners, getMovement, getShape, intersects, setContainer, setMovement
 
Methods inherited from interface graphics.ISizeable
getDimension, setDimension
 
Methods inherited from interface graphics.CenterLocatable
getCenterLocation, setCenterLocation
 
Methods inherited from interface graphics.ILocatable
getLocation, move, setLocation
 
Methods inherited from interface graphics.IRotatable
getRotation, rotate, setRotation
 

Constructor Detail

AbstractColorableGraphic

public AbstractColorableGraphic()
Creates a new instance of AbstractColorableGraphic

Method Detail

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)