Mercurial > hg > Applications > TreeVNC
view 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 |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import java.awt.event.*; import java.util.logging.Logger; import com.glavsoft.core.SettingsChangedEvent; import com.glavsoft.rfb.IChangeSettingsListener; import com.glavsoft.rfb.IRfbSessionListener; import com.glavsoft.rfb.protocol.ProtocolSettings; import com.glavsoft.viewer.Viewer; import com.glavsoft.viewer.cli.Parser; import com.glavsoft.viewer.swing.ParametersHandler; public class VncProxyService extends Viewer implements Runnable, IRfbSessionListener, IChangeSettingsListener { /** * */ private static final long serialVersionUID = 1L; public static Logger logger = Logger.getLogger("com.glavsoft"); private boolean forceReconnection; private String reconnectionReason; static VncProxyService currentVps; public VncProxyService() { ProtocolSettings.getDefaultSettings(); uiSettings = super.uiSettings; } public static void main(String[] argv) { String[] mainArgs = argv; System.out.println(mainArgs.length); // input into arguments Decision Parser parser = new Parser(); ParametersHandler.completeParserOptions(parser); parser.parse(argv); if (parser.isSet(ParametersHandler.ARG_HELP)) { printUsage(parser.optionsUsage()); System.exit(0); } VncProxyService vps = new VncProxyService(); vps.initRoot(vps.myRfb, "localhost"); } @Override public void destroy() { } @Override public void windowClosing(WindowEvent e) { if (e != null && e.getComponent() != null) { e.getWindow().setVisible(false); } closeApp(); } @Override public void rfbSessionStopped(final String reason) { System.out.println(reason); } @Override public void settingsChanged(SettingsChangedEvent event) { } }