final class ColorTip extends Object
Example use case:
//no initial delay, and show the new color for 2 seconds only ColorTip tip = new ColorTip(0, 2, someLabel, temporaryColor); tip.start();Uses a daemon thread, so this class will not prevent a program from terminating. Will not lock the GUI.
Constructor and Description |
---|
ColorTip(int aInitialDelay,
int aActivationInterval,
JComponent aComponent,
Color aTempColor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
start()
Temporarily change the background color of the component, without interfering with
the user's control of the gui, and without preventing program termination.
|
ColorTip(int aInitialDelay, int aActivationInterval, JComponent aComponent, Color aTempColor)
aInitialDelay
- number of seconds to wait before changing the
background color of aComponent, and must be in range 0..60 (inclusive).aActivationInterval
- number of seconds to display aTempColor,
and must be in range 1..60 (inclusive).aComponent
- GUI item whose background color will be changed.aTempColor
- background color which aComponent will take for
aActivationInterval seconds.void start()
If the target temporary color is the same as the current background color, then do nothing. (This condition occurs when two ColorTip objects are altering the same item at nearly the same time, such that they "overlap".)
Copyright Hirondelle Systems - License - Generated 2013Sep20.10.58