blob: 98b150559fac103aa9dfd98dd16850955ac9f7bd [file] [log] [blame]
Constantin Kaplinsky1215b992008-04-18 09:51:44 +00001//
2// Copyright (C) 2001,2002 HorizonLive.com, Inc. All Rights Reserved.
3// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
4//
5// This is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This software is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this software; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18// USA.
19//
20
Constantin Kaplinskycf689b32008-04-30 12:50:34 +000021package com.tightvnc.rfbplayer;
wimba.comc23aeb02004-09-16 00:00:00 +000022
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000023import java.awt.*;
24import java.awt.event.*;
25import java.io.*;
Constantin Kaplinsky5d99c952002-05-25 09:49:23 +000026import java.net.*;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000027
Constantin Kaplinsky903009e2002-05-20 10:55:47 +000028public class RfbPlayer extends java.applet.Applet
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +000029 implements java.lang.Runnable, WindowListener {
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000030
31 boolean inAnApplet = true;
32 boolean inSeparateFrame = false;
33
wimba.com252eb3b2004-09-21 21:27:54 +000034 /** current applet width */
35 int dispW = 300;
36 /** current applet height */
37 int dispH = 200;
38
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000039 //
40 // main() is called when run as a java program from the command line.
41 // It simply runs the applet inside a newly-created frame.
42 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000043 public static void main(String[] argv) {
Constantin Kaplinsky903009e2002-05-20 10:55:47 +000044 RfbPlayer p = new RfbPlayer();
45 p.mainArgs = argv;
46 p.inAnApplet = false;
47 p.inSeparateFrame = true;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000048
Constantin Kaplinsky903009e2002-05-20 10:55:47 +000049 p.init();
50 p.start();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000051 }
52
53 String[] mainArgs;
54
55 RfbProto rfb;
56 Thread rfbThread;
57
58 Frame vncFrame;
59 Container vncContainer;
wimba.come8e19102005-02-08 17:15:23 +000060 //ScrollPane desktopScrollPane;
61 LWScrollPane desktopScrollPane;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000062 GridBagLayout gridbag;
63 ButtonPanel buttonPanel;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000064 VncCanvas vc;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000065
Constantin Kaplinsky5d99c952002-05-25 09:49:23 +000066 String sessionURL;
Constantin Kaplinskyc833e012002-05-30 17:59:22 +000067 URL url;
Constantin Kaplinsky972c2572002-05-30 14:19:02 +000068 long initialTimeOffset;
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +000069 double playbackSpeed;
Constantin Kaplinsky5a7133a2002-07-24 17:02:04 +000070 boolean autoPlay;
Constantin Kaplinsky903009e2002-05-20 10:55:47 +000071 boolean showControls;
wimba.comd1f56df2004-11-01 16:18:54 +000072 boolean isQuitting = false;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000073 int deferScreenUpdates;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000074
75 //
76 // init()
77 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000078 public void init() {
79
wimba.comc23aeb02004-09-16 00:00:00 +000080 // LiveConnect work-a-round
81 RfbSharedStatic.refApplet = this;
82
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000083 readParameters();
84
85 if (inSeparateFrame) {
Constantin Kaplinsky903009e2002-05-20 10:55:47 +000086 vncFrame = new Frame("RFB Session Player");
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000087 if (!inAnApplet) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +000088 vncFrame.add("Center", this);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000089 }
90 vncContainer = vncFrame;
91 } else {
92 vncContainer = this;
93 }
94
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000095 if (inSeparateFrame)
96 vncFrame.addWindowListener(this);
97
wimba.comd1f56df2004-11-01 16:18:54 +000098 rfbThread = new Thread(this, "RfbThread");
Constantin Kaplinsky1215b992008-04-18 09:51:44 +000099 rfbThread.start();
100 }
101
102 public void update(Graphics g) {
103 }
104
105 //
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000106 // run() - executed by the rfbThread to read RFB data.
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000107 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000108 public void run() {
109
110 gridbag = new GridBagLayout();
111 vncContainer.setLayout(gridbag);
112
113 GridBagConstraints gbc = new GridBagConstraints();
114 gbc.gridwidth = GridBagConstraints.REMAINDER;
115 gbc.anchor = GridBagConstraints.NORTHWEST;
116
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000117 if (showControls) {
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000118 buttonPanel = new ButtonPanel(this);
119 buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
120 gridbag.setConstraints(buttonPanel, gbc);
121 vncContainer.add(buttonPanel);
122 }
123
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000124 if (inSeparateFrame) {
125 vncFrame.pack();
Constantin Kaplinskyaa7b5612008-06-17 09:27:52 +0000126 vncFrame.setVisible(true);
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000127 } else {
128 validate();
129 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000130
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000131 try {
Constantin Kaplinsky40ad1712002-09-22 08:36:43 +0000132 if (inAnApplet) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000133 url = new URL(getCodeBase(), sessionURL);
Constantin Kaplinsky40ad1712002-09-22 08:36:43 +0000134 } else {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000135 url = new URL(sessionURL);
Constantin Kaplinsky40ad1712002-09-22 08:36:43 +0000136 }
Constantin Kaplinsky285809b2008-06-17 10:31:41 +0000137 rfb = new RfbProto(url, initialTimeOffset);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000138
139 vc = new VncCanvas(this);
140 gbc.weightx = 1.0;
141 gbc.weighty = 1.0;
142
wimba.com252eb3b2004-09-21 21:27:54 +0000143 // Create a panel which itself is resizeable and can hold
144 // non-resizeable VncCanvas component at the top left corner.
wimba.come8e19102005-02-08 17:15:23 +0000145 //Panel canvasPanel = new Panel();
146 //canvasPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
147 //canvasPanel.add(vc);
wimba.com252eb3b2004-09-21 21:27:54 +0000148
149 // Create a ScrollPane which will hold a panel with VncCanvas
150 // inside.
wimba.come8e19102005-02-08 17:15:23 +0000151 //desktopScrollPane = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
152 desktopScrollPane = new LWScrollPane();
wimba.com252eb3b2004-09-21 21:27:54 +0000153 gbc.fill = GridBagConstraints.BOTH;
wimba.come8e19102005-02-08 17:15:23 +0000154 gridbag.setConstraints(vc, gbc);
155 //gridbag.setConstraints(canvasPanel, gbc);
156 desktopScrollPane.addComp(vc);
157 desktopScrollPane.setSize(dispW, dispH);
158 //desktopScrollPane.add(canvasPanel);
wimba.com252eb3b2004-09-21 21:27:54 +0000159
160 // Now add the scroll bar to the container.
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000161 if (inSeparateFrame) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000162 gridbag.setConstraints(desktopScrollPane, gbc);
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000163 vncFrame.add(desktopScrollPane);
164 vncFrame.setTitle(rfb.desktopName);
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000165 vc.resizeDesktopFrame();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000166 } else {
wimba.com252eb3b2004-09-21 21:27:54 +0000167 // Size the scroll pane to display size.
168 desktopScrollPane.setSize(dispW, dispH);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000169
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000170 // Just add the VncCanvas component to the Applet.
wimba.com252eb3b2004-09-21 21:27:54 +0000171 gbc.fill = GridBagConstraints.NONE;
172 gridbag.setConstraints(desktopScrollPane, gbc);
173 add(desktopScrollPane);
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000174 validate();
wimba.com252eb3b2004-09-21 21:27:54 +0000175 vc.resizeEmbeddedApplet();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000176 }
177
wimba.comd1f56df2004-11-01 16:18:54 +0000178 while (!isQuitting) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000179 try {
180 setPaused(!autoPlay);
181 rfb.fbs.setSpeed(playbackSpeed);
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000182 vc.processNormalProtocol();
183 } catch (EOFException e) {
184 if (e.getMessage() != null && e.getMessage().equals("[REWIND]")) {
185 // A special type of EOFException allowing us to seek backwards.
186 initialTimeOffset = rfb.fbs.getSeekOffset();
187 autoPlay = !rfb.fbs.isPaused();
188 } else {
189 // Return to the beginning after the playback is finished.
190 initialTimeOffset = 0;
191 autoPlay = false;
192 }
Constantin Kaplinsky285809b2008-06-17 10:31:41 +0000193 rfb.newSession(url, initialTimeOffset);
Constantin Kaplinsky282aaa12002-09-22 11:33:22 +0000194 vc.updateFramebufferSize();
wimba.com30ff9ed2004-11-01 20:54:08 +0000195 } catch (NullPointerException e) {
196 // catching this causes a hang with 1.4.1 JVM's under Win32 IE
197 throw e;
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000198 }
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000199 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000200
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000201 } catch (FileNotFoundException e) {
202 fatalError(e.toString());
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000203 } catch (Exception e) {
204 e.printStackTrace();
205 fatalError(e.toString());
206 }
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000207
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000208 }
209
wimba.comb5a90342007-04-02 18:54:41 +0000210 public void setPausedInt(String paused) {
211 // default to true (pause)
212 int pause = 1;
213
214 try {
215 pause = Integer.parseInt(paused);
216 } catch (NumberFormatException e) {
217 }
218
219 if (pause == 0) {
220 setPaused(false);
221 } else {
222 setPaused(true);
223 }
224 }
225
Constantin Kaplinskyac6420d2002-05-29 17:05:39 +0000226 public void setPaused(boolean paused) {
Constantin Kaplinsky972c2572002-05-30 14:19:02 +0000227 if (showControls)
228 buttonPanel.setPaused(paused);
Constantin Kaplinsky37cc43e2002-05-30 17:30:11 +0000229 if (paused) {
230 rfb.fbs.pausePlayback();
231 } else {
232 rfb.fbs.resumePlayback();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000233 }
234 }
235
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000236 public double getSpeed() {
237 return playbackSpeed;
238 }
239
Constantin Kaplinskyce39d3b2002-05-30 15:54:56 +0000240 public void setSpeed(double speed) {
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000241 playbackSpeed = speed;
Constantin Kaplinsky37cc43e2002-05-30 17:30:11 +0000242 rfb.fbs.setSpeed(speed);
Constantin Kaplinskyce39d3b2002-05-30 15:54:56 +0000243 }
244
wimba.comc23aeb02004-09-16 00:00:00 +0000245 public void jumpTo(long pos) {
246 long diff = Math.abs(pos - rfb.fbs.getTimeOffset());
247
248 // Current threshold is 5 seconds
249 if (diff > 5000) {
250 rfb.fbs.pausePlayback();
251 setPos(pos);
252 rfb.fbs.resumePlayback();
253 }
254 }
255
Constantin Kaplinskyc833e012002-05-30 17:59:22 +0000256 public void setPos(long pos) {
Constantin Kaplinsky5b1b92a2002-05-30 18:02:34 +0000257 rfb.fbs.setTimeOffset(pos);
Constantin Kaplinsky30f786a2002-05-29 10:59:52 +0000258 }
259
Constantin Kaplinskyfe079832002-05-29 00:52:32 +0000260 public void updatePos() {
Constantin Kaplinskyaa7b5612008-06-17 09:27:52 +0000261 if (showControls && buttonPanel != null)
Constantin Kaplinskyc833e012002-05-30 17:59:22 +0000262 buttonPanel.setPos(rfb.fbs.getTimeOffset());
Constantin Kaplinskyfe079832002-05-29 00:52:32 +0000263 }
264
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000265 //
266 // readParameters() - read parameters from the html source or from the
267 // command line. On the command line, the arguments are just a sequence of
268 // param_name/param_value pairs where the names and values correspond to
269 // those expected in the html applet tag source.
270 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000271 public void readParameters() {
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000272
Constantin Kaplinsky5d99c952002-05-25 09:49:23 +0000273 sessionURL = readParameter("URL", true);
Constantin Kaplinsky5a7133a2002-07-24 17:02:04 +0000274
Constantin Kaplinsky972c2572002-05-30 14:19:02 +0000275 initialTimeOffset = readLongParameter("Position", 0);
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000276 if (initialTimeOffset < 0)
277 initialTimeOffset = 0;
Constantin Kaplinsky5a7133a2002-07-24 17:02:04 +0000278
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000279 playbackSpeed = readDoubleParameter("Speed", 1.0);
280 if (playbackSpeed <= 0.0)
281 playbackSpeed = 1.0;
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000282
Constantin Kaplinsky5a7133a2002-07-24 17:02:04 +0000283 autoPlay = false;
284 String str = readParameter("Autoplay", false);
285 if (str != null && str.equalsIgnoreCase("Yes"))
286 autoPlay = true;
287
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000288 showControls = true;
wimba.com9bd9c5c2005-09-14 18:42:46 +0000289 str = readParameter("Show_Controls", false);
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000290 if (str != null && str.equalsIgnoreCase("No"))
291 showControls = false;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000292
293 if (inAnApplet) {
wimba.com9bd9c5c2005-09-14 18:42:46 +0000294 str = readParameter("Open_New_Window", false);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000295 if (str != null && str.equalsIgnoreCase("Yes"))
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000296 inSeparateFrame = true;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000297 }
298
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000299 // Fine tuning options.
wimba.com9bd9c5c2005-09-14 18:42:46 +0000300 deferScreenUpdates = (int)readLongParameter("Defer_screen_updates", 20);
Constantin Kaplinsky972c2572002-05-30 14:19:02 +0000301 if (deferScreenUpdates < 0)
302 deferScreenUpdates = 0; // Just in case.
wimba.com252eb3b2004-09-21 21:27:54 +0000303
304 // Display width and height.
305 dispW = readIntParameter("DISPLAY_WIDTH", dispW);
306 dispH = readIntParameter("DISPLAY_HEIGHT", dispH);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000307 }
308
309 public String readParameter(String name, boolean required) {
310 if (inAnApplet) {
311 String s = getParameter(name);
312 if ((s == null) && required) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000313 fatalError(name + " parameter not specified");
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000314 }
315 return s;
316 }
317
318 for (int i = 0; i < mainArgs.length; i += 2) {
319 if (mainArgs[i].equalsIgnoreCase(name)) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000320 try {
321 return mainArgs[i + 1];
322 } catch (Exception e) {
323 if (required) {
324 fatalError(name + " parameter not specified");
325 }
326 return null;
327 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000328 }
329 }
330 if (required) {
331 fatalError(name + " parameter not specified");
332 }
333 return null;
334 }
335
Constantin Kaplinsky972c2572002-05-30 14:19:02 +0000336 long readLongParameter(String name, long defaultValue) {
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000337 String str = readParameter(name, false);
Constantin Kaplinsky972c2572002-05-30 14:19:02 +0000338 long result = defaultValue;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000339 if (str != null) {
340 try {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000341 result = Long.parseLong(str);
342 } catch (NumberFormatException e) {
343 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000344 }
345 return result;
346 }
347
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000348 double readDoubleParameter(String name, double defaultValue) {
349 String str = readParameter(name, false);
350 double result = defaultValue;
351 if (str != null) {
352 try {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000353 result = Double.valueOf(str).doubleValue();
354 } catch (NumberFormatException e) {
355 }
Constantin Kaplinsky7957ca12002-05-30 16:19:11 +0000356 }
357 return result;
358 }
359
wimba.com252eb3b2004-09-21 21:27:54 +0000360 int readIntParameter(String name, int defaultValue) {
361 String str = readParameter(name, false);
362 int result = defaultValue;
363 if (str != null) {
364 try {
365 result = Integer.parseInt(str);
366 } catch (NumberFormatException e) {
367 }
368 }
369 return result;
370 }
371
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000372 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000373 // fatalError() - print out a fatal error message.
374 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000375 public void fatalError(String str) {
376 System.out.println(str);
377
378 if (inAnApplet) {
379 vncContainer.removeAll();
380 if (rfb != null) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000381 rfb = null;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000382 }
383 Label errLabel = new Label(str);
384 errLabel.setFont(new Font("Helvetica", Font.PLAIN, 12));
385 vncContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 30, 30));
386 vncContainer.add(errLabel);
387 if (inSeparateFrame) {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000388 vncFrame.pack();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000389 } else {
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000390 validate();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000391 }
392 Thread.currentThread().stop();
393 } else {
394 System.exit(1);
395 }
396 }
397
398
399 //
400 // This method is called before the applet is destroyed.
401 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000402 public void destroy() {
wimba.comd1f56df2004-11-01 16:18:54 +0000403 isQuitting = true;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000404 vncContainer.removeAll();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000405 if (rfb != null) {
wimba.comd1f56df2004-11-01 16:18:54 +0000406 rfb.quit();
407 }
408 try {
409 rfbThread.join();
410 } catch (InterruptedException e) {
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000411 }
412 if (inSeparateFrame) {
wimba.com30ff9ed2004-11-01 20:54:08 +0000413 vncFrame.removeWindowListener(this);
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000414 vncFrame.dispose();
415 }
416 }
417
wimba.com252eb3b2004-09-21 21:27:54 +0000418 //
419 // Set the new width and height of the applet. Call when browser is resized to
420 // resize the viewer.
421 //
422 public void displaySize(int width, int height) {
423 dispW = width;
424 dispH = height;
425 if (!inSeparateFrame) {
426 vc.resizeEmbeddedApplet();
427 }
428 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000429
430 //
431 // Close application properly on window close event.
432 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000433 public void windowClosing(WindowEvent evt) {
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000434 vncContainer.removeAll();
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000435 if (rfb != null)
Constantin Kaplinsky903009e2002-05-20 10:55:47 +0000436 rfb = null;
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000437
438 vncFrame.dispose();
439 if (!inAnApplet) {
440 System.exit(0);
441 }
442 }
443
444 //
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000445 // Ignore window events we're not interested in.
446 //
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000447 public void windowActivated(WindowEvent evt) {
448 }
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000449
Constantin Kaplinsky72e47ef2008-04-18 17:48:16 +0000450 public void windowDeactivated(WindowEvent evt) {
451 }
452
453 public void windowOpened(WindowEvent evt) {
454 }
455
456 public void windowClosed(WindowEvent evt) {
457 }
458
459 public void windowIconified(WindowEvent evt) {
460 }
461
462 public void windowDeiconified(WindowEvent evt) {
463 }
464
Constantin Kaplinsky1215b992008-04-18 09:51:44 +0000465}