public class FadeTransition extends Transition
_fps, _T, _transitionManager, DEFAULT_FPS, DEFAULT_T, DIR_DOWN, DIR_LEFT, DIR_RIGHT, DIR_UP, IS_LINUX_OS, IS_MAC_OS
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
endTransition(org.eclipse.swt.graphics.Image from,
org.eclipse.swt.graphics.Image to,
org.eclipse.swt.graphics.GC gc,
double direction) |
protected void |
initTransition(org.eclipse.swt.graphics.Image from,
org.eclipse.swt.graphics.Image to,
org.eclipse.swt.graphics.GC gc,
double direction) |
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.
|
protected void |
stepTransition(long t,
org.eclipse.swt.graphics.Image from,
org.eclipse.swt.graphics.Image to,
org.eclipse.swt.graphics.GC gc,
double direction) |
doEvents, getFPS, getTotalTransitionTime, setFPS, setTotalTransitionTime, start
public FadeTransition(TransitionManager transitionManager)
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
)transitionManager
- the transition manager to be used to manage transitionspublic FadeTransition(TransitionManager transitionManager, long fps, long T)
transitionManager
- the transition manager to be used to manage transitionsfps
- number of frames per secondT
- the total time the transition effect will take in millisecondsprotected void initTransition(org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, org.eclipse.swt.graphics.GC gc, double direction)
initTransition
in class Transition
protected void stepTransition(long t, org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, org.eclipse.swt.graphics.GC gc, double direction)
stepTransition
in class Transition
protected void endTransition(org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, org.eclipse.swt.graphics.GC gc, double direction)
endTransition
in class Transition
public void setFadeOutStart(double percentage)
percentage
- is a percentage of the transition total time.public void setFadeOutStop(double percentage)
percentage
- is a percentage of the transition total time.public void setFadeInStart(double percentage)
percentage
- is a percentage of the transition total time.public void setFadeInStop(double percentage)
percentage
- is a percentage of the transition total time.