diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 225:5e3594021e79

fix --width --height mode.
author oc
date Tue, 15 Jul 2014 07:18:13 +0900
parents ccbc3a951961
children 7310e7d7a45f
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Sun Jul 06 17:50:00 2014 +0900
+++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Tue Jul 15 07:18:13 2014 +0900
@@ -70,6 +70,9 @@
     public int vncport = ConnectionParams.DEFAULT_RFB_PORT;
     private int fbWidth;
     private boolean showTree = false;
+    public int width;
+    public int height;
+
 
     public static void main(String[] args) {
         Parser parser = new Parser();
@@ -235,7 +238,7 @@
             });
         }
 
-        SwingViewerWindowFactory viewerWindowFactory = new SwingViewerWindowFactory(isSeparateFrame, isApplet, this);
+        SwingViewerWindowFactory viewerWindowFactory = new SwingViewerWindowFactory(isSeparateFrame, isApplet, this, width, height);
 
         connectionPresenter.setConnectionWorkerFactory(
                 new SwingConnectionWorkerFactory(connectionView.getFrame(), passwordFromParams, connectionPresenter, viewerWindowFactory, myRfb));
@@ -414,4 +417,14 @@
         return showTree;
     }
 
+    @Override
+    public void setWidth(int w) {
+        width = w;
+    }
+
+    @Override
+    public void setHeight(int h) {
+        height = h;
+    }
+
 }