Mercurial > hg > Members > riono > TreeVNC_ja_comment
diff src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java @ 399:28d67bbfa9f1
Implement SelectionPanel processing
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 05:05:04 +0900 |
parents | b3ef6d14b2b7 |
children | 94c520535ef1 |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Mon Oct 12 19:50:54 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Tue Oct 13 05:05:04 2015 +0900 @@ -12,23 +12,25 @@ private int portNumber = ConnectionParams.DEFAULT_VNC_ROOT; private TreeRFBProto rfb; private String myHostName; - + private boolean rootMode = false; + + private boolean displayMode = false; + public CreateConnectionParam(TreeRFBProto rfb) { this.rfb = rfb; rfb.setConnectionParam(this); } public synchronized void findTreeVncRoot() { - rfb.createRootSelectionPanel(this); - FindRoot getBcast = new FindRoot(rfb.acceptPort,this); - getBcast.findRoot(); + FindRoot getBcast = new FindRoot(rfb.acceptPort,this); + rfb.createRootSelectionPanel(this, getBcast); // wait for RootSelection try { wait(); } catch (InterruptedException e) { System.out.println("any thread interrupt when wait for FindRoot " + e.getMessage()); } - } + } /** * To find parent, send WHERE_TO_CONNECT command to the TreeVNC root @@ -71,8 +73,22 @@ } public void setRootMode() { - } + rootMode = true; + } + + public boolean isRootMode() { + return rootMode; + } public void setDisplayMode() { + displayMode = true; } + + public boolean isDisplayMode() { + return displayMode; + } + + public synchronized void restart() { + notify(); + } }