@Immutable public class AnimationFactory extends Object
Modifier and Type | Method and Description |
---|---|
Animation |
createAnimation(int duration,
double repeatCount,
Animation.RepeatBehavior repeatBehavior,
Object subject,
Animation.Dimension dimension,
TimingHandler handler)
Creates a new Animation object that will be handled
by the associated AnimationManager.
|
Animation |
createAnimation(int duration,
double repeatCount,
Animation.RepeatBehavior repeatBehavior,
Object subject,
Animation.Dimension dimension,
TimingHandler handler,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator)
Creates a new Animation object that will be handled
by this AnimationManager.
|
Animation |
createAnimation(int duration,
Object subject,
Animation.Dimension dimension,
TimingHandler handler)
Creates a new Animation object that will be handled
by the associated AnimationManager.
|
Animation |
createCameraAltAnim(int duration,
Camera camera,
double data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a camera altitude animation
that will not repeat.
|
Animation |
createCameraTranslation(int duration,
Camera camera,
Point2D.Double data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a camera translation that will
not repeat.
|
Animation |
createGlyphBorderColorAnim(int duration,
Glyph glyph,
float[] data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a border fill color animation
that will not repeat.
|
Animation |
createGlyphFillColorAnim(int duration,
Glyph glyph,
float[] data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a glyph fill color animation
that will not repeat.
|
Animation |
createGlyphOrientationAnim(int duration,
Glyph glyph,
double data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a glyph orientation animation
that will not repeat.
|
Animation |
createGlyphSizeAnim(int duration,
Glyph glyph,
double data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a glyph size animation
that will not repeat.
|
Animation |
createGlyphTranslation(int duration,
Glyph glyph,
Point2D.Double data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a glyph translation
that will not repeat.
|
Animation |
createLensMagAnim(int duration,
FixedSizeLens lens,
float data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a lens magnification animation
that will not repeat.
|
Animation |
createLensMagRadiusAnim(int duration,
FixedSizeLens lens,
float magData,
int orData,
int irData,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a lens magnification and radii animation
that will not repeat.
|
Animation |
createLensRadiusAnim(int duration,
FixedSizeLens lens,
int orData,
int irData,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a lens radii animation
that will not repeat.
|
Animation |
createPathAnim(int duration,
DPath path,
Point2D.Double[] data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a path animation
that will not repeat.
|
Animation |
createPortalSizeAnim(int duration,
Portal portal,
int wdata,
int hdata,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a portal size animation
that will not repeat.
|
Animation |
createPortalTranslation(int duration,
Portal portal,
Point data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns a portal translation animation
that will not repeat.
|
Animation |
createTranslucencyAnim(int duration,
Translucent translucent,
float data,
boolean relative,
org.jdesktop.animation.timing.interpolation.Interpolator interpolator,
EndAction endAction)
Creates and returns an animation that targets the
alpha property of a Translucent object
|
public Animation createAnimation(int duration, Object subject, Animation.Dimension dimension, TimingHandler handler)
duration
- duration of the animation, in milliseconds.
duration may be set to Animation.INFINITE, in which case the
animation will run indefinitely. In that case, the fraction passed
to the timingEvent method of the handler is meaningless.subject
- object that will be animateddimension
- dimension of the animationhandler
- timing handler that will receive callbacks
for each animation event. The handler is responsible for
implementing the animation code itself (e.g. move a Camera or
change the color of a Glyph).public Animation createAnimation(int duration, double repeatCount, Animation.RepeatBehavior repeatBehavior, Object subject, Animation.Dimension dimension, TimingHandler handler)
duration
- duration of the animation, in millisecondsrepeatCount
- the number of times this Animation will
be repeated. This is not necessarily an integer, i.e. an animation may
be repeated 2.5 times. repeatCount may be set to Animation.INFINITE,
in which case the animation will be repeated indefinitely.repeatBehavior
- controls whether an animation loops or reverse
when repeatingsubject
- object that will be animateddimension
- dimension of the animationhandler
- timing handler that will receive callbacks
for each animation event. The handler is responsible for
implementing the animation code itself (e.g. move a Camera or
change the color of a Glyph).public Animation createAnimation(int duration, double repeatCount, Animation.RepeatBehavior repeatBehavior, Object subject, Animation.Dimension dimension, TimingHandler handler, org.jdesktop.animation.timing.interpolation.Interpolator interpolator)
duration
- duration of the animation, in millisecondsrepeatCount
- the number of times this Animation will
be repeated. This is not necessarily an integer, i.e. an animation may
be repeated 2.5 timesrepeatBehavior
- controls whether an animation loops or reverse
when repeatingsubject
- object that will be animateddimension
- dimension of the animationhandler
- timing handler that will receive callbacks
for each animation event. The handler is responsible for
implementing the animation code itself (e.g. move a Camera or
change the color of a Glyph).interpolator
- an Interpolator, ie a functor that takes a float between 0 and 1
and returns a float between 0 and 1. By default a linear Interpolator is
used, but spline interpolators may be used to provide different animation
behaviors: slow in/slow out, fast in/slow out et caetera. You may also
provide your own interpolator.public Animation createCameraTranslation(int duration, Camera camera, Point2D.Double data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.camera
- camera to animatedata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as absolute target coordinates,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.EndAction
public Animation createCameraAltAnim(int duration, Camera camera, double data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.camera
- camera to animatedata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute target altitude,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createGlyphTranslation(int duration, Glyph glyph, Point2D.Double data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.glyph
- glyph to animatedata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as absolute target coordinates,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createGlyphSizeAnim(int duration, Glyph glyph, double data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.glyph
- glyph to animatedata
- animation data (size or size offset), interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute size,
otherwise it will be interpreted as a size offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createGlyphOrientationAnim(int duration, Glyph glyph, double data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.glyph
- glyph to animatedata
- animation data (angle or angle offset, in radian),
interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute orientation,
otherwise it will be interpreted as an orientation offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createGlyphFillColorAnim(int duration, Glyph glyph, float[] data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.glyph
- glyph to animatedata
- animation data (color or color offset, in the HSV space),
interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute color,
otherwise it will be interpreted as a color offset.
'data' should be an array of size 3, containing the hue,
saturation and brightness, in order.
H, S, and V are in the interval [0, 1]relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createGlyphBorderColorAnim(int duration, Glyph glyph, float[] data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.glyph
- glyph to animatedata
- animation data (color or color offset, in the HSV space),
interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute color,
otherwise it will be interpreted as a color offset.
'data' should be an array of size 3, containing the hue,
saturation and brightness, in order.
H, S, and V are in the interval [0, 1]relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createTranslucencyAnim(int duration, Translucent translucent, float data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.translucent
- Translucent object to animatedata
- animation data (alpha value or offset, in [0, 1] -
0 means transparent and 1 opaque),
interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute opacity,
otherwise it will be interpreted as an opacity offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createPortalTranslation(int duration, Portal portal, Point data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.portal
- portal to animatedata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as absolute target coordinates,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createPortalSizeAnim(int duration, Portal portal, int wdata, int hdata, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.portal
- portal to animatewdata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'wdata' will be interpreted as an absolute width,
otherwise it will be interpreted as an offset.hdata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'hdata' will be interpreted as an absolute height,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createLensMagAnim(int duration, FixedSizeLens lens, float data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.lens
- lens to animatedata
- animation data, interpreted according to the
'relative' boolean argument. If 'relative' is false, then
'data' will be interpreted as an absolute maximum magnification factor,
otherwise it will be interpreted as an offset.relative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createLensMagRadiusAnim(int duration, FixedSizeLens lens, float magData, int orData, int irData, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.lens
- lens to animatemagData
- target max magnification factor (absolute value or offset, depending on 'relative')orData
- target outer radius (absolute value or offset, depending on 'relative'),
in view coordinatesirData
- target inner radius (absolute value or offset, depending on 'relative'),
in view coordinates
Warning: outer radius and magnification should change in the same direction
(both should either increase or decrease), otherwise the behavior of the
resulting Animation is undefinedrelative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createLensRadiusAnim(int duration, FixedSizeLens lens, int orData, int irData, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.lens
- lens to animateorData
- target outer radius (absolute value or offset, depending on 'relative'),
in view coordinatesirData
- target inner radius (absolute value or offset, depending on 'relative'),
in view coordinatesrelative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.public Animation createPathAnim(int duration, DPath path, Point2D.Double[] data, boolean relative, org.jdesktop.animation.timing.interpolation.Interpolator interpolator, EndAction endAction)
duration
- duration of the animation, in milliseconds.path
- path to animatedata
- path animation datarelative
- true if 'data' is to be interpreted relatively.interpolator
- Interpolator that governs the time behavior of the
animation (constant speed, constant acceleration, slow in/slow out...)endAction
- a functor that will be executed when the animation
ends. May be set to null, in which case it is ignored.Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.