Mercurial > hg > Applications > TreeVNC
changeset 163:c850c2fce039
add showTreeNode method.
author | oc |
---|---|
date | Tue, 17 Jun 2014 09:56:47 +0900 |
parents | 33c7a08c90e7 |
children | 86289e56263c |
files | src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeManagement.java src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeManagement.java Mon Jun 16 21:55:51 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeManagement.java Tue Jun 17 09:56:47 2014 +0900 @@ -114,6 +114,7 @@ TreeVNCNode node = new TreeVNCNode(hostname,port,localhostname); node.setTreeNum(nodeList.size()); nodeList.add(node); + showTreeNode(); TreeVncProtocol treeProtocol = new TreeVncProtocol(hostname,port); try { if (nodeList.size() >= treebranch + 1) { @@ -128,6 +129,16 @@ // log } } + + /** + * show Tree Node. + */ + public void showTreeNode() { + for (int i=0; i<nodeList.size(); i++) { + TreeVNCNode treeNode = nodeList.get(i); + System.out.println(treeNode.getTreeNum() + ":" + treeNode.getPort() + ":" + treeNode.getHostname()); + } + } public LinkedList<TreeVNCNode> getList() { return nodeList;
--- a/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Mon Jun 16 21:55:51 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Tue Jun 17 09:56:47 2014 +0900 @@ -11,6 +11,7 @@ private String hostName = null; private boolean noConnection = false; private boolean permitChangeScreen = true; + private boolean showTree = false; public static void main(String[] args) { new TreeViewer().vncStart(args); @@ -80,6 +81,9 @@ i++; } else if ("--host".equals(args[i])) { hostName = args[++i]; + } else if ("--showTree".equals(args[i])) { + // show Tree node. + showTree = true; } else { System.out.println("(default) TreeVNCClient\n" + "-v or -c: View shared screen.\n"