|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.swingui.chart.effect.AbstractChartAnimator
public abstract class AbstractChartAnimator
Base class that takes care of all the boilerplate code required for a typical implementation of ChartAnimator.
| Constructor Summary | |
|---|---|
AbstractChartAnimator(int frameCount,
int frameDelay)
Sets up the support infrastructure for a chart animator. |
|
| Method Summary | |
|---|---|
protected abstract void |
doFrame(int frame,
double pct)
Subclasses define their actual animation behaviour by overriding this method. |
int |
getFrameCount()
|
protected void |
setup()
Subclasses that wish to perform some setup action whenever the animation starts or restarts may override this method. |
void |
startAnimation()
Resets all bars to 0 then starts the animation timer. |
void |
stopAnimation()
Stops the animation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractChartAnimator(int frameCount,
int frameDelay)
frameCount - Total number of frames before the animation completesframeDelay - Amount of time (milliseconds) between each frame.| Method Detail |
|---|
protected abstract void doFrame(int frame,
double pct)
frame - The current frame number (of getFrameCount())pct - The percentage (between 0.0 and 1.0 inclusive) of the way that
the current frame is.public final void startAnimation()
ChartAnimator
startAnimation in interface ChartAnimatorprotected void setup()
startAnimation() before the invocation of
doFrame(int, double) with a frame number of 0.
public final void stopAnimation()
ChartAnimator
stopAnimation in interface ChartAnimatorpublic int getFrameCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||