Mercurial > hg > Applications > TreeVNC
annotate src/main/java/jp/ac/u_ryukyu/treevnc/VncProxyService.java @ 532:9292035b8d93
fix forloop
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 05 May 2019 15:56:33 +0900 |
parents | 1d4d5055a288 |
children |
rev | line source |
---|---|
206 | 1 package jp.ac.u_ryukyu.treevnc; |
11 | 2 |
3 import java.awt.event.*; | |
4 import java.util.logging.Logger; | |
5 | |
59 | 6 import com.glavsoft.core.SettingsChangedEvent; |
11 | 7 import com.glavsoft.rfb.IChangeSettingsListener; |
8 import com.glavsoft.rfb.IRfbSessionListener; | |
9 import com.glavsoft.rfb.protocol.ProtocolSettings; | |
10 import com.glavsoft.viewer.Viewer; | |
11 import com.glavsoft.viewer.cli.Parser; | |
12 import com.glavsoft.viewer.swing.ParametersHandler; | |
13 | |
45 | 14 public class VncProxyService extends Viewer implements Runnable, |
15 IRfbSessionListener, IChangeSettingsListener { | |
11 | 16 |
17 /** | |
18 * | |
19 */ | |
20 private static final long serialVersionUID = 1L; | |
21 | |
46 | 22 public static Logger logger = Logger.getLogger("com.glavsoft"); |
23 private boolean forceReconnection; | |
24 private String reconnectionReason; | |
47 | 25 static VncProxyService currentVps; |
82 | 26 |
11 | 27 public VncProxyService() { |
186
f76ee760c2d2
dead lock on command line root
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
179
diff
changeset
|
28 ProtocolSettings.getDefaultSettings(); |
11 | 29 uiSettings = super.uiSettings; |
30 } | |
45 | 31 |
47 | 32 |
11 | 33 public static void main(String[] argv) { |
34 String[] mainArgs = argv; | |
35 System.out.println(mainArgs.length); | |
36 // input into arguments Decision | |
60 | 37 |
11 | 38 Parser parser = new Parser(); |
39 ParametersHandler.completeParserOptions(parser); | |
40 | |
41 parser.parse(argv); | |
42 if (parser.isSet(ParametersHandler.ARG_HELP)) { | |
43 printUsage(parser.optionsUsage()); | |
44 System.exit(0); | |
45 } | |
46 | 46 VncProxyService vps = new VncProxyService(); |
179 | 47 vps.initRoot(vps.myRfb, "localhost"); |
46 | 48 } |
49 | |
60 | 50 |
34 | 51 |
11 | 52 @Override |
53 public void destroy() { | |
54 | |
55 } | |
56 | |
57 @Override | |
58 public void windowClosing(WindowEvent e) { | |
59 if (e != null && e.getComponent() != null) { | |
60 e.getWindow().setVisible(false); | |
61 } | |
62 closeApp(); | |
63 } | |
45 | 64 |
38 | 65 @Override |
66 public void rfbSessionStopped(final String reason) { | |
326 | 67 System.out.println(reason); |
59 | 68 } |
69 | |
70 @Override | |
71 public void settingsChanged(SettingsChangedEvent event) { | |
69 | 72 } |
73 | |
11 | 74 } |