org.jvnet.lafwidget.animation
Class FadeConfigurationManager

java.lang.Object
  extended by org.jvnet.lafwidget.animation.FadeConfigurationManager

public class FadeConfigurationManager
extends java.lang.Object

Fade configuration manager.

Since:
2.1
Author:
Kirill Grouchnikov

Method Summary
static void addGlobalFadeTrackerCallback(GlobalFadeTrackerCallback callback)
          Registers the specified application callback for tracking core fade events.
 void allowFades(FadeKind fadeKind)
          Allows fade of the specified kind on all controls.
 void allowFades(FadeKind fadeKind, java.lang.Class<?> clazz)
          Allows fade of the specified kind on all controls of specified class.
 void allowFades(FadeKind fadeKind, java.lang.Class<?>[] clazz)
          Allows fade of the specified kind on all controls of specified classes.
 void allowFades(FadeKind fadeKind, java.awt.Component comp)
          Allows fade of the specified kind on the specified control.
 void disallowFades(FadeKind fadeKind)
          Disallows fade of the specified kind on all controls.
 void disallowFades(FadeKind fadeKind, java.lang.Class<?> clazz)
          Disallows fade of the specified kind on all controls of specified class.
 void disallowFades(FadeKind fadeKind, java.lang.Class<?>[] clazz)
          Disallows fade of the specified kind on all controls of specified classes.
 void disallowFades(FadeKind fadeKind, java.awt.Component comp)
          Disallows fade of the specified kind on the specified control.
 boolean fadeAllowed(FadeKind fadeKind, java.awt.Component comp)
          Checks whether the specified fade kind is allowed on the specified component.
static FadeConfigurationManager getInstance()
          Returns the configuration manager instance.
static void removeGlobalFadeTrackerCallback(GlobalFadeTrackerCallback callback)
          Removes the specified application callback for tracking core fade events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FadeConfigurationManager getInstance()
Returns the configuration manager instance.

Returns:
Configuration manager instance.

allowFades

public void allowFades(FadeKind fadeKind)
Allows fade of the specified kind on all controls.

Parameters:
fadeKind - Fade kind to allow.

allowFades

public void allowFades(FadeKind fadeKind,
                       java.lang.Class<?> clazz)
Allows fade of the specified kind on all controls of specified class.

Parameters:
fadeKind - Fade kind to allow.
clazz - Control class for allowing the fade kind.

allowFades

public void allowFades(FadeKind fadeKind,
                       java.lang.Class<?>[] clazz)
Allows fade of the specified kind on all controls of specified classes.

Parameters:
fadeKind - Fade kind to allow.
clazz - Control classes for allowing the fade kind.

allowFades

public void allowFades(FadeKind fadeKind,
                       java.awt.Component comp)
Allows fade of the specified kind on the specified control.

Parameters:
fadeKind - Fade kind to allow.
comp - Control for allowing the fade kind.

disallowFades

public void disallowFades(FadeKind fadeKind)
Disallows fade of the specified kind on all controls.

Parameters:
fadeKind - Fade kind to disallow.

disallowFades

public void disallowFades(FadeKind fadeKind,
                          java.lang.Class<?> clazz)
Disallows fade of the specified kind on all controls of specified class.

Parameters:
fadeKind - Fade kind to disallow.
clazz - Control class for disallowing the fade kind.

disallowFades

public void disallowFades(FadeKind fadeKind,
                          java.lang.Class<?>[] clazz)
Disallows fade of the specified kind on all controls of specified classes.

Parameters:
fadeKind - Fade kind to disallow.
clazz - Control classes for disallowing the fade kind.

disallowFades

public void disallowFades(FadeKind fadeKind,
                          java.awt.Component comp)
Disallows fade of the specified kind on the specified control.

Parameters:
fadeKind - Fade kind to disallow.
comp - Control for disallowing the fade kind.

fadeAllowed

public boolean fadeAllowed(FadeKind fadeKind,
                           java.awt.Component comp)
Checks whether the specified fade kind is allowed on the specified component.

Parameters:
fadeKind - Fade kind.
comp - Component. Can be null.
Returns:
true if the specified fade kind is allowed on the specified component, false otherwise.

addGlobalFadeTrackerCallback

public static void addGlobalFadeTrackerCallback(GlobalFadeTrackerCallback callback)
Registers the specified application callback for tracking core fade events. This allows the applications to track different stages of animation sequences. For example, the action listener on button press is called immediately on mouse release. However, the sequence going from pressed state to rollover state takes some time (depending on the current animation speed setting controlled by LafConstants.AnimationKind and LafWidget.ANIMATION_KIND). An application that wishes to take a frame snapshot with the final (rollover) state of the button can register a global fade tracker callback that will take the snapshot at the end of the fade sequence.

Parameters:
callback - Application callback for tracking core fade events.
See Also:
removeGlobalFadeTrackerCallback(GlobalFadeTrackerCallback)

removeGlobalFadeTrackerCallback

public static void removeGlobalFadeTrackerCallback(GlobalFadeTrackerCallback callback)
Removes the specified application callback for tracking core fade events.

Parameters:
callback - Application callback to remove.
See Also:
addGlobalFadeTrackerCallback(GlobalFadeTrackerCallback)