MessageBox

Introduction

MessageBox is a programatic only component in XUL. Meaning you cannot add it to the XUL doc. It's included for the sake of maintaining UI neutral code.

Properties

Property

Fires Events

Possible Values

Notes

message (String)

No

 

 

title (String)

No

 

 

acceptLabel (String)

No

 

 

height (int)

No

 

 

width (int)

No

 

 

icon (Object)

No

 

In the SWT implementation this can be the standard Integer for JFace dialogs "SWT.ERROR" for instance

message (String)

No

 

 

title (String)

No

 

 

scrollable (bool)

No

 

 

Methods

open() - Blocks in the case of Swing and SWT, but not in GWT. Hence the addition of the XulDialogCallback.
setModalParent(Object parent) - used to properly parent the dialog.

Sample Usage

XulMessageBox message = (XulMessageBox) document.createElementById("messagebox");
message.setTitle("Information");
message.setMessage("Database has gone offline.");
message.open();