becker.robots.icons
Class BrokenIcon

java.lang.Object
  extended by becker.robots.icons.Icon
      extended by becker.robots.icons.BrokenIcon

public class BrokenIcon
extends Icon

An icon that breaks or fragments another icon. Primarily used to display a broken robot.

Author:
Byron Weber Becker

Field Summary
 
Fields inherited from class becker.robots.icons.Icon
transparent
 
Constructor Summary
BrokenIcon(Icon brokenIcon)
          Construct a broken icon.
 
Method Summary
 Color getColor()
          Get this icon's current color.
protected  void renderImage(Graphics2D g2, int width, int height)
          Override either this method or Icon.paintIcon(java.awt.Graphics) to specify how the icon looks.
 void setColor(Color c)
          Change the color of this icon.
 
Methods inherited from class becker.robots.icons.Icon
applyTransforms, getImage, getLabel, getRotation, getSize, getTransparency, hasChanged, markChanged, paintIcon, setLabel, setSize, setTransparency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokenIcon

public BrokenIcon(Icon brokenIcon)
Construct a broken icon.

Parameters:
brokenIcon - the icon to break into fragments.
Method Detail

getColor

public Color getColor()
Description copied from class: Icon
Get this icon's current color.

Overrides:
getColor in class Icon
Returns:
this icon's current color.

setColor

public void setColor(Color c)
Description copied from class: Icon
Change the color of this icon.

Overrides:
setColor in class Icon
Parameters:
c - The new color.

renderImage

protected void renderImage(Graphics2D g2,
                           int width,
                           int height)
Description copied from class: Icon
Override either this method or Icon.paintIcon(java.awt.Graphics) to specify how the icon looks. For this method, the upper left corner of the icon has coordinates (0,0). The width and height are both 1.0.

Overrides:
renderImage in class Icon
Parameters:
g2 - the graphics context where the icon should be drawn.
width - the number of pixels wide the image will be
height - the number of pixels high the image will be