- java.lang.Object
-
- javafx.animation.Animation
-
- javafx.animation.Transition
-
- javafx.animation.StrokeTransition
-
public final class StrokeTransition extends Transition
このTransitionでは、duration全体にわたって図形のストロークの色を変化させるアニメーションを作成します。 このことは、shapeのstroke変数を一定の間隔で更新することによって行います。fromValueが指定されている場合はそこから開始され、それ以外の場合はshapeのstroke値が使用されます (この場合、stroke値はColorにする必要があります)。toValue値で停止されます。コード・セグメントの例:
import javafx.scene.shape.*; import javafx.animation.*; ... 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(); ...- 導入されたバージョン:
- JavaFX 2.0
- 関連項目:
Transition,Animation
-
-
プロパティのサマリー
プロパティ 型 プロパティ 説明 ObjectProperty<Duration>durationこのStrokeTransitionの期間。ObjectProperty<Color>fromValueこのStrokeTransitionの開始色値を指定します。ObjectProperty<Shape>shapeこのStrokeTransitionのターゲット図形。ObjectProperty<Color>toValueこのStrokeTransitionの停止色値を指定します。-
クラスjavafx.animation.Animationから継承されたプロパティ
autoReverse, currentRate, currentTime, cycleCount, cycleDuration, delay, onFinished, rate, status, totalDuration
-
クラスjavafx.animation.Transitionから継承されたプロパティ
interpolator
-
-
ネストされたクラスのサマリー
-
クラスjavafx.animation.Animationから継承されたネストされたクラス/インタフェース
Animation.Status
-
-
フィールドのサマリー
-
クラスjavafx.animation.Animationから継承されたフィールド
INDEFINITE
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 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の開始色値を指定します。DurationgetDuration()プロパティdurationの値を取得します。ColorgetFromValue()プロパティfromValueの値を取得します。ShapegetShape()プロパティshapeの値を取得します。ColorgetToValue()プロパティtoValueの値を取得します。protected voidinterpolate(double frac)メソッドinterpolate()はTransitionの実装を通して指定する必要があります。voidsetDuration(Duration value)プロパティdurationの値を設定します。voidsetFromValue(Color value)プロパティfromValueの値を設定します。voidsetShape(Shape value)プロパティshapeの値を設定します。voidsetToValue(Color value)プロパティtoValueの値を設定します。ObjectProperty<Shape>shapeProperty()このStrokeTransitionのターゲット図形。ObjectProperty<Color>toValueProperty()このStrokeTransitionの停止色値を指定します。-
クラス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
-
クラス java.lang.Objectから継承されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、toString、wait、wait、wait
-
クラスjavafx.animation.Transitionから継承されたメソッド
getCachedInterpolator, getInterpolator, getParentTargetNode, interpolatorProperty, setInterpolator
-
-
-
-
プロパティの詳細
-
shape
public final ObjectProperty<Shape> shapeProperty
このStrokeTransitionのターゲット図形。実行中の
StrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- 関連項目:
getShape(),setShape(Shape)
-
duration
public final ObjectProperty<Duration> durationProperty
このStrokeTransitionの期間。実行中の
StrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。注意:
durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。- デフォルト値:
- 400ms
- 関連項目:
getDuration(),setDuration(Duration)
-
fromValue
public final ObjectProperty<Color> fromValueProperty
このStrokeTransitionの開始色値を指定します。実行中の
StrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- デフォルト値:
null- 関連項目:
getFromValue(),setFromValue(Color)
-
toValue
public final ObjectProperty<Color> toValueProperty
このStrokeTransitionの停止色値を指定します。実行中の
StrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- デフォルト値:
null- 関連項目:
getToValue(),setToValue(Color)
-
-
コンストラクタの詳細
-
StrokeTransition
public StrokeTransition(Duration duration, Shape shape, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタ- パラメータ:
duration-StrokeTransitionの期間shape- 塗りつぶしがアニメーション化されるshapefromValue- カラーアニメーションの開始値toValue- カラーアニメーションの終了値
-
StrokeTransition
public StrokeTransition(Duration duration, Color fromValue, Color toValue)
StrokeTransitionのコンストラクタ- パラメータ:
duration-StrokeTransitionの期間fromValue- カラーアニメーションの開始値toValue- カラーアニメーションの終了値
-
StrokeTransition
public StrokeTransition(Duration duration, Shape shape)
StrokeTransitionのコンストラクタ- パラメータ:
duration-StrokeTransitionの期間shape- ストローク・ペイントがアニメーション化されるshape
-
StrokeTransition
public StrokeTransition(Duration duration)
StrokeTransitionのコンストラクタ- パラメータ:
duration-StrokeTransitionの期間
-
StrokeTransition
public StrokeTransition()
StrokeTransitionのコンストラクタ
-
-
メソッドの詳細
-
setShape
public final void setShape(Shape value)
プロパティshapeの値を設定します。- プロパティの説明:
- この
StrokeTransitionのターゲット図形。実行中の
StrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
-
getShape
public final Shape getShape()
プロパティshapeの値を取得します。- プロパティの説明:
- この
StrokeTransitionのターゲット図形。実行中の
StrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
-
shapeProperty
public final ObjectProperty<Shape> shapeProperty()
このStrokeTransitionのターゲット図形。実行中の
StrokeTransitionのターゲットshapeは変更できません。 実行中のStrokeTransitionのshapeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- 関連項目:
getShape(),setShape(Shape)
-
setDuration
public final void setDuration(Duration value)
プロパティdurationの値を設定します。- プロパティの説明:
- この
StrokeTransitionの期間。実行中の
StrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。注意:
durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。 - デフォルト値:
- 400ms
-
getDuration
public final Duration getDuration()
プロパティdurationの値を取得します。- プロパティの説明:
- この
StrokeTransitionの期間。実行中の
StrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。注意:
durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。 - デフォルト値:
- 400ms
-
durationProperty
public final ObjectProperty<Duration> durationProperty()
このStrokeTransitionの期間。実行中の
StrokeTransitionのdurationは変更できません。 実行中のStrokeTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。注意:
durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。- デフォルト値:
- 400ms
- 関連項目:
getDuration(),setDuration(Duration)
-
setFromValue
public final void setFromValue(Color value)
プロパティfromValueの値を設定します。- プロパティの説明:
- この
StrokeTransitionの開始色値を指定します。実行中の
StrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。 - デフォルト値:
null
-
getFromValue
public final Color getFromValue()
プロパティfromValueの値を取得します。- プロパティの説明:
- この
StrokeTransitionの開始色値を指定します。実行中の
StrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。 - デフォルト値:
null
-
fromValueProperty
public final ObjectProperty<Color> fromValueProperty()
このStrokeTransitionの開始色値を指定します。実行中の
StrokeTransitionのfromValueは変更できません。 実行中のStrokeTransitionのfromValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- デフォルト値:
null- 関連項目:
getFromValue(),setFromValue(Color)
-
setToValue
public final void setToValue(Color value)
プロパティtoValueの値を設定します。- プロパティの説明:
- この
StrokeTransitionの停止色値を指定します。実行中の
StrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。 - デフォルト値:
null
-
getToValue
public final Color getToValue()
プロパティtoValueの値を取得します。- プロパティの説明:
- この
StrokeTransitionの停止色値を指定します。実行中の
StrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。 - デフォルト値:
null
-
toValueProperty
public final ObjectProperty<Color> toValueProperty()
このStrokeTransitionの停止色値を指定します。実行中の
StrokeTransitionのtoValueは変更できません。 実行中のStrokeTransitionのtoValueの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。- デフォルト値:
null- 関連項目:
getToValue(),setToValue(Color)
-
interpolate
protected void interpolate(double frac)
メソッドinterpolate()はTransitionの実装を通して指定する必要があります。Transitionが実行されている間、このメソッドは各フレームで呼び出されます。 パラメータでアニメーションの現在位置を定義します。 比率は、先頭では0.0、末尾では1.0になります。 パラメータがどのように増加するかはinterpolatorによって異なります。たとえば、interpolatorがInterpolator.LINEARの場合、比率は線形的に増加します。 ユーザーがこのメソッドを直接呼び出すことはできません。- 定義:
interpolate、クラス:Transition- パラメータ:
frac- 相対位置
-
-