org.tentackle.plaf
Class TFlasherListener

java.lang.Object
  extended by org.tentackle.plaf.TFlasherListener
All Implemented Interfaces:
ActionListener, FocusListener, EventListener

public class TFlasherListener
extends Object
implements FocusListener, ActionListener

A listener to implement focus flashing.

Author:
harald

Field Summary
protected  JComponent comp
          the component having the focus
protected static boolean flasherVisible
          true if flasher visible
 
Constructor Summary
TFlasherListener(JComponent comp)
          Creates a flasher listener.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
 void focusGained(FocusEvent e)
          Invoked when a component gains the keyboard focus.
 void focusLost(FocusEvent e)
          Invoked when a component loses the keyboard focus.
static boolean isFlasherVisible()
          Checks whether flasher is visible.
static void removeFlasherListener(JComponent comp)
          Removes a flasher listener from the given comp, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flasherVisible

protected static boolean flasherVisible
true if flasher visible


comp

protected JComponent comp
the component having the focus

Constructor Detail

TFlasherListener

public TFlasherListener(JComponent comp)
Creates a flasher listener.

Parameters:
comp - the component to "flash"
Method Detail

isFlasherVisible

public static boolean isFlasherVisible()
Checks whether flasher is visible.

Returns:
true if visible

removeFlasherListener

public static void removeFlasherListener(JComponent comp)
Removes a flasher listener from the given comp, if any.

Parameters:
comp - the component

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: java.awt.event.ActionListener
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
Invoked when a component gains the keyboard focus.

Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
Invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface FocusListener


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de