View | Details | Raw Unified | Return to bug 288037
Collapse All | Expand All

(-)Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java (-58 / +155 lines)
Lines 162-183 Link Here
162
	String textLabel = new String (dest);
162
	String textLabel = new String (dest);
163
163
164
	/*
164
	/*
165
	* If mozilla is showing its errors with dialogs (as opposed to pages) then the only
165
	 * If mozilla is showing its errors with dialogs (as opposed to pages)
166
	* opportunity to detect that a page has an invalid certificate, without receiving
166
	 * then the only opportunity to detect that a page has an invalid
167
	* all notification callbacks on the channel, is to detect the displaying of an alert
167
	 * certificate, without receiving all notification callbacks on the
168
	* whose message contains an internal cert error code.  If a such a message is
168
	 * channel, is to detect the displaying of an alert whose message
169
	* detected then instead of showing it, re-navigate to the page with the invalid
169
	 * contains an internal cert error code. If a such a message is detected
170
	* certificate so that the browser's nsIBadCertListener2 will be invoked.
170
	 * then instead of showing it, re-navigate to the page with the invalid
171
	*/
171
	 * certificate so that the browser's nsIBadCertListener2 will be
172
	if (textLabel.indexOf ("ssl_error_bad_cert_domain") != -1 ||
172
	 * invoked.
173
		textLabel.indexOf ("sec_error_unknown_issuer") != -1 ||
173
	 */
174
		textLabel.indexOf ("sec_error_expired_certificate") != -1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
174
	if ((textLabel.indexOf("ssl_error_bad_cert_domain") != -1)
175
			if (browser != null) {
175
			|| textLabel.indexOf("sec_error_unknown_issuer") != -1
176
				Mozilla mozilla = (Mozilla)browser.webBrowser;
176
			|| textLabel.indexOf("sec_error_expired_certificate") != -1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
177
				mozilla.isRetrievingBadCert = true;
177
		if (browser != null) {
178
				browser.setUrl (mozilla.lastNavigateURL);
178
			Mozilla mozilla = (Mozilla) browser.webBrowser;
179
				return XPCOM.NS_OK;
179
			mozilla.isRetrievingBadCert = true;
180
			}
180
			browser.setUrl(mozilla.lastNavigateURL);
181
			return XPCOM.NS_OK;
182
		}
183
	}
184
185
	for (int i = 0; i < browser.webBrowser.promptListeners.length; i++) {
186
		PromptEvent event = new PromptEvent(browser);
187
		event.title = titleLabel;
188
		event.text = textLabel;
189
		browser.webBrowser.promptListeners[i].prompt(event);
190
		if (event.button == SWT.OK) {
191
			return XPCOM.NS_OK;
192
		}
181
	}
193
	}
182
194
183
	Shell shell = browser == null ? new Shell () : browser.getShell (); 
195
	Shell shell = browser == null ? new Shell () : browser.getShell (); 
Lines 206-215 Link Here
206
	XPCOM.memmove (dest, aCheckMsg, length * 2);
218
	XPCOM.memmove (dest, aCheckMsg, length * 2);
207
	String checkLabel = new String (dest);
219
	String checkLabel = new String (dest);
208
220
209
	Shell shell = browser == null ? new Shell () : browser.getShell ();
210
	PromptDialog dialog = new PromptDialog (shell);
211
	int[] check = new int[1];
221
	int[] check = new int[1];
212
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4); /* PRBool */
222
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4); /* PRBool */
223
224
	for (int i = 0; i < browser.webBrowser.promptListeners.length; i++) {
225
		PromptEvent event = new PromptEvent(browser);
226
		event.title = titleLabel;
227
		event.text = textLabel;
228
		event.checkLabel = checkLabel;
229
		event.checked = check[0] == 1;
230
		browser.webBrowser.promptListeners[i].prompt(event);
231
		if (event.button == SWT.OK) {
232
			if (aCheckState != 0) {
233
				check[0] = event.checked ? 1 : 0;
234
				XPCOM.memmove(aCheckState, check, 4); /* PRBool */
235
			}
236
			return XPCOM.NS_OK;
237
		}
238
	}
239
240
	Shell shell = browser == null ? new Shell() : browser.getShell();
241
	PromptDialog dialog = new PromptDialog(shell);
213
	dialog.alertCheck (titleLabel, textLabel, checkLabel, check);
242
	dialog.alertCheck (titleLabel, textLabel, checkLabel, check);
214
	if (aCheckState != 0) XPCOM.memmove (aCheckState, check, 4); /* PRBool */
243
	if (aCheckState != 0) XPCOM.memmove (aCheckState, check, 4); /* PRBool */
215
	return XPCOM.NS_OK;
244
	return XPCOM.NS_OK;
Lines 232-237 Link Here
232
	XPCOM.memmove (dest, aText, length * 2);
261
	XPCOM.memmove (dest, aText, length * 2);
233
	String textLabel = new String (dest);
262
	String textLabel = new String (dest);
234
263
264
	for (int i = 0; i < browser.webBrowser.promptListeners.length; i++) {
265
		PromptEvent event = new PromptEvent(browser);
266
		event.title = titleLabel;
267
		event.text = textLabel;
268
		browser.webBrowser.promptListeners[i].prompt(event);
269
		if (event.button == SWT.OK) {
270
			XPCOM.memmove(_retval, new int[] { 1 }, 4);
271
			return XPCOM.NS_OK;
272
		} else if (event.button == SWT.CANCEL) {
273
			XPCOM.memmove(_retval, new int[] { 0 }, 4);
274
			return XPCOM.NS_OK;
275
		}
276
	}
277
235
	Shell shell = browser == null ? new Shell () : browser.getShell ();
278
	Shell shell = browser == null ? new Shell () : browser.getShell ();
236
	MessageBox messageBox = new MessageBox (shell, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
279
	MessageBox messageBox = new MessageBox (shell, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
237
	messageBox.setText (titleLabel);
280
	messageBox.setText (titleLabel);
Lines 277-287 Link Here
277
	} else if ((aButtonFlags & nsIPromptService.BUTTON_POS_2_DEFAULT) != 0) {
320
	} else if ((aButtonFlags & nsIPromptService.BUTTON_POS_2_DEFAULT) != 0) {
278
		defaultIndex = 2;
321
		defaultIndex = 2;
279
	}
322
	}
280
	
323
281
	Shell shell = browser == null ? new Shell () : browser.getShell ();
282
	PromptDialog dialog = new PromptDialog (shell);
283
	int[] check = new int[1], result = new int[1];
324
	int[] check = new int[1], result = new int[1];
284
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4);
325
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4);
326
327
	for (int i = 0; i < browser.webBrowser.promptListeners.length; i++) {
328
		PromptEvent event = new PromptEvent(browser);
329
		event.title = titleLabel;
330
		event.text = textLabel;
331
		event.checkLabel = checkLabel;
332
		event.checked = check[0] == 1;
333
		event.buttonLabels = new String[] { button0Label, button1Label,
334
				button2Label };
335
		browser.webBrowser.promptListeners[i].prompt(event);
336
		if ((event.button == 0 && button0Label != null)
337
				|| (event.button == 1 && button1Label != null)
338
				|| (event.button == 2 && button2Label != null)) {
339
			XPCOM.memmove(_retval, new int[] { event.button }, 4);
340
			if (aCheckState != 0) {
341
				check[0] = event.checked ? 1 : 0;
342
				XPCOM.memmove(aCheckState, check, 4); /* PRBool */
343
			}
344
			return XPCOM.NS_OK;
345
		}
346
	}
347
348
	Shell shell = browser == null ? new Shell () : browser.getShell ();
349
	PromptDialog dialog = new PromptDialog (shell);
285
	dialog.confirmEx (titleLabel, textLabel, checkLabel, button0Label, button1Label, button2Label, defaultIndex, check, result);
350
	dialog.confirmEx (titleLabel, textLabel, checkLabel, button0Label, button1Label, button2Label, defaultIndex, check, result);
286
	if (aCheckState != 0) XPCOM.memmove (aCheckState, check, 4);
351
	if (aCheckState != 0) XPCOM.memmove (aCheckState, check, 4);
287
	XPCOM.memmove (_retval, result, 4);
352
	XPCOM.memmove (_retval, result, 4);
Lines 324-374 Link Here
324
		}
389
		}
325
	}
390
	}
326
391
327
	Shell shell = browser == null ? new Shell () : browser.getShell ();
328
	PromptDialog dialog = new PromptDialog (shell);
329
	int[] check = new int[1], result = new int[1];
392
	int[] check = new int[1], result = new int[1];
330
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4);
393
	if (aCheckState != 0) XPCOM.memmove (check, aCheckState, 4);
331
	dialog.prompt (titleLabel, textLabel, checkLabel, valueLabel, check, result);
394
395
	for (int i = 0; i < browser.webBrowser.promptListeners.length; i++) {
396
		PromptEvent event = new PromptEvent(browser);
397
		event.title = titleLabel;
398
		event.text = textLabel;
399
		event.checkLabel = checkLabel;
400
		event.checked = check[0] == 1;
401
		event.valueLabel = valueLabel[0];
402
		browser.webBrowser.promptListeners[i].prompt(event);
403
		if (event.button == SWT.OK) {
404
			movePromptString(aValue, valueAddr, event.valueLabel);
405
			XPCOM.memmove(_retval, new int[] { 1 }, 4);
406
			if (aCheckState != 0) {
407
				check[0] = event.checked ? 1 : 0;
408
				XPCOM.memmove(aCheckState, check, 4); /* PRBool */
409
			}
410
			return XPCOM.NS_OK;
411
		} else if (event.button == SWT.CANCEL) {
412
			XPCOM.memmove(_retval, new int[] { 0 }, 4);
413
			if (aCheckState != 0) {
414
				check[0] = event.checked ? 1 : 0;
415
				XPCOM.memmove(aCheckState, check, 4); /* PRBool */
416
			}
417
			return XPCOM.NS_OK;
418
		}
419
	}
420
421
	Shell shell = browser == null ? new Shell() : browser.getShell();
422
	PromptDialog dialog = new PromptDialog(shell);
423
	dialog.prompt(titleLabel, textLabel, checkLabel, valueLabel, check, result);
332
424
333
	XPCOM.memmove (_retval, result, 4);
425
	XPCOM.memmove (_retval, result, 4);
334
	if (result[0] == 1) {
426
	if (result[0] == 1) {
335
		/* 
427
		movePromptString(aValue, valueAddr, valueLabel[0]);
336
		* User selected OK. User name and password are returned as PRUnichar values. Any default
428
	}
337
		* value that we override must be freed using the nsIMemory service.
429
	if (aCheckState != 0) XPCOM.memmove(aCheckState, check, 4);
338
		*/
430
	return XPCOM.NS_OK;
339
		if (valueLabel[0] != null) {
431
}
340
			int /*long*/[] result2 = new int /*long*/[1];
341
			int rc = XPCOM.NS_GetServiceManager (result2);
342
			if (rc != XPCOM.NS_OK) SWT.error (rc);
343
			if (result2[0] == 0) SWT.error (XPCOM.NS_NOINTERFACE);
344
345
			nsIServiceManager serviceManager = new nsIServiceManager (result2[0]);
346
			result2[0] = 0;
347
			byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_MEMORY_CONTRACTID, true);
348
			rc = serviceManager.GetServiceByContractID (aContractID, nsIMemory.NS_IMEMORY_IID, result2);
349
			if (rc != XPCOM.NS_OK) SWT.error (rc);
350
			if (result2[0] == 0) SWT.error (XPCOM.NS_NOINTERFACE);		
351
			serviceManager.Release ();
352
353
			nsIMemory memory = new nsIMemory (result2[0]);
354
			result2[0] = 0;
355
356
			int cnt = valueLabel[0].length ();
357
			char[] buffer = new char[cnt + 1];
358
			valueLabel[0].getChars (0, cnt, buffer, 0);
359
			int size = buffer.length * 2;
360
			int /*long*/ ptr = memory.Alloc (size);
361
			XPCOM.memmove (ptr, buffer, size);
362
			XPCOM.memmove (aValue, new int /*long*/[] {ptr}, C.PTR_SIZEOF);
363
432
364
			if (valueAddr[0] != 0) {
433
/*
365
				memory.Free (valueAddr[0]);
434
 * OK was selected. User name and password are returned as
366
			}
435
 * PRUnichar values. Any default value that we override must be
367
			memory.Release ();
436
 * freed using the nsIMemory service.
437
 */
438
private void movePromptString(int aValue, int[] valueAddr, String prompt) {
439
	if (prompt != null) {
440
		int /*long*/[] result2 = new int /*long*/[1];
441
		int rc = XPCOM.NS_GetServiceManager (result2);
442
		if (rc != XPCOM.NS_OK) SWT.error(rc);
443
		if (result2[0] == 0) SWT.error(XPCOM.NS_NOINTERFACE);
444
445
		nsIServiceManager serviceManager = new nsIServiceManager (result2[0]);
446
		result2[0] = 0;
447
		byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_MEMORY_CONTRACTID, true);
448
		rc = serviceManager.GetServiceByContractID (aContractID,nsIMemory.NS_IMEMORY_IID, result2);
449
		if (rc != XPCOM.NS_OK) SWT.error (rc);
450
		if (result2[0] == 0) SWT.error (XPCOM.NS_NOINTERFACE);
451
		serviceManager.Release ();
452
453
		nsIMemory memory = new nsIMemory (result2[0]);
454
		result2[0] = 0;
455
456
		int cnt = prompt.length ();
457
		char[] buffer = new char[cnt + 1];
458
		prompt.getChars (0, cnt, buffer, 0);
459
		int size = buffer.length * 2;
460
		int /*long*/ ptr = memory.Alloc (size);
461
		XPCOM.memmove (ptr, buffer, size);
462
		XPCOM.memmove (aValue, new int /* long */[] { ptr }, C.PTR_SIZEOF);
463
464
		if (valueAddr[0] != 0) {
465
			memory.Free (valueAddr[0]);
368
		}
466
		}
467
		memory.Release ();
369
	}
468
	}
370
	if (aCheckState != 0) XPCOM.memmove (aCheckState, check, 4);
371
	return XPCOM.NS_OK;
372
}
469
}
373
470
374
int PromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int level, int /*long*/ authInfo, int /*long*/ checkboxLabel, int /*long*/ checkboxValue, int /*long*/ _retval) {
471
int PromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int level, int /*long*/ authInfo, int /*long*/ checkboxLabel, int /*long*/ checkboxValue, int /*long*/ _retval) {
(-)Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java (+28 lines)
Lines 23-28 Link Here
23
	LocationListener[] locationListeners = new LocationListener[0];
23
	LocationListener[] locationListeners = new LocationListener[0];
24
	OpenWindowListener[] openWindowListeners = new OpenWindowListener[0];
24
	OpenWindowListener[] openWindowListeners = new OpenWindowListener[0];
25
	ProgressListener[] progressListeners = new ProgressListener[0];
25
	ProgressListener[] progressListeners = new ProgressListener[0];
26
	PromptListener[] promptListeners = new PromptListener[0];
26
	StatusTextListener[] statusTextListeners = new StatusTextListener[0];
27
	StatusTextListener[] statusTextListeners = new StatusTextListener[0];
27
	TitleListener[] titleListeners = new TitleListener[0];
28
	TitleListener[] titleListeners = new TitleListener[0];
28
	VisibilityWindowListener[] visibilityWindowListeners = new VisibilityWindowListener[0];
29
	VisibilityWindowListener[] visibilityWindowListeners = new VisibilityWindowListener[0];
Lines 232-237 Link Here
232
	progressListeners[progressListeners.length - 1] = listener;
233
	progressListeners[progressListeners.length - 1] = listener;
233
}
234
}
234
235
236
public void addPromptListener (PromptListener listener) {
237
	PromptListener[] newPromptListeners = new PromptListener[promptListeners.length + 1];
238
	System.arraycopy(promptListeners, 0, newPromptListeners, 0, promptListeners.length);
239
	promptListeners = newPromptListeners;
240
	promptListeners[promptListeners.length - 1] = listener;
241
}
242
235
public void addStatusTextListener (StatusTextListener listener) {
243
public void addStatusTextListener (StatusTextListener listener) {
236
	StatusTextListener[] newStatusTextListeners = new StatusTextListener[statusTextListeners.length + 1];
244
	StatusTextListener[] newStatusTextListeners = new StatusTextListener[statusTextListeners.length + 1];
237
	System.arraycopy(statusTextListeners, 0, newStatusTextListeners, 0, statusTextListeners.length);
245
	System.arraycopy(statusTextListeners, 0, newStatusTextListeners, 0, statusTextListeners.length);
Lines 519-524 Link Here
519
	progressListeners = newProgressListeners;
527
	progressListeners = newProgressListeners;
520
}
528
}
521
529
530
public void removePromptListener (PromptListener listener) {
531
	if (promptListeners.length == 0) return;
532
	int index = -1;
533
	for (int i = 0; i < promptListeners.length; i++) {
534
		if (listener == promptListeners[i]){
535
			index = i;
536
			break;
537
		}
538
	}
539
	if (index == -1) return;
540
	if (promptListeners.length == 1) {
541
		promptListeners = new PromptListener[0];
542
		return;
543
	}
544
	PromptListener[] newPromptListeners = new PromptListener[promptListeners.length - 1];
545
	System.arraycopy (promptListeners, 0, newPromptListeners, 0, index);
546
	System.arraycopy (promptListeners, index + 1, newPromptListeners, index, promptListeners.length - index - 1);
547
	promptListeners = newPromptListeners;
548
}
549
522
public void removeStatusTextListener (StatusTextListener listener) {
550
public void removeStatusTextListener (StatusTextListener listener) {
523
	if (statusTextListeners.length == 0) return;
551
	if (statusTextListeners.length == 0) return;
524
	int index = -1;
552
	int index = -1;
(-)Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java (+48 lines)
Lines 358-363 Link Here
358
}
358
}
359
359
360
/**	 
360
/**	 
361
 * Adds the listener to the collection of listeners who will
362
 * be notified when a dialog window has been requested by the
363
 * browser or a page loaded in the browser.
364
 *
365
 * @param listener the listener which should be notified
366
 *
367
 * @exception IllegalArgumentException <ul>
368
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
369
 * </ul>
370
 * 
371
 * @exception SWTException <ul>
372
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
373
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
374
 * </ul>
375
 *
376
 * @since 3.6
377
 */
378
public void addPromptListener (PromptListener listener) {
379
	checkWidget();
380
	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
381
	webBrowser.addPromptListener (listener);
382
}
383
384
/**	 
361
 * Adds the listener to the collection of listeners who will be
385
 * Adds the listener to the collection of listeners who will be
362
 * notified when the status text is changed.
386
 * notified when the status text is changed.
363
 * <p>
387
 * <p>
Lines 828-833 Link Here
828
}
852
}
829
853
830
/**	 
854
/**	 
855
 * Removes the listener from the collection of listeners who will 
856
 * be notified when a dialog window has been requested by the
857
 * browser or a page loaded in the browser.
858
 *
859
 * @param listener the listener which should no longer be notified
860
 *
861
 * @exception IllegalArgumentException <ul>
862
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
863
 * </ul>
864
 * 
865
 * @exception SWTException <ul>
866
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
867
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
868
 * </ul>
869
 * 
870
 * @since 3.6
871
 */
872
public void removePromptListener (PromptListener listener) {
873
	checkWidget();
874
	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
875
	webBrowser.removePromptListener (listener);
876
}
877
878
/**	 
831
 * Removes the listener from the collection of listeners who will
879
 * Removes the listener from the collection of listeners who will
832
 * be notified when the status text is changed.
880
 * be notified when the status text is changed.
833
 *
881
 *
(-)Eclipse (+39 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.swt.browser;
12
13
/**
14
 * This listener interface may be implemented in order to receive a
15
 * {@link PromptEvent} notification when the {@link Browser} encounters a page
16
 * that displays a dialog window.
17
 * 
18
 * @see Browser#addPromptListener(PromptListener)
19
 * @see Browser#removePromptListener(PromptListener)
20
 * 
21
 * @since 3.6
22
 */
23
public interface PromptListener {
24
25
	/**
26
	 * This method is called when a dialog box is requested to be displayed by
27
	 * the underlying browser. This encapsulates prompts from all of the
28
	 * javascript alert/confirm/prompt methods as well as any non-javascript
29
	 * dialogs from the browser.
30
	 * 
31
	 * @param event
32
	 *            the <code>PromptEvent</code> that holds the information about
33
	 *            the dialog requested
34
	 * 
35
	 * @since 3.6
36
	 */
37
	public void prompt(PromptEvent event);
38
39
}
(-)Eclipse (+85 lines)
Added Link Here
1
package org.eclipse.swt.browser;
2
3
import org.eclipse.swt.events.TypedEvent;
4
import org.eclipse.swt.widgets.Widget;
5
6
/**
7
 * A <code>PromptEvent</code> is sent by a {@link Browser} to
8
 * {@link PromptListener}s when the <code>Browser</code> requests that a dialog
9
 * box be drawn to the screen. This event allows a client to interact with any
10
 * of the buttons in the dialog box and possibly check checkboxes and/or change
11
 * the prompt text, or optionally do nothing and allow the user to access the
12
 * dialog box.
13
 * 
14
 * @see PromptListener
15
 * 
16
 * @since 3.6
17
 */
18
public class PromptEvent extends TypedEvent {
19
20
	private static final long serialVersionUID = -973372319865604852L;
21
22
	/**
23
	 * A flag indicating which button, if any, should be pressed instead of
24
	 * displaying the dialog. -1 indicates that no action should be taken (the
25
	 * dialog will be displayed in the display). If buttonLabels is is not null
26
	 * (and thus there are custom button labels), this value will be interpreted
27
	 * to be the button position in the array to press. Otherwise, it can have
28
	 * values of <code>SWT.OK</code> or <code>SWT.CANCEL</code>. Other values
29
	 * will be ignored.
30
	 */
31
	public int button = -1;
32
33
	/**
34
	 * The title of the dialog is available in every type of dialog, should be
35
	 * non-null, and is not returned to the browser.
36
	 */
37
	public String title = null;
38
39
	/**
40
	 * The text is the message in the dialog, should be non-null, and is not
41
	 * returned to the browser.
42
	 */
43
	public String text = null;
44
45
	/**
46
	 * The checkLabel is the label for an optional checkbox in the dialog. This
47
	 * will be null when the dialog does not contain a checkbox and is not
48
	 * returned to the browser.
49
	 */
50
	public String checkLabel = null;
51
52
	/**
53
	 * The checked value is whether or not an optional checkbox is checked or
54
	 * not. In the case where the checkLabel is non-null, this will hold the
55
	 * default value of the checkbox from the browser and it's post-event value
56
	 * will be returned to the browser.
57
	 */
58
	public boolean checked = false;
59
60
	/**
61
	 * The buttonLabels are the values of the buttons in the dialog. In the case
62
	 * of dialogs with buttons other than OK or CANCEL, this will have their
63
	 * values. Otherwise, it will be null.
64
	 */
65
	public String[] buttonLabels = null;
66
67
	/**
68
	 * The valueLabel is the value of a prompt text field, if one exists. If
69
	 * not, the value will be null. This value will be returned to the browser
70
	 * in the case of prompt dialogs when the OK button is pressed.
71
	 */
72
	public String valueLabel = null;
73
74
	/**
75
	 * Constructs a new instance of this class.
76
	 *
77
	 * @param widget the widget that fired the event
78
	 *
79
	 * @since 3.6
80
	 */
81
	public PromptEvent(Widget widget) {
82
		super(widget);
83
	}
84
85
}

Return to bug 288037