當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。