org.jvnet.substance.utils
Class PulseTracker

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

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

Tracker for pulsating (default and focused) JButtons. This class is for internal use only.

Author:
Kirill Grouchnikov

Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
static long getCycles(javax.swing.JButton jButton)
          Retrieves the current cycle count for the specified button.
static boolean isAnimating(javax.swing.JButton jButton)
          Retrieves the animation state for the specified button.
static boolean isAttentionDrawingCloseButton(javax.swing.JButton jButton)
          Checks whether the specified button is attention-drawing close button of some internal frame, root pane or desktop icon.
static boolean isPulsating(javax.swing.JButton jButton)
          Checks whether the specified button is pulsating.
static void stopAllTimers()
          Stops all timers.
static void update(javax.swing.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(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

update

public static void update(javax.swing.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(javax.swing.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(javax.swing.JButton jButton)
Retrieves the animation state for the specified button.

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

isAttentionDrawingCloseButton

public static boolean isAttentionDrawingCloseButton(javax.swing.JButton jButton)
Checks whether the specified button is attention-drawing close button of some internal frame, root pane or desktop icon.

Parameters:
jButton - Button.
Returns:
true if the specified button is close button of some internal frame, root pane or desktop icon, false otherwise.

isPulsating

public static boolean isPulsating(javax.swing.JButton jButton)
Checks whether the specified button is pulsating.

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

stopAllTimers

public static void stopAllTimers()
Stops all timers.