By the time you read this article, JavaFX 1.2 will have been released. This version's many changes include changes to the Transition class. Because Transition changes can affect your JavaFX 1.1.1 transition-oriented code, I've prepared the following list of Transition-oriented changes to help you migrate that code to version 1.2:
- The Transition class now inherits from the Timeline class, which introduces new public-read protected cycleDuration and totalDuration members.
- Transition's interpolate member has been renamed to interpolator, to avoid a name conflict with Timeline's interpolate member.
- Transition's duration member has been removed from this class, but has been introduced into each of the Transition classes except for ParallelTransition and SequentialTransition.
- KeyFrame's timelines member has been dropped in favor of placing support for sub-timelines in ParallelTransition and SequentialTransition and their content variable's type has changed from Transition to Timeline.
- Transition no longer includes a timelineDirty member. Instead, a protected markDirty(): Boolean function has been added to Transition to accomplish the same task.
- Finally, Transition provides two functions for rebuilding the transition's keyframes:
public rebuild(): Void protected abstract rebuildKeyFrames(): java.lang.Object
Renaming interpolate to interpolator affects the Main.fx source files for the PathTDemo, RotateTDemo, and TranslateTDemo projects, but that's the only code change needed to make these demos work in JavaFX 1.2. The updated code for these demos is in the 1.2 directory in this article's code archive. The other demos are unaffected.