Mercurial > hg > Applications > TreeVNC
changeset 144:1e004d9c599d
notify connection panel
author | oc |
---|---|
date | Thu, 12 Jun 2014 19:35:00 +0900 |
parents | 4547543ca73c |
children | 649794dfb9d5 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncRootSelectionPanel.java |
diffstat | 4 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Thu Jun 12 19:21:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Thu Jun 12 19:35:00 2014 +0900 @@ -18,7 +18,7 @@ } public synchronized void findTreeVncRoot() throws InterruptedException { - rfb.createRootSelectionPanel(); + rfb.createRootSelectionPanel(this); FindRoot getBcast = new FindRoot(rfb.acceptPort,this); getBcast.findRoot(); // wait for RootSelection @@ -48,9 +48,10 @@ accThread.start(); } - public void setHostName(String _hostName, int port) { + public synchronized void setHostName(String _hostName, int port) { hostName = _hostName; portNumber = port; + notify(); } public void setHostName(String hostAndPort) {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Thu Jun 12 19:21:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Thu Jun 12 19:35:00 2014 +0900 @@ -708,7 +708,7 @@ } - public void createRootSelectionPanel() { + public void createRootSelectionPanel(CreateConnectionParam createConnectionParam) { }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Thu Jun 12 19:21:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Thu Jun 12 19:35:00 2014 +0900 @@ -3,6 +3,7 @@ import java.io.IOException; import java.io.OutputStream; +import jp.ac.u_ryukyu.treevnc.CreateConnectionParam; import jp.ac.u_ryukyu.treevnc.MyRfbProto; import com.glavsoft.exceptions.TransportException; @@ -66,8 +67,9 @@ } @Override - public void createRootSelectionPanel() { + public void createRootSelectionPanel(CreateConnectionParam cp) { rootSelectionPanel = new TreeVncRootSelectionPanel(); + rootSelectionPanel.setCp(cp); }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncRootSelectionPanel.java Thu Jun 12 19:21:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncRootSelectionPanel.java Thu Jun 12 19:35:00 2014 +0900 @@ -140,7 +140,6 @@ setStatus(check[t].getLabel()); unVisible(); cp.setHostName(hostAddress,Integer.parseInt(port)); - cp.notify(); } } }