org.jvnet.substance
Class PulseTracker

java.lang.Object
  extended by org.jvnet.substance.PulseTracker
All Implemented Interfaces:
ActionListener, EventListener

public class PulseTracker
extends Object
implements ActionListener

Tracker for pulsating (default and focused) JButtons.

Author:
Kirill Grouchnikov

Method Summary
 void actionPerformed(ActionEvent event)
           
static long getCycles(JButton jButton)
          Retrieves the current cycle count for the specified button.
static boolean isAnimating(JButton jButton)
          Retrieves the animation state for the specified button.
static void update(JButton jButton)
          Updates the state of the specified button which must be a default button in some window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

update

public static void update(JButton jButton)
Updates the state of the specified button which must be a default button in some window. The button state is determined based on focus ownership.

Parameters:
jButton - Button.

getCycles

public static long getCycles(JButton jButton)
Retrieves the current cycle count for the specified button.

Parameters:
jButton - Button.
Returns:
Current cycle count for the specified button.

isAnimating

public static boolean isAnimating(JButton jButton)
Retrieves the animation state for the specified button.

Parameters:
jButton - Button.
Returns:
true if the specified button is being animated, false otherwise.