回答編集履歴

1

追記

2016/07/04 23:36

投稿

masaya_ohashi
masaya_ohashi

スコア9206

test CHANGED
@@ -37,3 +37,31 @@
37
37
  double currentAngle = rotate.getAngle(); // 現在の角度
38
38
 
39
39
  ```
40
+
41
+
42
+
43
+ ### 追記
44
+
45
+ 本当はJavaFXを美しく使うのならこう使うのがよいです。しかし、DoublePropertyというのがどういう働きをするのかよくわからないなら使うのはやめたほうがよいでしょう。
46
+
47
+ ```Java
48
+
49
+ Rotate rotate = new Rotate(0, 25, 25);
50
+
51
+ imageView.getTransforms().add(rotate);
52
+
53
+ DoubleProperty angleProperty = rotate.getAngle();
54
+
55
+
56
+
57
+ // 以降角度更新
58
+
59
+ angleProperty.setValue(angleProperty.getValue() + 1);
60
+
61
+
62
+
63
+ // 角度取得
64
+
65
+ double currentAngle = angleProperty.getValue();
66
+
67
+ ```