org.jvnet.substance.utils
Class SubstanceFadeUtilities

java.lang.Object
  extended by org.jvnet.substance.utils.SubstanceFadeUtilities

public class SubstanceFadeUtilities
extends java.lang.Object

Fade-related utilities.

Author:
Kirill Grouchnikov.

Constructor Summary
SubstanceFadeUtilities()
           
 
Method Summary
static void cancelFades(java.util.Set<java.lang.Long> initiatedFadeSequences)
          Cancels the specified fade sequences.
static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp, java.lang.Comparable<?>[] comparables, org.jvnet.lafwidget.animation.FadeKind[] fadeKinds)
          Returns the first matching fade state for the specified component.
static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp, java.lang.Comparable<?> comparable, org.jvnet.lafwidget.animation.FadeKind... fadeKinds)
          Returns the first matching fade state for the specified component.
static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp, org.jvnet.lafwidget.animation.FadeKind... fadeKinds)
          Returns the first matching fade state for the specified component.
static org.jvnet.lafwidget.animation.FadeState getFadeStateWithHighestFadeCycle(org.jvnet.lafwidget.animation.FadeKind fadeKind, java.awt.Component... comps)
          Returns the highest fade cycle for the specified component and the fade kind.
static java.awt.Component getTracked(org.jvnet.lafwidget.animation.FadeKind fadeKind, java.awt.Component... comps)
          Returns the component that is being tracked by the FadeTracker with the highest value of the fade cycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstanceFadeUtilities

public SubstanceFadeUtilities()
Method Detail

getTracked

public static java.awt.Component getTracked(org.jvnet.lafwidget.animation.FadeKind fadeKind,
                                            java.awt.Component... comps)
Returns the component that is being tracked by the FadeTracker with the highest value of the fade cycle.

Parameters:
fadeKind - Fade kind.
comps - Components.
Returns:
The component that is being tracked by the FadeTracker with the highest value of the fade cycle. May be null.

getFadeStateWithHighestFadeCycle

public static org.jvnet.lafwidget.animation.FadeState getFadeStateWithHighestFadeCycle(org.jvnet.lafwidget.animation.FadeKind fadeKind,
                                                                                       java.awt.Component... comps)
Returns the highest fade cycle for the specified component and the fade kind.

Parameters:
fadeKind - Fade kind.
comps - Components.
Returns:
The highest fade cycle for the specified component and the fade kind.

getFadeState

public static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp,
                                                                   org.jvnet.lafwidget.animation.FadeKind... fadeKinds)
Returns the first matching fade state for the specified component.

Parameters:
comp - Component.
fadeKinds - A list of fade kinds. The list is scanned from the start. The first fade kind that is currently "happening" on the specified component will be used to fetch the fade state.
Returns:
The first matching fade state for the specified component.

getFadeState

public static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp,
                                                                   java.lang.Comparable<?> comparable,
                                                                   org.jvnet.lafwidget.animation.FadeKind... fadeKinds)
Returns the first matching fade state for the specified component.

Parameters:
comp - Component.
comparable - Identifier of a sub-entity.
fadeKinds - A list of fade kinds. The list is scanned from the start. The first fade kind that is currently "happening" on the specified component will be used to fetch the fade state.
Returns:
The first matching fade state for the specified component.

getFadeState

public static org.jvnet.lafwidget.animation.FadeState getFadeState(java.awt.Component comp,
                                                                   java.lang.Comparable<?>[] comparables,
                                                                   org.jvnet.lafwidget.animation.FadeKind[] fadeKinds)
Returns the first matching fade state for the specified component.

Parameters:
comp - Component.
comparables - Identifiers of sub-entities.
fadeKinds - Fade kinds. The list is scanned from the start. The first fade kind that is currently "happening" on the specified component will be used to fetch the fade state.
Returns:
The first matching fade state for the specified component.

cancelFades

public static void cancelFades(java.util.Set<java.lang.Long> initiatedFadeSequences)
Cancels the specified fade sequences.

Parameters:
initiatedFadeSequences - Fade sequence IDs to cancel.