Class SetColorEffect
java.lang.Object
org.eclipse.nebula.animation.effects.AbstractEffect
org.eclipse.nebula.animation.effects.SetColorEffect
- All Implemented Interfaces:
IEffect
public class SetColorEffect extends AbstractEffect
Progressively changes the color of an object.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SetColorEffect.IColoredObject
Objects on which the SetColorEffect is applied must implements this interface. -
Field Summary
Fields Modifier and Type Field Description (package private) SetColorEffect.IColoredObject
control
(package private) org.eclipse.swt.graphics.Color
dest
(package private) int
diffB
(package private) int
diffG
(package private) int
diffR
(package private) org.eclipse.swt.graphics.Color
src
Fields inherited from class org.eclipse.nebula.animation.effects.AbstractEffect
done, easingFunction, length, runnableOnCancel, runnableOnStop
-
Constructor Summary
Constructors Constructor Description SetColorEffect(SetColorEffect.IColoredObject control, org.eclipse.swt.graphics.Color src, org.eclipse.swt.graphics.Color dest, long lengthMilli, IMovement movement, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Create a new effect on object control. -
Method Summary
Modifier and Type Method Description void
applyEffect(long currentTime)
Apply this effect.Methods inherited from class org.eclipse.nebula.animation.effects.AbstractEffect
cancel, doCancel, doEffect, doEffect, doStop, getLength, isDone, processEnd
-
Field Details
-
Constructor Details
-
SetColorEffect
public SetColorEffect(SetColorEffect.IColoredObject control, org.eclipse.swt.graphics.Color src, org.eclipse.swt.graphics.Color dest, long lengthMilli, IMovement movement, java.lang.Runnable onStop, java.lang.Runnable onCancel)Create a new effect on object control.
Source and destination color will not be disposed during or after the animation. All other temporary colors created by this effect will be disposed automatically.
- Parameters:
control
-src
-dest
-lengthMilli
-movement
-onStop
- can be a Runnable or nullonCancel
- can be a Runnable or null
-
-
Method Details
-
applyEffect
public void applyEffect(long currentTime)Description copied from class:AbstractEffect
Apply this effect.- Specified by:
applyEffect
in classAbstractEffect
- See Also:
AbstractEffect.applyEffect(long)
-