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.PaintListener
Listener to paint the canvas object, where the transition is visualized.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Canvas
_canvas
Canvas where to paint the transitions.private double
_direction
Direction of the animation effect.private org.eclipse.swt.graphics.Image
_from
From image to paint in the canvas.private org.eclipse.swt.graphics.GC
_gc
GC for the canvas object.private boolean
_isEnabled
Indicate that this object is enabled to paint the canvas.private org.eclipse.swt.graphics.Image
_to
To image to paint in the canvas.private int
_transition
Transition to paint.private org.eclipse.swt.graphics.Image
_xitionBg
Initial background of the transition paint.private org.eclipse.swt.graphics.Image
_xitionImg
Image to draw the transition.private org.eclipse.swt.graphics.GC
_xitionImgGC
Graphics context object for the _xitionImg object.private static int
TRANSITION_END
End transition to paint.private static int
TRANSITION_INIT
Initial transition to paint.private static int
TRANSITION_STEP
Step transition to paint.
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
disposeXitionImg()
Dispose the transition image objects.private void
initXitionImg(org.eclipse.swt.widgets.Display display)
Initialize the transition image objects.void
paintControl(org.eclipse.swt.events.PaintEvent e)
void
paintTransition(int transition)
Paint a transition.private void
paintTransition(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:
paintControl
in 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.
-
-