AnimationStep.java :  » XML-UI » xui32 » com » xoetrope » swing » animation » Java Open Source

Java Open Source » XML UI » xui32 
xui32 » com » xoetrope » swing » animation » AnimationStep.java
package com.xoetrope.swing.animation;

import java.awt.Graphics2D;
import org.jdesktop.animation.timing.Animator;

/**
 * A step in the animation such as a variation of colour or position.
 *
 * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
 * the GNU Public License (GPL), please see license.txt for more details. If
 * you make commercial use of this software you must purchase a commercial
 * license from Xoetrope.</p>
 * <p> $Revision: 1.5 $</p>
 */
public interface AnimationStep
{
  /**
   * Adjust the settings for the next step.
   */  
  public void reset();

  /**
   * Advance to the next step in the animation
   * 
   * @param g2 the graphics context
   * @param at the animation thread on which this object is running
   */  
  public void apply( Animator at, Graphics2D g2 );

  /**
   * Adjust the settings for the next step.
   * 
   * @param at the animation thread on which this object is running
   */  
  public void step( Animator at );
  
  /**
   * Is the animation loop finished
   * 
   * @param at the animation thread on which this object is running
   * @return true if the animation has completed
   */  
  public boolean isFinished( Animator at );
  
  /**
   * Is the animation loop still active/running
   * 
   * @param at the animation thread on which this object is running
   * @return true if the animation has started and is still in progress
   */  
  public boolean isAnimated( Animator at );
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.