本文整理汇总了Java中org.jdesktop.animation.timing.interpolation.Interpolator类的典型用法代码示例。如果您正苦于以下问题:Java Interpolator类的具体用法?Java Interpolator怎么用?Java Interpolator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Interpolator类属于org.jdesktop.animation.timing.interpolation包,在下文中一共展示了Interpolator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAnimation
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
Animation createAnimation(int duration,
double repeatCount,
Animation.RepeatBehavior repeatBehavior,
Object subject,
Animation.Dimension dimension,
TimingHandler handler,
Interpolator interpolator) {
Animation retval = new Animation(this, duration, repeatCount,
repeatBehavior, subject,
dimension, handler);
retval.setTimer(new TickSource(tickThread));
retval.setInterpolator(interpolator);
return retval;
}
示例2: getInstance
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns Interpolator instance
*
* @return an Interpolator that implements fast in, slow out interpolation
*/
public static Interpolator getInstance() {
//interpolator has no state, hence we share it among all animations
//XXX I'm assuming that the underlying SplineInterpolator is thread-safe.
//This is almost self-evident, but may be worth checking
return INSTANCE;
}
示例3: getInstance
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns Interpolator instance
*
* @return an Interpolator that implements slow in, slow out interpolation
*/
public static Interpolator getInstance() {
//interpolator has no state, hence we share it among all animations
//XXX I'm assuming that the underlying SplineInterpolator is thread-safe.
//This is almost self-evident, but may be worth checking
return INSTANCE;
}
示例4: getInstance
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns Interpolator instance
*
* @return an Interpolator that implements constant acceleration
* interpolation
*/
public static Interpolator getInstance() {
//interpolator has no state, hence we share it among all animations
//XXX I'm assuming that the underlying SplineInterpolator is thread-safe.
//This is almost self-evident, but may be worth checking
return INSTANCE;
}
示例5: setInterpolator
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Sets the interpolator for this Animation.
*/
public void setInterpolator(Interpolator interpolator) {
animator.setInterpolator(interpolator);
}
示例6: createAnimation
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Creates a new Animation object that will be handled by this
* AnimationManager.
*
* @param duration duration of the animation, in milliseconds
* @param repeatCount 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
* @param repeatBehavior controls whether an animation loops or reverse when
* repeating
* @param subject object that will be animated
* @param dimension dimension of the animation
* @param handler 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).
* @param 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 createAnimation(int duration,
double repeatCount,
Animation.RepeatBehavior repeatBehavior,
Object subject,
Animation.Dimension dimension,
TimingHandler handler,
Interpolator interpolator) {
return animationManager.createAnimation(duration, repeatCount, repeatBehavior,
subject, dimension, handler, interpolator);
}
示例7: getInterpolator
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns the interpolator for the animation.
* @return interpolator that the initial animation cycle uses
*/
public Interpolator getInterpolator() {
return interpolator;
}
示例8: setInterpolator
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Sets the interpolator for the animation cycle. The default
* interpolator is {@link LinearInterpolator}.
* @param interpolator the interpolation to use each animation cycle
* @throws IllegalStateException if animation is already running; this
* parameter may only be changed prior to starting the animation or
* after the animation has ended
* @see #isRunning()
*/
public void setInterpolator(Interpolator interpolator) {
throwExceptionIfRunning();
this.interpolator = interpolator;
}
示例9: getInstance
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns Interpolator instance
*
* @return an Interpolator that implements identity interpolation
*/
public static Interpolator getInstance() {
return LinearInterpolator.getInstance();
}
示例10: getInstance
import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
* Returns Interpolator instance
*
* @return an Interpolator that implements a more pronounced slow in, slow
* out interpolation
*/
public static Interpolator getInstance() {
return getInstance(4);
}