diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 188:f176bffcdc4a

add showTreeNode option.
author oc
date Tue, 24 Jun 2014 16:49:29 +0900
parents f76ee760c2d2
children aa00e4b2fc27
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Tue Jun 24 09:35:45 2014 +0900
+++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Tue Jun 24 16:49:29 2014 +0900
@@ -71,6 +71,7 @@
 	private boolean noConnection;
     public int vncport = ConnectionParams.DEFAULT_RFB_PORT;
     private int fbWidth;
+	private boolean showTree = false;
 
     public static void main(String[] args) {
 		Parser parser = new Parser();
@@ -359,12 +360,12 @@
         myRfb.createConnectionAndStart(this);
     }
 
-    public void proxyStart(String[] argv, int width, int height) {
-        fbWidth = width;
-        proxyStart(argv);
+    public void proxyStart(String[] argv, int width, int height, boolean showTree) {
+    	fbWidth = width;
+    	proxyStart(argv, showTree);
     }
 
-    public void proxyStart(String[] argv) {
+    public void proxyStart(String[] argv, boolean showTree) {
         // input into arguments Decision
         Parser parser = new Parser();
         ParametersHandler.completeParserOptions(parser);
@@ -377,7 +378,8 @@
         String hostname = "localhost";
         MyRfbProtoProxy rfb = new MyRfbProtoProxy();
         myRfb = rfb;
-        rfb.setTreeManager(new TreeManagement(hostname, ConnectionParams.DEFAULT_VNC_ROOT));
+        rfb.setShowTree(showTree);
+        rfb.setTreeManager(new TreeManagement(hostname, ConnectionParams.DEFAULT_VNC_ROOT, rfb.showTreeNode));
         rfb.setViewer(this);
         rfb.setCuiVersion(false);
         rfb.setHasViewer(true);
@@ -391,7 +393,7 @@
     }
 
     public void initRoot(MyRfbProto myRfbProto, String hostName) {
-        myRfbProto.setTreeManager(new TreeManagement(hostName, ConnectionParams.DEFAULT_VNC_ROOT));
+        myRfbProto.setTreeManager(new TreeManagement(hostName, ConnectionParams.DEFAULT_VNC_ROOT, showTree));
         setIsTreeVNC(true);
         connectionParams.setConnectionParam(hostName, vncport);
         isApplet = true;
@@ -399,4 +401,5 @@
         myRfbProto.setReconnecting(true);
         run();
     }
+
 }