Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 377:877008c86e85
Add direct option
author | innparusu |
---|---|
date | Mon, 31 Aug 2015 17:04:36 +0900 |
parents | bd74b2406775 |
children | ea324e42bc78 |
comparison
equal
deleted
inserted
replaced
376:1e4285df9afb | 377:877008c86e85 |
---|---|
301 public boolean getCuiVersion() { | 301 public boolean getCuiVersion() { |
302 return myRfb.getCuiVersion(); | 302 return myRfb.getCuiVersion(); |
303 } | 303 } |
304 public void setCuiVersion(boolean flag) { | 304 public void setCuiVersion(boolean flag) { |
305 myRfb.setCuiVersion(flag); | 305 myRfb.setCuiVersion(flag); |
306 } | |
307 | |
308 public void setVncport(int vncport) { | |
309 this.vncport = vncport; | |
306 } | 310 } |
307 | 311 |
308 /** | 312 /** |
309 * start new VNC server receiver with | 313 * start new VNC server receiver with |
310 * inherited clients | 314 * inherited clients |
355 myRfb = rfb; | 359 myRfb = rfb; |
356 settings.setViewOnly(true); // too avoid unnecessary upward traffic | 360 settings.setViewOnly(true); // too avoid unnecessary upward traffic |
357 rfb.getAcceptThread().waitForShutdown(); | 361 rfb.getAcceptThread().waitForShutdown(); |
358 } | 362 } |
359 | 363 |
360 public void proxyStart(String[] argv, int width, int height, boolean showTree, boolean checkDelay, boolean addSerialNum, boolean fixingSize, boolean filterSingleDisplay) { | 364 public void proxyStart(String[] argv, String hostName, int width, int height, boolean showTree, boolean checkDelay, boolean addSerialNum, boolean fixingSize, boolean filterSingleDisplay) { |
361 fbWidth = width; | 365 fbWidth = width; |
362 this.showTree = showTree; | 366 this.showTree = showTree; |
363 // input into arguments Decision | 367 // input into arguments Decision |
364 Parser parser = new Parser(); | 368 Parser parser = new Parser(); |
365 ParametersHandler.completeParserOptions(parser); | 369 ParametersHandler.completeParserOptions(parser); |
367 parser.parse(argv); | 371 parser.parse(argv); |
368 if (parser.isSet(ParametersHandler.ARG_HELP)) { | 372 if (parser.isSet(ParametersHandler.ARG_HELP)) { |
369 printUsage(parser.optionsUsage()); | 373 printUsage(parser.optionsUsage()); |
370 System.exit(0); | 374 System.exit(0); |
371 } | 375 } |
372 String hostname = "localhost"; | |
373 TreeRFBProto rfb = new TreeRFBProto(true, this); | 376 TreeRFBProto rfb = new TreeRFBProto(true, this); |
374 myRfb = rfb; | 377 myRfb = rfb; |
375 rfb.setShowTree(showTree); | 378 rfb.setShowTree(showTree); |
376 rfb.setCheckDelay(checkDelay); | 379 rfb.setCheckDelay(checkDelay); |
377 rfb.setAddSerialNum(addSerialNum); | 380 rfb.setAddSerialNum(addSerialNum); |
383 rfb.setFilterSingleDisplay(filterSingleDisplay); | 386 rfb.setFilterSingleDisplay(filterSingleDisplay); |
384 rfb.setCuiVersion(false); | 387 rfb.setCuiVersion(false); |
385 rfb.setHasViewer(true); // this flag will be overwrited after this method. Do we have to set here? | 388 rfb.setHasViewer(true); // this flag will be overwrited after this method. Do we have to set here? |
386 rfb.createConnectionAndStart(this); | 389 rfb.createConnectionAndStart(this); |
387 setIsTreeVNC(true); | 390 setIsTreeVNC(true); |
388 connectionParams.setConnectionParam(hostname, vncport); | 391 if (hostName == null) { |
392 hostName = "localhost"; | |
393 } | |
394 connectionParams.setConnectionParam(hostName, vncport); | |
389 isApplet = true; | 395 isApplet = true; |
390 settings.setViewOnly(true); // too avoid unnecessary upward traffic | 396 settings.setViewOnly(true); // too avoid unnecessary upward traffic |
391 | 397 |
392 ArrayList<Rectangle> rectangles = getScreenRectangles(); | 398 ArrayList<Rectangle> rectangles = getScreenRectangles(); |
393 int leftScreenNumber = 0; | 399 int leftScreenNumber = 0; |