net.wotonomy.ui.swing.util
Class ComponentHighlighter

java.lang.Object
  extended by net.wotonomy.ui.swing.util.ComponentHighlighter
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ComponentHighlighter
extends java.lang.Object
implements java.awt.event.ActionListener

Visually highlights a component with the specified image for a brief period.

Version:
$Revision: 904 $ $Date: 2006-02-18 23:19:05 +0000 (Sat, 18 Feb 2006) $
Author:
michael@mpowers.net, $Author: cgruber $

Constructor Summary
ComponentHighlighter(javax.swing.JComponent aComponent, java.awt.Image anImage)
          "Fire-and-forget" constructor.
ComponentHighlighter(javax.swing.JComponent aComponent, java.net.URL aURL)
          Alternate "Fire-and-forget" constructor loads an image from a URL.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
protected  void init(javax.swing.JComponent aComponent, java.awt.Image anImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentHighlighter

public ComponentHighlighter(javax.swing.JComponent aComponent,
                            java.net.URL aURL)
Alternate "Fire-and-forget" constructor loads an image from a URL.

Parameters:
aComponent - A Component that will be highlighted.
aURL - A URL pointing to an image.

ComponentHighlighter

public ComponentHighlighter(javax.swing.JComponent aComponent,
                            java.awt.Image anImage)
"Fire-and-forget" constructor.

Parameters:
aComponent - A Component that will be highlighted.
anImage - An image, preferably an animated GIF with transparency, that will slide along the length of the component.
Method Detail

init

protected void init(javax.swing.JComponent aComponent,
                    java.awt.Image anImage)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener


Copyright © 2006 null. All Rights Reserved.