ikayaki.gui
Class ComponentFlasher

java.lang.Object
  extended by javax.swing.Timer
      extended by ikayaki.gui.ComponentFlasher
All Implemented Interfaces:
Serializable

public class ComponentFlasher
extends Timer

Timer used for flashing a JComponent background light red (or given color), for 100 ms (or given time).

Author:
Samuli Kaipiainen
See Also:
Serialized Form

Field Summary
private  JComponent component
           
private  Color componentBG
           
private static Color defauldFlashColor
           
private  Color flashcolor
           
 
Fields inherited from class javax.swing.Timer
listenerList
 
Constructor Summary
ComponentFlasher(JComponent component)
           
ComponentFlasher(JComponent component, Color flashcolor)
           
ComponentFlasher(JComponent component, Color flashcolor, int flashtime)
           
ComponentFlasher(JComponent component, int flashtime)
           
 
Method Summary
 void flash()
           
 
Methods inherited from class javax.swing.Timer
addActionListener, fireActionPerformed, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

component

private final JComponent component

componentBG

private final Color componentBG

flashcolor

private final Color flashcolor

defauldFlashColor

private static final Color defauldFlashColor
Constructor Detail

ComponentFlasher

public ComponentFlasher(JComponent component)

ComponentFlasher

public ComponentFlasher(JComponent component,
                        Color flashcolor)

ComponentFlasher

public ComponentFlasher(JComponent component,
                        int flashtime)

ComponentFlasher

public ComponentFlasher(JComponent component,
                        Color flashcolor,
                        int flashtime)
Method Detail

flash

public void flash()