org.pushingpixels.substance.internal.animation
Class RootPaneDefaultButtonTracker

java.lang.Object
  extended by org.pushingpixels.trident.callback.TimelineCallbackAdapter
      extended by org.pushingpixels.trident.callback.UIThreadTimelineCallbackAdapter
          extended by org.pushingpixels.substance.internal.animation.RootPaneDefaultButtonTracker
All Implemented Interfaces:
org.pushingpixels.trident.callback.TimelineCallback

public class RootPaneDefaultButtonTracker
extends org.pushingpixels.trident.callback.UIThreadTimelineCallbackAdapter

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


Method Summary
static float getTimelinePosition(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 isPulsating(javax.swing.JButton jButton)
          Checks whether the specified button is pulsating.
 void onTimelinePulse(float durationFraction, float timelinePosition)
           
 void onTimelineStateChanged(org.pushingpixels.trident.Timeline.TimelineState oldState, org.pushingpixels.trident.Timeline.TimelineState newState, float durationFraction, float timelinePosition)
           
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

onTimelineStateChanged

public void onTimelineStateChanged(org.pushingpixels.trident.Timeline.TimelineState oldState,
                                   org.pushingpixels.trident.Timeline.TimelineState newState,
                                   float durationFraction,
                                   float timelinePosition)
Specified by:
onTimelineStateChanged in interface org.pushingpixels.trident.callback.TimelineCallback
Overrides:
onTimelineStateChanged in class org.pushingpixels.trident.callback.TimelineCallbackAdapter

onTimelinePulse

public void onTimelinePulse(float durationFraction,
                            float timelinePosition)
Specified by:
onTimelinePulse in interface org.pushingpixels.trident.callback.TimelineCallback
Overrides:
onTimelinePulse in class org.pushingpixels.trident.callback.TimelineCallbackAdapter

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.

getTimelinePosition

public static float getTimelinePosition(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.

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.