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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
4 import alice.datasegment.CommandType;
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
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
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
9 private Receiver data1 = ids.create(CommandType.PEEK);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
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
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
12 public UpdateData(FishData fd){
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
13 ods.put("local", "diff", fd);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
14 data1.setKey("image1");
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
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
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
20 FishData fd1 = data1.asClass(FishData.class);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
21 FishData fd2 = data2.asClass(FishData.class);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
22
16
5e6d40908c60 delete bug
e095732
parents: 15
diff changeset
23 System.out.println(data1.val);
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
24 fd1.SetXYZ(fd1.getX()+fd2.getX(),
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
25 fd1.getY()+fd2.getY(),
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
26 fd1.getZ()+fd2.getZ());
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
27 ods.update("local", data1.key, fd1);
16
5e6d40908c60 delete bug
e095732
parents: 15
diff changeset
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 }