org.eclipse.nebula.effects.stw.transitions
Class FadeTransition

java.lang.Object
  extended by org.eclipse.nebula.effects.stw.Transition
      extended by org.eclipse.nebula.effects.stw.transitions.FadeTransition

public class FadeTransition
extends Transition

Applies a fade effect. The from control fades out and the the to control fades in smoothly.

Author:
Ahmed Mahran (ahmahran@gmail.com)

Field Summary
 
Fields inherited from class org.eclipse.nebula.effects.stw.Transition
DEFAULT_FPS, DEFAULT_T, DIR_DOWN, DIR_LEFT, DIR_RIGHT, DIR_UP
 
Constructor Summary
FadeTransition(TransitionManager transitionManager)
          This constructor creates a FadeTransition with number of frames per second of Transition.DEFAULT_FPS and total transition time of Transition.DEFAULT_T milliseconds.
FadeTransition(TransitionManager transitionManager, long fps, long T)
          This constructor creates a FadeTransition with fps number of frames per second and T total transition time in milliseconds.
 
Method Summary
 void setFadeInStart(double percentage)
          Specifies when the fade-in effect is started as a percentage of the transition total time.
 void setFadeInStop(double percentage)
          Specifies when the fade-in effect is ended as a percentage of the transition total time.
 void setFadeOutStart(double percentage)
          Specifies when the fade-out effect is started as a percentage of the transition total time.
 void setFadeOutStop(double percentage)
          Specifies when the fade-out effect is ended as a percentage of the transition total time.
 
Methods inherited from class org.eclipse.nebula.effects.stw.Transition
getFPS, getTotalTransitionTime, setFPS, setTotalTransitionTime, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FadeTransition

public FadeTransition(TransitionManager transitionManager)
This constructor creates a FadeTransition with number of frames per second of Transition.DEFAULT_FPS and total transition time of Transition.DEFAULT_T milliseconds. It is similar to new FadeTransition(transitionManager, Transition.DEFAULT_FPS, Transition.DEFAULT_T)

Parameters:
transitionManager - the transition manager to be used to manage transitions

FadeTransition

public FadeTransition(TransitionManager transitionManager,
                      long fps,
                      long T)
This constructor creates a FadeTransition with fps number of frames per second and T total transition time in milliseconds.

Parameters:
transitionManager - the transition manager to be used to manage transitions
fps - number of frames per second
T - the total time the transition effect will take in milliseconds
Method Detail

setFadeOutStart

public void setFadeOutStart(double percentage)
Specifies when the fade-out effect is started as a percentage of the transition total time. For example, 0% means that the fade-out effect will start at the beginning of the transition.
percentage should have a value in the interval from 0 to 100 inclusive otherwise the passed value would be ignored leaving the previous value unchanged.

Parameters:
percentage - is a percentage of the transition total time.

setFadeOutStop

public void setFadeOutStop(double percentage)
Specifies when the fade-out effect is ended as a percentage of the transition total time. For example, 50% means that the fade-out effect will stop at the mid of the transition.
percentage should have a value in the interval from 0 to 100 inclusive otherwise the passed value would be ignored leaving the previous value unchanged.

Parameters:
percentage - is a percentage of the transition total time.

setFadeInStart

public void setFadeInStart(double percentage)
Specifies when the fade-in effect is started as a percentage of the transition total time. For example, 50% means that the fade-in effect will start at the mid of the transition.
percentage should have a value in the interval from 0 to 100 inclusive otherwise the passed value would be ignored leaving the previous value unchanged.

Parameters:
percentage - is a percentage of the transition total time.

setFadeInStop

public void setFadeInStop(double percentage)
Specifies when the fade-in effect is ended as a percentage of the transition total time. For example, 100% means that the fade-in effect will stop at the end of the transition.
percentage should have a value in the interval from 0 to 100 inclusive otherwise the passed value would be ignored leaving the previous value unchanged.

Parameters:
percentage - is a percentage of the transition total time.