|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbecker.robots.icons.Icon
becker.robots.icons.CompositeIcon
becker.robots.icons.AnimatedIcon
becker.robots.icons.FlasherIcon
public class FlasherIcon
Display the current state of a Flasher
, based on the flasher's
current state. In particular, if the flasher is "on", then cycle
between two images to simulate the flashing action of the flasher.
Field Summary |
---|
Fields inherited from class becker.robots.icons.Icon |
---|
transparent |
Constructor Summary | |
---|---|
FlasherIcon(Sim owner)
Construct a new FlasherIcon with default colors, size and flash rate. |
|
FlasherIcon(Sim owner,
Color base,
Color onColor,
Color offColor,
double relativeSize,
int millisecondsPerFlash)
Construct a new FlasherIcon. |
|
FlasherIcon(Sim owner,
double relativeSize)
Construct a new FlasherIcon with default colors and flash rate. |
|
FlasherIcon(Sim owner,
double relativeSize,
int millisecondsPerFlash)
Construct a new FlasherIcon with default colors. |
Method Summary | |
---|---|
Color |
getColor()
Get the color of the flasher's base. |
void |
setColor(Color c)
Set the color of the flasher's base. |
void |
stop()
Stop the animation. |
Methods inherited from class becker.robots.icons.AnimatedIcon |
---|
getImage, renderImage, setCurrentImage, start |
Methods inherited from class becker.robots.icons.CompositeIcon |
---|
applyTransforms, componentIcon, hasChanged, markChanged, numComponents |
Methods inherited from class becker.robots.icons.Icon |
---|
getLabel, getRotation, getSize, getTransparency, paintIcon, setLabel, setSize, setTransparency |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlasherIcon(Sim owner, Color base, Color onColor, Color offColor, double relativeSize, int millisecondsPerFlash)
owner
- the owner of this icon, typically an instance of Flasher.base
- the desired color of the flasher's base.onColor
- the desired color of the light when it is on.offColor
- the desired color of the light when it is off.relativeSize
- a value between 0.0 (very small) and 1.0 (large).millisecondsPerFlash
- the number of milliseconds between flashes.public FlasherIcon(Sim owner, double relativeSize)
owner
- the owner of this icon, typically an instance of Flasher.relativeSize
- a value between 0.0 (very small) and 1.0 (large).public FlasherIcon(Sim owner, double relativeSize, int millisecondsPerFlash)
owner
- the owner of this icon, typically an instance of Flasher.relativeSize
- a value between 0.0 (very small) and 1.0 (large).millisecondsPerFlash
- the number of milliseconds between flashes.public FlasherIcon(Sim owner)
owner
- the owner of this icon, typically an instance of Flasher.Method Detail |
---|
public void stop()
AnimatedIcon
stop
in class AnimatedIcon
public Color getColor()
getColor
in class AnimatedIcon
public void setColor(Color c)
setColor
in class AnimatedIcon
c
- The new color.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |