Skip to content

Commit d51a6a5

Browse files
Align animation docs with APIs
1 parent c932450 commit d51a6a5

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs/animation/CustomPropertyInterpolators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Radiance Animation supports interpolation of primitive values - such as integers
44

55
For both cases the application code needs to provide one or more implementations of the `PropertyInterpolator` interface. This interface has two methods.
66

7-
The `public Class getBasePropertyClass()` is used to choose the property interpolator in the `Timeline.addPropertyToInterpolate(String, Object, Object)`. Internally, all registered property interpolators are queried to check whether they support the specified *from* and *to* values using the `Class.isAssignableFrom(Class)`. The **first** property interpolator that has a match for both values will be used.
7+
The `public Class getBasePropertyClass()` is used to choose the property interpolator in the `Timeline.Builder.addPropertyToInterpolate(String, Object, Object)`. Internally, all registered property interpolators are queried to check whether they support the specified *from* and *to* values using the `Class.isAssignableFrom(Class)`. The **first** property interpolator that has a match for both values will be used.
88

99
For example, the `PointInterpolator` in the core AWT property interpolator source (`AWTPropertyInterpolators` class) has the following implementation of this method:
1010

docs/animation/SimpleTimelineScenario.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ A quick walkthrough:
136136
* Lines 2-6 specify the fields that store the center and the color of the explosion.
137137
* Line 8 specifies the set that stores all the single explosions of this volley explosion.
138138
* Lines 17-59 return a timeline scenario that implements this volley explosion:
139-
** Line 18 creates a parallel timeline. **Each** single explosion is implemented as a separate timeline.
140-
** Line 20 computes a random duration for this scenario.
141-
** Lines 21 and 24 create 54 single explosions.
142-
** Lines 21, 27 and 28 create single explosions at almost evenly distributed angles (every 20 degrees).
143-
** Lines 22, 24 and 30-39 create single explosions at almost evenly distributed distance from the center (three for each angle).
144-
** Lines 41-42 create the `SingleExplosion` object.
145-
** Lines 43-49 create the timeline that interpolates the relevant properties of that object. Each timeline has a random duration.
146-
** Line 54 adds the created timeline to the scenario.
139+
* Line 18 creates a parallel timeline. **Each** single explosion is implemented as a separate timeline.
140+
* Line 20 computes a random duration for this scenario.
141+
* Lines 21 and 24 create 54 single explosions.
142+
* Lines 21, 27 and 28 create single explosions at almost evenly distributed angles (every 20 degrees).
143+
* Lines 22, 24 and 30-39 create single explosions at almost evenly distributed distance from the center (three for each angle).
144+
* Lines 41-42 create the `SingleExplosion` object.
145+
* Lines 43-49 create the timeline that interpolates the relevant properties of that object. Each timeline has a random duration.
146+
* Line 54 adds the created timeline to the scenario.
147147
* The scenario returned on line 58 has 54 different timelines, one for each single explosion.
148148
* Lines 61-67 paint all the single explosions of this volley explosion.
149149

docs/animation/TimelineAdditionalConfiguration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Timeline duration
22

3-
By default, a Radiance timeline runs for 500 milliseconds. To change the default timeline duration use the `Timeline.setDuration(long)` API, passing the required duration in milliseconds. At runtime, the timeline [interpolates](TimelineInterpolatingFields.md) all registered properties and [notifies](TimelineLifecycle.md) all registered listeners. Note that while the number of timeline pulses is directly proportional to the timeline duration, the actual number of pulses, as well as the intervals between each successive pair of pulses depends on the current load of the system and the virtual machine. As such, the application code **must not** make any assumptions about when the timeline pulses will happen, and how many pulses will happen throughout the duration of the timeline.
3+
By default, a Radiance timeline runs for 500 milliseconds. To change the default timeline duration use the `Timeline.Builder.setDuration(long)` API, passing the required duration in milliseconds. At runtime, the timeline [interpolates](TimelineInterpolatingFields.md) all registered properties and [notifies](TimelineLifecycle.md) all registered listeners. Note that while the number of timeline pulses is directly proportional to the timeline duration, the actual number of pulses, as well as the intervals between each successive pair of pulses depends on the current load of the system and the virtual machine. As such, the application code **must not** make any assumptions about when the timeline pulses will happen, and how many pulses will happen throughout the duration of the timeline.
44

5-
The `Timeline.setInitialDelay(long)` method specifies the number of milliseconds the timeline should wait after the application code to `play()` before starting firing the timeline pulses. For a timeline with no initial delay, the following events [are fired](TimelineLifecycle.md):
5+
The `Timeline.Builder.setInitialDelay(long)` method specifies the number of milliseconds the timeline should wait after the application code to `play()` before starting firing the timeline pulses. For a timeline with no initial delay, the following events [are fired](TimelineLifecycle.md):
66

77
* **idle** -> **ready** immediately after call to `Timeline.play()`
88
* **ready** -> **playing forward** immediately afterwards

docs/animation/TimelineLifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ Simple application scenarios create timelines, configure them with fields to int
9191
* `TimelineCallback.onTimelineStateChanged()` - this is called whenever the **timeline state** is changed. For example, calling `Timeline.suspend()` will notify all the registered listeners that the timeline has changed its state from **playing** to **suspended**.
9292
* `TimelineCallback.onTimelinePulse()` - this is called on every **timeline pulse**.
9393

94-
The second method can be used by applications that do not wish to add public setters for all the fields that participate in the timelines. Instead of using the `Timeline.addPropertyToInterpolate()` to [interpolate the fields](TimelineInterpolatingFields.md) via public setters, a timeline callback that interpolates the fields directly in the `onTimelinePulse()` can be used.
94+
The second method can be used by applications that do not wish to add public setters for all the fields that participate in the timelines. Instead of using the `Timeline.Builder.addPropertyToInterpolate()` to [interpolate the fields](TimelineInterpolatingFields.md) via public setters, a timeline callback that interpolates the fields directly in the `onTimelinePulse()` can be used.

docs/animation/UIToolkitSupport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The core Animation library provides special **repaint timelines** that are usual
2626

2727
### Respecting the threading rules
2828

29-
If the main timeline object is an AWT `Component`, all fields registered with the `Timeline.addPropertyToInterpolate` methods will be changed on the event dispatch thread.
29+
If the main timeline object is an AWT `Component`, all fields registered with the `Timeline.Builder.addPropertyToInterpolate` methods will be changed on the event dispatch thread.
3030

3131
In the [simple Swing example](SimpleSwingExample.md) that interpolates the foreground color of a button on mouse rollover, the timeline is configured as
3232

0 commit comments

Comments
 (0)