public abstract class Animator
extends java.lang.Object
Animators must be hooked to figure in special ways. Refer to each implementation for the specific requirements. Animators are generally stateless, which allows them to be shared and prevents them from leaking memory.
Modifier and Type | Method and Description |
---|---|
void |
capture(IFigure figure)
Captures the final state of the given figure.
|
protected abstract java.lang.Object |
getCurrentState(IFigure figure)
Returns an object encapsulating the current state of the figure.
|
void |
init(IFigure figure)
Sets up the animator for the given figure to be animated.
|
protected boolean |
playback(IFigure figure)
Plays back the animation for the given figure and returns
true if successful. |
void |
playbackStarting(IFigure figure)
Sent as playback is starting for a given figure.
|
protected void |
recordFinalState(IFigure figure)
Records the final state information for a figure.
|
protected void |
recordInitialState(IFigure figure)
Records initial state information for the given figure.
|
void |
tearDown(IFigure figure)
Reverts any temporary changes made to the figure during animation.
|
public void capture(IFigure figure)
figure
- the containerprotected abstract java.lang.Object getCurrentState(IFigure figure)
figure
- the figureprotected boolean playback(IFigure figure)
true
if successful. This method does nothing by default and
return false
.figure
- the figure being animatedtrue
if playback was successfulpublic void playbackStarting(IFigure figure)
figure
- the figureprotected void recordFinalState(IFigure figure)
figure
- the figureprotected void recordInitialState(IFigure figure)
figure
- the container.public void init(IFigure figure)
tearDown(IFigure)
.figure
- the animated figurepublic void tearDown(IFigure figure)
figure
- the animated figureinit(IFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.