Mercurial > hg > Members > sugi > javafx
annotate src/alice/test/topology/aquarium/fx/UpdateData.java @ 26:650c0f1270a3
add package alice.topology.manager.keeparive
author | sugi |
---|---|
date | Tue, 05 Nov 2013 03:57:09 +0900 |
parents | 43ae0c87885b |
children |
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); | |
20 | 14 data1.setKey("FISH0"); |
15 | 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); | |
17 | 22 |
15 | 23 fd1.SetXYZ(fd1.getX()+fd2.getX(), |
24 fd1.getY()+fd2.getY(), | |
25 fd1.getZ()+fd2.getZ()); | |
26 ods.update("local", data1.key, fd1); | |
16 | 27 |
4
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
28 } |
50d77513d52e
Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff
changeset
|
29 } |