Class SlideTransition
- java.lang.Object
-
- org.eclipse.nebula.effects.stw.Transition
-
- org.eclipse.nebula.effects.stw.transitions.SlideTransition
-
public class SlideTransition extends Transition
Applies a slide effect. The from control slides out and the the to control slides in smoothly accelerating up then down after a while until it stops.
-
-
Field Summary
Fields Modifier and Type Field Description private double
_a
private boolean
_flag1
private org.eclipse.swt.graphics.ImageData
_fromData
private int
_h
private int
_halfH
private long
_halfT
private int
_halfW
private long
_t1
private double
_v0
private int
_w
private double
_x
private double
_x0
private double
_y
private double
_y0
-
Fields inherited from class org.eclipse.nebula.effects.stw.Transition
_fps, _T, _transitionManager, DEFAULT_FPS, DEFAULT_T, DIR_DOWN, DIR_LEFT, DIR_RIGHT, DIR_UP, IS_LINUX_OS, IS_MAC_OS
-
-
Constructor Summary
Constructors Constructor Description SlideTransition(TransitionManager transitionManager)
This constructor creates a SlideTransition with number of frames per second ofTransition.DEFAULT_FPS
and total transition time ofTransition.DEFAULT_T
milliseconds.SlideTransition(TransitionManager transitionManager, long fps, long T)
This constructor creates a SlideTransition with fps number of frames per second and T total transition time in milliseconds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
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)
-
Methods inherited from class org.eclipse.nebula.effects.stw.Transition
doEvents, getFPS, getTotalTransitionTime, setFPS, setTotalTransitionTime, start
-
-
-
-
Field Detail
-
_w
private int _w
-
_halfW
private int _halfW
-
_h
private int _h
-
_halfH
private int _halfH
-
_a
private double _a
-
_x
private double _x
-
_y
private double _y
-
_x0
private double _x0
-
_y0
private double _y0
-
_v0
private double _v0
-
_flag1
private boolean _flag1
-
_fromData
private org.eclipse.swt.graphics.ImageData _fromData
-
_halfT
private long _halfT
-
_t1
private long _t1
-
-
Constructor Detail
-
SlideTransition
public SlideTransition(TransitionManager transitionManager)
This constructor creates a SlideTransition with number of frames per second ofTransition.DEFAULT_FPS
and total transition time ofTransition.DEFAULT_T
milliseconds. It is similar to new SlideTransition(transitionManager,Transition.DEFAULT_FPS
,Transition.DEFAULT_T
)- Parameters:
transitionManager
- the transition manager to be used to manage transitions
-
SlideTransition
public SlideTransition(TransitionManager transitionManager, long fps, long T)
This constructor creates a SlideTransition with fps number of frames per second and T total transition time in milliseconds.- Parameters:
transitionManager
- the transition manager to be used to manage transitionsfps
- number of frames per secondT
- the total time the transition effect will take in milliseconds
-
-
Method Detail
-
initTransition
protected void initTransition(org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, org.eclipse.swt.graphics.GC gc, double direction)
- Specified by:
initTransition
in classTransition
-
stepTransition
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)
- Specified by:
stepTransition
in classTransition
-
endTransition
protected void endTransition(org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, org.eclipse.swt.graphics.GC gc, double direction)
- Specified by:
endTransition
in classTransition
-
-