ca.sqlpower.wabit.swingui.chart.effect
Interface ChartAnimatorFactory

All Known Implementing Classes:
AbstractChartAnimatorFactory, BarChartAnimatorFactory, PieChartAnimatorFactory, ScatterChartAnimatorFactory

public interface ChartAnimatorFactory

Defines the general contract for classes that create animators for JFreeChart instances.


Method Summary
 boolean canAnimate(org.jfree.chart.JFreeChart chart)
          Returns true if this chart animation factory can animate the given chart.
 ChartAnimator createAnimator(org.jfree.chart.JFreeChart chart)
          Creates a new chart animator for the given chart.
 int getFrameCount()
          Returns the number of frames that the animations created by this factory will run for.
 int getFrameDelay()
          Returns the number of milliseconds between frames of the animations created by this factory.
 void setFrameCount(int frameCount)
          Sets the number of frames that the animations created by this factory will run for.
 void setFrameDelay(int frameDelay)
          Sets the number of milliseconds that should be between frames of the animations created by this factory.
 

Method Detail

canAnimate

boolean canAnimate(org.jfree.chart.JFreeChart chart)
Returns true if this chart animation factory can animate the given chart.

Parameters:
chart - The chart in question
Returns:
True if this factory can create an animation for chart; false otherwise.

createAnimator

ChartAnimator createAnimator(org.jfree.chart.JFreeChart chart)
                             throws CantAnimateException
Creates a new chart animator for the given chart.

Parameters:
chart - The chart to animate. Some aspects of the chart may be permanently modified as a side effect of this call (for example, disable autoranging on a bar chart's category axis), but no Swing timers will have been started.
Returns:
a new animator for the given chart. The animator will not be started.
Throws:
CantAnimateException - if canAnimate(JFreeChart) would return false for the given chart.

getFrameDelay

int getFrameDelay()
Returns the number of milliseconds between frames of the animations created by this factory.


setFrameDelay

void setFrameDelay(int frameDelay)
Sets the number of milliseconds that should be between frames of the animations created by this factory. Factories have useful defaults, so you don't need to call this method unless you want to customize the animation.


getFrameCount

int getFrameCount()
Returns the number of frames that the animations created by this factory will run for.


setFrameCount

void setFrameCount(int frameCount)
Sets the number of frames that the animations created by this factory will run for. Factories have useful defaults, so you don't need to call this method unless you want to customize the animation.



Copyright © 2009. All Rights Reserved.