Package org.eclipse.nebula.effects.stw
Class Transition.TransitionPainter
- java.lang.Object
-
- org.eclipse.nebula.effects.stw.Transition.TransitionPainter
-
- All Implemented Interfaces:
java.util.EventListener,org.eclipse.swt.events.PaintListener,org.eclipse.swt.internal.SWTEventListener
- Enclosing class:
- Transition
private class Transition.TransitionPainter extends java.lang.Object implements org.eclipse.swt.events.PaintListenerListener to paint the canvas object, where the transition is visualized.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Canvas_canvasCanvas where to paint the transitions.private double_directionDirection of the animation effect.private org.eclipse.swt.graphics.Image_fromFrom image to paint in the canvas.private org.eclipse.swt.graphics.GC_gcGC for the canvas object.private boolean_isEnabledIndicate that this object is enabled to paint the canvas.private org.eclipse.swt.graphics.Image_toTo image to paint in the canvas.private int_transitionTransition to paint.private org.eclipse.swt.graphics.Image_xitionBgInitial background of the transition paint.private org.eclipse.swt.graphics.Image_xitionImgImage to draw the transition.private org.eclipse.swt.graphics.GC_xitionImgGCGraphics context object for the _xitionImg object.private static intTRANSITION_ENDEnd transition to paint.private static intTRANSITION_INITInitial transition to paint.private static intTRANSITION_STEPStep transition to paint.
-
Constructor Summary
Constructors Modifier Constructor Description privateTransitionPainter(org.eclipse.swt.widgets.Canvas canvas, org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, double direction, org.eclipse.swt.graphics.Image xitionBg)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddisposeXitionImg()Dispose the transition image objects.private voidinitXitionImg(org.eclipse.swt.widgets.Display display)Initialize the transition image objects.voidpaintControl(org.eclipse.swt.events.PaintEvent e)voidpaintTransition(int transition)Paint a transition.private voidpaintTransition(org.eclipse.swt.graphics.GC gc, int transition)Paint a transition.
-
-
-
Field Detail
-
TRANSITION_INIT
private static final int TRANSITION_INIT
Initial transition to paint.- See Also:
- Constant Field Values
-
TRANSITION_STEP
private static final int TRANSITION_STEP
Step transition to paint.- See Also:
- Constant Field Values
-
TRANSITION_END
private static final int TRANSITION_END
End transition to paint.- See Also:
- Constant Field Values
-
_isEnabled
private boolean _isEnabled
Indicate that this object is enabled to paint the canvas.
-
_transition
private int _transition
Transition to paint.
-
_gc
private org.eclipse.swt.graphics.GC _gc
GC for the canvas object.
-
_canvas
private org.eclipse.swt.widgets.Canvas _canvas
Canvas where to paint the transitions.
-
_from
private final org.eclipse.swt.graphics.Image _from
From image to paint in the canvas.
-
_to
private final org.eclipse.swt.graphics.Image _to
To image to paint in the canvas.
-
_direction
private final double _direction
Direction of the animation effect.
-
_xitionBg
private final org.eclipse.swt.graphics.Image _xitionBg
Initial background of the transition paint.
-
_xitionImg
private org.eclipse.swt.graphics.Image _xitionImg
Image to draw the transition.
-
_xitionImgGC
private org.eclipse.swt.graphics.GC _xitionImgGC
Graphics context object for the _xitionImg object.
-
-
Constructor Detail
-
TransitionPainter
private TransitionPainter(org.eclipse.swt.widgets.Canvas canvas, org.eclipse.swt.graphics.Image from, org.eclipse.swt.graphics.Image to, double direction, org.eclipse.swt.graphics.Image xitionBg)Constructor.- Parameters:
canvas- Canvas where to paint the transitions.from- From image to paint in the canvas.to- To image to paint in the canvas.direction- Direction of the animation effect.xitionBg- Initial background of the transition paint.
-
-
Method Detail
-
initXitionImg
private void initXitionImg(org.eclipse.swt.widgets.Display display)
Initialize the transition image objects.- Parameters:
display- Display to use for the objects.
-
disposeXitionImg
private void disposeXitionImg()
Dispose the transition image objects.
-
paintTransition
public void paintTransition(int transition)
Paint a transition.- Parameters:
transition- Transition to paint.
-
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e)
- Specified by:
paintControlin interfaceorg.eclipse.swt.events.PaintListener
-
paintTransition
private void paintTransition(org.eclipse.swt.graphics.GC gc, int transition)Paint a transition.- Parameters:
gc- GC object to paint.transition- Transition to paint.
-
-