站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Animator (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.animator
Class Animator

java.lang.Object
  extended by org.netbeans.api.visual.animator.Animator

public abstract class Animator
extends Object

Represents an animator. An animator is registed to a scene animator and could be started. From that moment the scene animator automatically calls Animator.tick method for a solid period of time set by the scene animator. In the tick method the animation has to implemented. The animation should be independent on time-duration.

Since 2.2, it is possible to listener on important events of the animator using AnimatorListener interface.


Constructor Summary
protected Animator(SceneAnimator sceneAnimator)
          Creates an animator and assigns a scene animator.
 
Method Summary
 void addAnimatorListener(AnimatorListener listener)
          Adds an animator listener to the animator.
protected  Scene getScene()
          Returns a scene that is related to the scene animator.
 boolean isRunning()
          Returns whether the animation is running.
 void removeAnimatorListener(AnimatorListener listener)
          Removes an animator listener from the animator.
protected  void start()
          Registers and starts the animation.
protected abstract  void tick(double progress)
          Called for performing the animation based on a progress value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animator

protected Animator(SceneAnimator sceneAnimator)
Creates an animator and assigns a scene animator.

Parameters:
sceneAnimator - the scene animator
Method Detail

getScene

protected final Scene getScene()
Returns a scene that is related to the scene animator.

Returns:
the scene

start

protected final void start()
Registers and starts the animation.


isRunning

public final boolean isRunning()
Returns whether the animation is running.

Returns:
true if still running

tick

protected abstract void tick(double progress)
Called for performing the animation based on a progress value. The value is a double number in interval from 0.0 to 1.0 (including). The 0.0 value represents beginning, the 1.0 value represents the end.

Parameters:
progress - the progress

addAnimatorListener

public void addAnimatorListener(AnimatorListener listener)
Adds an animator listener to the animator.

Parameters:
listener - the animator listener
Since:
2.2

removeAnimatorListener

public void removeAnimatorListener(AnimatorListener listener)
Removes an animator listener from the animator.

Parameters:
listener - the animator listener
Since:
2.2

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.