- java.lang.Object
- 
- javafx.animation.Animation
- 
- javafx.animation.Timeline
 
 
- 
 public final class Timeline extends Animation Timelineを使用して、すべてのWritableValueのフリー・フォーム・アニメーションを定義することができます。たとえば、すべてJavaFX Propertiesです。Timelineは、1つ以上のKeyFrameで定義し、個々のKeyFrameをKeyFrame.timeで指定した順序で順番に処理するために使用します。 アニメーション化されるプロパティは、KeyFrame.valuesでキー値として定義し、Timelineの初期位置(Timelineの方向によって異なる)を基準にしてKeyFrameの指定時間にターゲット・キー値に(またはターゲット・キー値から)補間されます。Timelineでは、個々のKeyFrameは指定された時間間隔が経過した時点以降に処理され、KeyFrameの処理タイミングは保証されません。Animation.cycleDurationProperty()は、TimelineのKeyFrameの最大時間値に設定されます。time==0sの瞬間にKeyFrameが指定されていない場合は、Animation.play()またはAnimation.playFromStart()の呼出し時点における最新のターゲット値を使用して合成されます。実行中の TimelineのkeyFramesは変更できません。 実行中のTimelineのkeyFramesの値が変更された場合、新しい値を反映するには、停止して再度開始する必要があります。単純なTimelineの作成例を次に示します。 final Timeline timeline = new Timeline(); timeline.setCycleCount(2); timeline.setAutoReverse(true); timeline.getKeyFrames().add(new KeyFrame(Duration.millis(5000), new KeyValue (node.translateXProperty(), 25))); timeline.play();このTimelineは10秒間実行され、ノードはx軸に沿って値25までアニメーション化され、2回目のサイクルに0まで戻ります。 警告: 実行中のタイムラインはFXランタイムから参照されています。 Timelineを無限にした場合、適切に停止しないと、メモリー・リークが発生する可能性があります。 アニメーション化されるプロパティを持つすべてのオブジェクトがガベージ・コレクションの対象となるわけではありません。 
- 
- 
プロパティのサマリー- 
クラス javafx.animation.Animationで宣言されたプロパティautoReverse, currentRate, currentTime, cycleCount, cycleDuration, delay, onFinished, rate, status, totalDuration
 
- 
 - 
ネストされたクラスのサマリー- 
クラス javafx.animation.Animationで宣言されたネストされたクラス/インタフェースAnimation.Status
 
- 
 - 
フィールドのサマリー- 
クラス javafx.animation.Animationで宣言されたフィールドINDEFINITE
 
- 
 - 
メソッドのサマリーすべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 ObservableList<KeyFrame>getKeyFrames()このTimelineのKeyFramesを返します。- 
クラス javafx.animation.Animationで宣言されたメソッドautoReverseProperty, currentRateProperty, currentTimeProperty, cycleCountProperty, cycleDurationProperty, delayProperty, getCuePoints, getCurrentRate, getCurrentTime, getCycleCount, getCycleDuration, getDelay, getOnFinished, getRate, getStatus, getTargetFramerate, getTotalDuration, isAutoReverse, jumpTo, jumpTo, onFinishedProperty, pause, play, playFrom, playFrom, playFromStart, rateProperty, setAutoReverse, setCycleCount, setCycleDuration, setDelay, setOnFinished, setRate, setStatus, statusProperty, stop, totalDurationProperty
 
- 
 
- 
- 
- 
コンストラクタの詳細- 
Timelinepublic Timeline(double targetFramerate, KeyFrame... keyFrames)Timelineのコンストラクタ。 このコンストラクタでは、Animation.targetFramerateを定義できます。- パラメータ:
- targetFramerate- この- Timelineのカスタム・ターゲット・フレームレート
- keyFrames- この- Timelineのキー・フレーム
 
 - 
Timelinepublic Timeline(KeyFrame... keyFrames) Timelineのコンストラクタ。- パラメータ:
- keyFrames- この- Timelineのキー・フレーム
 
 - 
Timelinepublic Timeline(double targetFramerate) Timelineのコンストラクタ。 このコンストラクタでは、Animation.targetFramerateを定義できます。- パラメータ:
- targetFramerate- この- Timelineのカスタム・ターゲット・フレームレート
 
 - 
Timelinepublic Timeline() Timelineのコンストラクタ。
 
- 
 - 
メソッドの詳細- 
getKeyFramespublic final ObservableList<KeyFrame> getKeyFrames() このTimelineのKeyFramesを返します。- 戻り値:
- KeyFrames
 
 
- 
 
-