当前位置: 首页>>代码示例>>Java>>正文


Java Interpolator类代码示例

本文整理汇总了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;
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:15,代码来源:AnimationManager.java

示例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;
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:13,代码来源:FastInSlowOutInterpolator.java

示例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;
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:13,代码来源:SlowInSlowOutInterpolator.java

示例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;
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:14,代码来源:ConstantAccInterpolator.java

示例5: setInterpolator

import org.jdesktop.animation.timing.interpolation.Interpolator; //导入依赖的package包/类
/**
 * Sets the interpolator for this Animation.
 */
public void setInterpolator(Interpolator interpolator) {
    animator.setInterpolator(interpolator);
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:7,代码来源:Animation.java

示例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);
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:34,代码来源:AnimationFactory.java

示例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;
}
 
开发者ID:mediathekview,项目名称:MediathekView,代码行数:8,代码来源:Animator.java

示例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;
}
 
开发者ID:mediathekview,项目名称:MediathekView,代码行数:14,代码来源:Animator.java

示例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();
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:9,代码来源:IdentityInterpolator.java

示例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);
}
 
开发者ID:sharwell,项目名称:zgrnbviewer,代码行数:10,代码来源:SlowInSlowOutInterpolator2.java


注:本文中的org.jdesktop.animation.timing.interpolation.Interpolator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。