public final class RotateTransition extends Transition
Transitionでは、duration全体にわたる回転アニメーションを作成します。 このことは、nodeのrotate変数を一定の間隔で更新することによって行います。 角度値は度で指定します。
fromAngleが指定されている場合はそこから開始され、それ以外の場合はnodeのrotate値が使用されます。
toAngle値が指定されている場合はそこで停止され、それ以外の場合は開始値にbyAngleを加えたものが使用されます。
toAngleとbyAngleの両方が指定されている場合は、toAngleが優先されます。
コード・セグメントの例:
import javafx.scene.shape.*;
import javafx.animation.transition.*;
...
Rectangle rect = new Rectangle (100, 40, 100, 100);
rect.setArcHeight(50);
rect.setArcWidth(50);
rect.setFill(Color.VIOLET);
RotateTransition rt = new RotateTransition(Duration.millis(3000), rect);
rt.setByAngle(180);
rt.setCycleCount(4);
rt.setAutoReverse(true);
rt.play();
...
Transition, Animation| 型 | プロパティと説明 |
|---|---|
ObjectProperty<Point3D> |
axis
この
RotateTransitionの回転軸を指定します。 |
DoubleProperty |
byAngle
この
RotateTransitionの開始からの増分された停止角度値を指定します。 |
ObjectProperty<Duration> |
duration
この
RotateTransitionの期間。 |
DoubleProperty |
fromAngle
この
RotateTransitionの開始角度値を指定します。 |
ObjectProperty<Node> |
node
この
RotateTransitionのターゲット・ノード。 |
DoubleProperty |
toAngle
この
RotateTransitionの停止角度値を指定します。 |
interpolatorautoReverse, currentRate, currentTime, cycleCount, cycleDuration, delay, onFinished, rate, status, totalDurationAnimation.StatusINDEFINITE| コンストラクタと説明 |
|---|
RotateTransition()
RotateTransitionのコンストラクタ |
RotateTransition(Duration duration)
RotateTransitionのコンストラクタ |
RotateTransition(Duration duration, Node node)
RotateTransitionのコンストラクタ |
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectProperty<Point3D> |
axisProperty()
この
RotateTransitionの回転軸を指定します。 |
DoubleProperty |
byAngleProperty()
この
RotateTransitionの開始からの増分された停止角度値を指定します。 |
ObjectProperty<Duration> |
durationProperty()
この
RotateTransitionの期間。 |
DoubleProperty |
fromAngleProperty()
この
RotateTransitionの開始角度値を指定します。 |
Point3D |
getAxis()
プロパティaxisの値を取得します。
|
double |
getByAngle()
プロパティbyAngleの値を取得します。
|
Duration |
getDuration()
プロパティdurationの値を取得します。
|
double |
getFromAngle()
プロパティfromAngleの値を取得します。
|
Node |
getNode()
プロパティnodeの値を取得します。
|
double |
getToAngle()
プロパティtoAngleの値を取得します。
|
protected void |
interpolate(double frac)
メソッド
interpolate()はTransitionの実装を通して指定する必要があります。 |
ObjectProperty<Node> |
nodeProperty()
この
RotateTransitionのターゲット・ノード。 |
void |
setAxis(Point3D value)
プロパティaxisの値を設定します。
|
void |
setByAngle(double value)
プロパティbyAngleの値を設定します。
|
void |
setDuration(Duration value)
プロパティdurationの値を設定します。
|
void |
setFromAngle(double value)
プロパティfromAngleの値を設定します。
|
void |
setNode(Node value)
プロパティnodeの値を設定します。
|
void |
setToAngle(double value)
プロパティtoAngleの値を設定します。
|
DoubleProperty |
toAngleProperty()
この
RotateTransitionの停止角度値を指定します。 |
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<Node> nodeProperty
RotateTransitionのターゲット・ノード。
実行中のRotateTransitionのターゲットnodeは変更できません。 実行中のRotateTransitionのnodeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getNode(), setNode(Node)public final ObjectProperty<Duration> durationProperty
RotateTransitionの期間。
実行中のRotateTransitionのdurationは変更できません。 実行中のRotateTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
getDuration(), setDuration(Duration)public final ObjectProperty<Point3D> axisProperty
RotateTransitionの回転軸を指定します。 このaxisがnullの場合、回転軸にはnode.rotationAxisが使用されます。
実行中のRotateTransitionのaxisは変更できません。 実行中のRotateTransitionのaxisの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getAxis(), setAxis(Point3D)public final DoubleProperty fromAngleProperty
RotateTransitionの開始角度値を指定します。
実行中のRotateTransitionのfromAngleは変更できません。 実行中のRotateTransitionのfromAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNgetFromAngle(), setFromAngle(double)public final DoubleProperty toAngleProperty
RotateTransitionの停止角度値を指定します。
実行中のRotateTransitionのtoAngleは変更できません。 実行中のRotateTransitionのtoAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNgetToAngle(), setToAngle(double)public final DoubleProperty byAngleProperty
RotateTransitionの開始からの増分された停止角度値を指定します。
実行中のRotateTransitionのbyAngleは変更できません。 実行中のRotateTransitionのbyAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getByAngle(), setByAngle(double)public RotateTransition(Duration duration, Node node)
RotateTransitionのコンストラクタduration - RotateTransitionの期間node - 回転されるnodepublic RotateTransition(Duration duration)
RotateTransitionのコンストラクタduration - RotateTransitionの期間public RotateTransition()
RotateTransitionのコンストラクタpublic final void setNode(Node value)
RotateTransitionのターゲット・ノード。
実行中のRotateTransitionのターゲットnodeは変更できません。 実行中のRotateTransitionのnodeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final Node getNode()
RotateTransitionのターゲット・ノード。
実行中のRotateTransitionのターゲットnodeは変更できません。 実行中のRotateTransitionのnodeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final ObjectProperty<Node> nodeProperty()
RotateTransitionのターゲット・ノード。
実行中のRotateTransitionのターゲットnodeは変更できません。 実行中のRotateTransitionのnodeの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getNode(), setNode(Node)public final void setDuration(Duration value)
RotateTransitionの期間。
実行中のRotateTransitionのdurationは変更できません。 実行中のRotateTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
public final Duration getDuration()
RotateTransitionの期間。
実行中のRotateTransitionのdurationは変更できません。 実行中のRotateTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
public final ObjectProperty<Duration> durationProperty()
RotateTransitionの期間。
実行中のRotateTransitionのdurationは変更できません。 実行中のRotateTransitionのdurationの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
ノート: durationの単位はミリ秒ですが、粒度は基礎となるオペレーティング・システムによって異なり、一般的には大きくなります。 たとえば、デスクトップ・システム上のアニメーションは、通常、最大60fpsで実行され、その粒度は最大17ミリ秒になります。 durationをDuration.ZEROよりも小さい値に設定すると、IllegalArgumentExceptionが発生します。
getDuration(), setDuration(Duration)public final void setAxis(Point3D value)
RotateTransitionの回転軸を指定します。 このaxisがnullの場合、回転軸にはnode.rotationAxisが使用されます。
実行中のRotateTransitionのaxisは変更できません。 実行中のRotateTransitionのaxisの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final Point3D getAxis()
RotateTransitionの回転軸を指定します。 このaxisがnullの場合、回転軸にはnode.rotationAxisが使用されます。
実行中のRotateTransitionのaxisは変更できません。 実行中のRotateTransitionのaxisの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final ObjectProperty<Point3D> axisProperty()
RotateTransitionの回転軸を指定します。 このaxisがnullの場合、回転軸にはnode.rotationAxisが使用されます。
実行中のRotateTransitionのaxisは変更できません。 実行中のRotateTransitionのaxisの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getAxis(), setAxis(Point3D)public final void setFromAngle(double value)
RotateTransitionの開始角度値を指定します。
実行中のRotateTransitionのfromAngleは変更できません。 実行中のRotateTransitionのfromAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNpublic final double getFromAngle()
RotateTransitionの開始角度値を指定します。
実行中のRotateTransitionのfromAngleは変更できません。 実行中のRotateTransitionのfromAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNpublic final DoubleProperty fromAngleProperty()
RotateTransitionの開始角度値を指定します。
実行中のRotateTransitionのfromAngleは変更できません。 実行中のRotateTransitionのfromAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNgetFromAngle(), setFromAngle(double)public final void setToAngle(double value)
RotateTransitionの停止角度値を指定します。
実行中のRotateTransitionのtoAngleは変更できません。 実行中のRotateTransitionのtoAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNpublic final double getToAngle()
RotateTransitionの停止角度値を指定します。
実行中のRotateTransitionのtoAngleは変更できません。 実行中のRotateTransitionのtoAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNpublic final DoubleProperty toAngleProperty()
RotateTransitionの停止角度値を指定します。
実行中のRotateTransitionのtoAngleは変更できません。 実行中のRotateTransitionのtoAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
Double.NaNgetToAngle(), setToAngle(double)public final void setByAngle(double value)
RotateTransitionの開始からの増分された停止角度値を指定します。
実行中のRotateTransitionのbyAngleは変更できません。 実行中のRotateTransitionのbyAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final double getByAngle()
RotateTransitionの開始からの増分された停止角度値を指定します。
実行中のRotateTransitionのbyAngleは変更できません。 実行中のRotateTransitionのbyAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
public final DoubleProperty byAngleProperty()
RotateTransitionの開始からの増分された停止角度値を指定します。
実行中のRotateTransitionのbyAngleは変更できません。 実行中のRotateTransitionのbyAngleの値が変更された場合、新しい値を反映するには、アニメーションを停止し、再度開始する必要があります。
getByAngle(), setByAngle(double)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.