public final class KeyFrame extends Object
Timeline
に沿って補間される一連の変数に対して、特定の時点におけるターゲット値を定義します。
開発者は、各変数に関連付けられたターゲット値およびInterpolator
を指定することによって、連続するキー・フレーム間の間隔に対する一連の変数の補間を制御します。変数は、指定された時間にターゲット値に到達するように補間されます。onFinished
関数が指定されている場合は、各KeyFrame
で呼び出されます。KeyFrame
にはオプションでname
を指定でき、指定した場合、キュー・ポイントがTimeline
に自動的に追加されるようになります。
Timeline
, KeyValue
, Interpolator
コンストラクタと説明 |
---|
KeyFrame(Duration time, EventHandler<ActionEvent> onFinished, KeyValue... values)
KeyFrame のコンストラクタ |
KeyFrame(Duration time, KeyValue... values)
KeyFrame のコンストラクタ |
KeyFrame(Duration time, String name, EventHandler<ActionEvent> onFinished, Collection<KeyValue> values)
KeyFrame のコンストラクタ |
KeyFrame(Duration time, String name, EventHandler<ActionEvent> onFinished, KeyValue... values)
KeyFrame のコンストラクタ |
KeyFrame(Duration time, String name, KeyValue... values)
KeyFrame のコンストラクタ |
修飾子と型 | メソッドと説明 |
---|---|
boolean |
equals(Object obj)
このオブジェクトと他のオブジェクトが等しいかどうかを示します。
|
String |
getName()
この
KeyFrame のname を返します。 |
EventHandler<ActionEvent> |
getOnFinished()
この
KeyFrame のonFinished イベント・ハンドラを返します。 |
Duration |
getTime()
この
KeyFrame の時間オフセットを返します。 |
Set<KeyValue> |
getValues()
KeyValue インスタンスの不変のSet を返します。 |
int |
hashCode()
この
KeyFrame オブジェクトのハッシュ・コードを返します。 |
String |
toString()
この
KeyFrame オブジェクトの文字列表現を返します。 |
public KeyFrame(Duration time, String name, EventHandler<ActionEvent> onFinished, Collection<KeyValue> values)
KeyFrame
のコンストラクタ
渡されたKeyValue
がnull
か、重複している場合は無視されます。
time
- time
name
- name
onFinished
- onFinished-handler
values
- KeyValue
インスタンスのObservableList
NullPointerException
- time
がnullの場合IllegalArgumentException
- time
が無効な場合(time
を参照)public KeyFrame(Duration time, String name, EventHandler<ActionEvent> onFinished, KeyValue... values)
KeyFrame
のコンストラクタ
渡されたKeyValue
がnull
か、重複している場合は無視されます。
time
- time
name
- name
onFinished
- onFinished-handler
values
- KeyValue
インスタンスNullPointerException
- time
がnullの場合IllegalArgumentException
- time
が無効な場合(time
を参照)public KeyFrame(Duration time, EventHandler<ActionEvent> onFinished, KeyValue... values)
KeyFrame
のコンストラクタtime
- time
onFinished
- onFinished-handler
values
- KeyValue
インスタンスNullPointerException
- time
がnullの場合IllegalArgumentException
- time
が無効な場合(time
を参照)public KeyFrame(Duration time, String name, KeyValue... values)
KeyFrame
のコンストラクタtime
- time
name
- name
values
- KeyValue
インスタンスNullPointerException
- time
がnullの場合IllegalArgumentException
- time
が無効な場合(time
を参照)public KeyFrame(Duration time, KeyValue... values)
KeyFrame
のコンストラクタtime
- time
values
- KeyValue
インスタンスNullPointerException
- time
がnullの場合IllegalArgumentException
- time
が無効な場合(time
を参照)public Duration getTime()
KeyFrame
の時間オフセットを返します。返されるDuration
は、単一サイクルのTimeline
において、KeyValues
の設定およびonFinished
関数変数の呼出しが行われる時間オフセットを示します。
KeyFrame
のtime
は、Duration.ZERO
以上にする必要があり、Duration.UNKNOWN
には設定できません。注意: time
の単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。
public EventHandler<ActionEvent> getOnFinished()
KeyFrame
のonFinished
イベント・ハンドラを返します。onFinished
イベント・ハンドラは、サイクルの経過時間がこのKeyFrame
の指定時間を超えたときに呼び出される関数です。onFinished
関数変数は、時間値に正確に一致することがなくても、経過時間が指定値を超えたときに呼び出されます。public String getName()
public String toString()
KeyFrame
オブジェクトの文字列表現を返します。public int hashCode()
KeyFrame
オブジェクトのハッシュ・コードを返します。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.