public final class StrokeTransition extends Transition
Transitionでは、duration全体にわたって図形のストロークの色を変化させるアニメーションを作成します。 このことは、shapeのstroke変数を一定の間隔で更新することによって行います。
fromValueが指定されている場合はそこから開始され、それ以外の場合はshapeのstroke値が使用されます (この場合、stroke値はColorにする必要があります)。
toValue値で停止されます。
コード・セグメントの例:
import javafx.scene.shape.*;
import javafx.animation.transition.*;
...
Rectangle rect = new Rectangle (100, 40, 100, 100);
rect.setArcHeight(50);
rect.setArcWidth(50);
rect.setFill(null);
StrokeTransition st = new StrokeTransition(Duration.millis(3000), rect, Color.RED, Color.BLUE);
st.setCycleCount(4);
st.setAutoReverse(true);
st.play();
...
Transition, Animation| 型 | プロパティと説明 |
|---|---|
ObjectProperty<Duration> |
duration
この
StrokeTransitionの期間。 |
ObjectProperty<Color> |
fromValue
この
StrokeTransitionの開始色値を指定します。 |
ObjectProperty<Shape> |
shape
この
StrokeTransitionのターゲット図形。 |
ObjectProperty<Color> |
toValue
この
StrokeTransitionの停止色値を指定します。 |
interpolatorautoReverse, currentRate, currentTime, cycleCount, cycleDuration, delay, onFinished, rate, status, totalDurationAnimation.StatusINDEFINITE| コンストラクタと説明 |
|---|
StrokeTransition()
StrokeTransitionのコンストラクタ |
StrokeTransition(Duration duration)
StrokeTransitionのコンストラクタ |
StrokeTransition(Duration duration, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタ |
StrokeTransition(Duration duration, Shape shape)
StrokeTransitionのコンストラクタ |
StrokeTransition(Duration duration, Shape shape, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタ |
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectProperty<Duration> |
durationProperty()
この
StrokeTransitionの期間。 |
ObjectProperty<Color> |
fromValueProperty()
この
StrokeTransitionの開始色値を指定します。 |
Duration |
getDuration()
プロパティdurationの値を取得します。
|
Color |
getFromValue()
プロパティfromValueの値を取得します。
|
Shape |
getShape()
プロパティshapeの値を取得します。
|
Color |
getToValue()
プロパティtoValueの値を取得します。
|
protected void |
interpolate(double frac)
メソッド
interpolate()はTransitionの実装を通して指定する必要があります。 |
void |
setDuration(Duration value)
プロパティdurationの値を設定します。
|
void |
setFromValue(Color value)
プロパティfromValueの値を設定します。
|
void |
setShape(Shape value)
プロパティshapeの値を設定します。
|
void |
setToValue(Color value)
プロパティtoValueの値を設定します。
|
ObjectProperty<Shape> |
shapeProperty()
この
StrokeTransitionのターゲット図形。 |
ObjectProperty<Color> |
toValueProperty()
この
StrokeTransitionの停止色値を指定します。 |
getCachedInterpolator, getInterpolator, getParentTargetNode, interpolatorProperty, setInterpolatorautoReverseProperty, 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, totalDurationPropertypublic final ObjectProperty<Shape> shapeProperty
StrokeTransitionのターゲット図形。
実行中のStrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getShape(), setShape(Shape)public final ObjectProperty<Duration> durationProperty
StrokeTransitionの期間。
実行中のStrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
getDuration(), setDuration(Duration)public final ObjectProperty<Color> fromValueProperty
StrokeTransitionの開始色値を指定します。
実行中のStrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullgetFromValue(), setFromValue(Color)public final ObjectProperty<Color> toValueProperty
StrokeTransitionの停止色値を指定します。
実行中のStrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullgetToValue(), setToValue(Color)public StrokeTransition(Duration duration, Shape shape, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタduration - StrokeTransitionの期間shape - 塗りつぶしがアニメーション化されるshapefromValue - カラーアニメーションの開始値toValue - カラーアニメーションの終了値public StrokeTransition(Duration duration, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタduration - StrokeTransitionの期間fromValue - カラーアニメーションの開始値toValue - カラーアニメーションの終了値public StrokeTransition(Duration duration, Shape shape)
StrokeTransitionのコンストラクタduration - StrokeTransitionの期間shape - ストローク・ペイントがアニメーション化されるshapepublic StrokeTransition(Duration duration)
StrokeTransitionのコンストラクタduration - StrokeTransitionの期間public StrokeTransition()
StrokeTransitionのコンストラクタpublic final void setShape(Shape value)
StrokeTransitionのターゲット図形。
実行中のStrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final Shape getShape()
StrokeTransitionのターゲット図形。
実行中のStrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final ObjectProperty<Shape> shapeProperty()
StrokeTransitionのターゲット図形。
実行中のStrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getShape(), setShape(Shape)public final void setDuration(Duration value)
StrokeTransitionの期間。
実行中のStrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
public final Duration getDuration()
StrokeTransitionの期間。
実行中のStrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
public final ObjectProperty<Duration> durationProperty()
StrokeTransitionの期間。
実行中のStrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
getDuration(), setDuration(Duration)public final void setFromValue(Color value)
StrokeTransitionの開始色値を指定します。
実行中のStrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullpublic final Color getFromValue()
StrokeTransitionの開始色値を指定します。
実行中のStrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullpublic final ObjectProperty<Color> fromValueProperty()
StrokeTransitionの開始色値を指定します。
実行中のStrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullgetFromValue(), setFromValue(Color)public final void setToValue(Color value)
StrokeTransitionの停止色値を指定します。
実行中のStrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullpublic final Color getToValue()
StrokeTransitionの停止色値を指定します。
実行中のStrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullpublic final ObjectProperty<Color> toValueProperty()
StrokeTransitionの停止色値を指定します。
実行中のStrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
nullgetToValue(), setToValue(Color)protected void interpolate(double frac)
interpolate()はTransitionの実装を通して指定する必要があります。 Transitionが実行されている間、このメソッドは各フレームで呼び出されます。 パラメータでアニメーションの現在位置を定義します。 比率は、先頭では0.0、末尾では1.0になります。 パラメータがどのように増加するかはinterpolatorによって異なります。たとえば、interpolatorがInterpolator.LINEARの場合、比率は線形的に増加します。 ユーザーがこのメソッドを直接呼び出すことはできません。 interpolate、クラスTransitionfrac - 相対位置Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.