org.tbee.swing.cardlayout
Class SlideAnimation

java.lang.Object
  extended by org.tbee.swing.cardlayout.SlideAnimation
All Implemented Interfaces:
Animation

public class SlideAnimation
extends java.lang.Object
implements Animation

The SlideAnimation is a class to animate the transition between one component and the other for AnimatingCardLayout. Based on the Dashboard code of Dmitry Markman.

Description

Since:
JDK1.1
Version:
$Revision: 1.9 $, $Date: 2007/12/23 09:26:19 $
Author:
Luca Lutterotti, Dmitry Markman

Field Summary
static java.lang.String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
SlideAnimation()
           
 
Method Summary
 java.awt.Component animate(java.awt.Component toHide, java.awt.Component toShow, AnimationListener listener)
          Draws an animation moving from 'first' to 'last'.
 java.awt.Component getAnimationPanel()
           
 boolean handlesVisibility()
          Does the animation handle its own visibility
 void setAnimationDuration(int animationDuration)
          set duration of the animation.
 void setDirection(boolean direction)
          set direction of the animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

SlideAnimation

public SlideAnimation()
Method Detail

setDirection

public void setDirection(boolean direction)
Description copied from interface: Animation
set direction of the animation. meaning of the param direction is the function of every particulatr animator

Specified by:
setDirection in interface Animation

setAnimationDuration

public void setAnimationDuration(int animationDuration)
Description copied from interface: Animation
set duration of the animation.

Specified by:
setAnimationDuration in interface Animation
Parameters:
animationDuration - duration of the animation in the ms

handlesVisibility

public boolean handlesVisibility()
Description copied from interface: Animation
Does the animation handle its own visibility

Specified by:
handlesVisibility in interface Animation
Returns:

animate

public java.awt.Component animate(java.awt.Component toHide,
                                  java.awt.Component toShow,
                                  AnimationListener listener)
Description copied from interface: Animation
Draws an animation moving from 'first' to 'last'. AnimationListener listens to the animation and is notified when the animation is finished.

Specified by:
animate in interface Animation
Returns:
a Component which the animation is drawn on.

getAnimationPanel

public java.awt.Component getAnimationPanel()


Copyright © 2010 KnowledgePlaza. All Rights Reserved.