Mercurial > hg > Members > sugi > javafx
annotate src/alice/test/topology/aquarium/fx/UpdateData.java @ 16:5e6d40908c60
delete bug
author | e095732 |
---|---|
date | Sun, 03 Feb 2013 17:49:26 +0900 |
parents | 3458bde834d3 |
children | 9bacc8b30c4b |
rev | line source |
---|---|
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
1 package alice.test.topology.aquarium.fx; |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
2 |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
3 import alice.codesegment.CodeSegment; |
15 | 4 import alice.datasegment.CommandType; |
5 import alice.datasegment.Receiver; | |
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
6 |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
7 public class UpdateData extends CodeSegment { |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
8 |
15 | 9 private Receiver data1 = ids.create(CommandType.PEEK); |
10 private Receiver data2 = ids.create(CommandType.TAKE); | |
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
11 |
15 | 12 public UpdateData(FishData fd){ |
13 ods.put("local", "diff", fd); | |
14 data1.setKey("image1"); | |
15 data2.setKey("diff"); | |
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
16 } |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
17 |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
18 @Override |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
19 public void run() { |
15 | 20 FishData fd1 = data1.asClass(FishData.class); |
21 FishData fd2 = data2.asClass(FishData.class); | |
22 | |
16 | 23 System.out.println(data1.val); |
15 | 24 fd1.SetXYZ(fd1.getX()+fd2.getX(), |
25 fd1.getY()+fd2.getY(), | |
26 fd1.getZ()+fd2.getZ()); | |
27 ods.update("local", data1.key, fd1); | |
16 | 28 |
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
29 } |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
30 } |