Mercurial > hg > Applications > AliceVNC
comparison src/main/java/jp/ac/u_ryukyu/alicevnc/CheckMyName.java @ 79:3a27a0727705
update Alice
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 17 Dec 2015 17:16:07 +0900 |
parents | 57ca704f86a3 |
children | 6b0730c48b4e 4a8755a30aa8 |
comparison
equal
deleted
inserted
replaced
78:72772652143c | 79:3a27a0727705 |
---|---|
1 package jp.ac.u_ryukyu.alicevnc; | 1 package jp.ac.u_ryukyu.alicevnc; |
2 | 2 |
3 import alice.codesegment.CodeSegment; | 3 import alice.codesegment.CodeSegment; |
4 import alice.datasegment.CommandType; | 4 import alice.datasegment.CommandType; |
5 import alice.datasegment.DataSegment; | |
5 import alice.datasegment.Receiver; | 6 import alice.datasegment.Receiver; |
6 | 7 |
7 public class CheckMyName extends CodeSegment { | 8 public class CheckMyName extends CodeSegment { |
8 | 9 |
9 private Receiver info = ids.create(CommandType.PEEK); | 10 private Receiver info = ids.create(CommandType.PEEK); |
12 info.setKey("host"); | 13 info.setKey("host"); |
13 } | 14 } |
14 | 15 |
15 @Override | 16 @Override |
16 public void run() { | 17 public void run() { |
18 System.out.println("CheckMyName host index:" + DataSegment.getLocal().getDSindex("host")); | |
17 if ("node0".equals(info.asString())) { | 19 if ("node0".equals(info.asString())) { |
18 new CreateWindow("local"); | 20 new CreateWindow("local"); |
19 new NegotiateVNCServer(); | 21 new NegotiateVNCServer(); |
20 } else { | 22 } else { |
21 new CreateWindow("parent"); | 23 new CreateWindow("parent"); |