becker.robots.icons
Class BrokenIcon
java.lang.Object
becker.robots.icons.Icon
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
Constructor Summary |
BrokenIcon(Icon brokenIcon)
Construct a broken 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 |
BrokenIcon
public BrokenIcon(Icon brokenIcon)
- Construct a broken icon.
- Parameters:
brokenIcon
- the icon to break into fragments.
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 beheight
- the number of pixels high the image will be