|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zilonis.tool.ext.aerith.animation.ScreenTransition
public class ScreenTransition
This class is used to facilitate animated transitions in an application.
ScreenTransition is given a container in a Swing application. When the
application wishes to transition from one state of the application to
another, the startTransition method is called, which calls
back into the application to first reset the state of the application, then
set up the following state of the application. Then ScreenTransition runs an
animation from the previous state of the application to the new state.
REMIND: There is some confusion in this and the effects package about the use
of Component vs JComponent... If this framework is primarily intended for
Swing, then maybe it would be good to standardize on JComponent?
| Constructor Summary | |
|---|---|
ScreenTransition(javax.swing.JComponent transitionComponent,
TransitionTarget transitionTarget)
Constructor for ScreenTransition. |
|
| Method Summary | |
|---|---|
void |
begin()
Override of TimingTarget.begin(); nothing to do here. |
void |
end()
Override of TimingTarget.end(); switch the visibility of
the containerLayer and animationLayer and force repaint. |
java.awt.Container |
getContentPane()
Returns the content pane used in this ScreenTransition. |
boolean |
isTransitioning()
Utility method to query whether a transition is currently taking place |
void |
repeat()
|
void |
startTransition(int transitionTimeMS)
Begin the transition from the current application state to the next one. |
void |
timingEvent(float elapsedFraction)
Implementation of the TimingTarget interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenTransition(javax.swing.JComponent transitionComponent,
TransitionTarget transitionTarget)
transitionComponent - JComponent that the application wishes to run the transition
on.transitionTarget - Implementation of TransitionTarget interface
which will be called during transition process.| Method Detail |
|---|
public java.awt.Container getContentPane()
public void timingEvent(float elapsedFraction)
TimingTarget interface. This method
is called repeatedly during the transition animation. We change the
animation fraction in the AnimationManager and then force a repaint,
which will force the current transition state to be rendered.
public void begin()
TimingTarget.begin(); nothing to do here.
public void end()
TimingTarget.end(); switch the visibility of
the containerLayer and animationLayer and force repaint.
public boolean isTransitioning()
public void startTransition(int transitionTimeMS)
resetCurrentScreen() will be
called to allow the application to clean up the current screen and
setupNextScreen() will be called to allow the application
to set up the state of the next screen. After these calls, the transition
animation will begin.
REMIND: should be called from EDT only?
transitionTimeMS - The length of this transition in millisecondspublic void repeat()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||