A preference dialog is a hierarchical presentation of preference pages. Each
page is represented by a node in the tree shown on the left hand side of the
dialog; when a node is selected, the corresponding page is shown on the right
hand side.

The preference dialog implementation of this Dialog
framework method sends performOk to all pages of the
preference dialog, then calls handleSave on this dialog to
save any state, and then calls close to close this dialog.

Method Detail

buttonPressed

Notifies that this dialog's button with the given id has been pressed.

The Dialog implementation of this framework method calls
okPressed if the ok button is the pressed, and
cancelPressed if the cancel button is the pressed. All
other button presses are ignored. Subclasses may override to handle other
buttons, but should call super.buttonPressed if the
default handling of the ok and cancel buttons is desired.

createButtonsForButtonBar

The Dialog implementation of this framework method adds
standard ok and cancel buttons using the createButton
framework method. These standard buttons will be accessible from
getCancelButton, and getOKButton.
Subclasses may override.

Note: The common button order is: {other buttons}, OK, Cancel.
On some platforms, Dialog.initializeBounds() will move the default button to the right.

createContents

The Dialog implementation of this Window
method creates and lays out the top level composite for the dialog, and
determines the appropriate horizontal and vertical dialog units based on
the font size. It then calls the createDialogArea and
createButtonBar methods to create the dialog area and
button bar, respectively. Overriding createDialogArea and
createButtonBar are recommended rather than overriding
this method.

layoutTreeAreaControl

okPressed

protected void okPressed()

The preference dialog implementation of this Dialog
framework method sends performOk to all pages of the
preference dialog, then calls handleSave on this dialog to
save any state, and then calls close to close this dialog.

setMessage

Sets the message for this dialog with an indication of what type of
message it is.

The valid message types are one of NONE,
INFORMATION,WARNING, or
ERROR.

Note that for backward compatibility, a message of type
ERROR is different than an error message (set using
setErrorMessage). An error message overrides the current
message until the error message is cleared. This method replaces the
current message and does not affect the error message.

isResizable

Returns a boolean indicating whether the dialog should be
considered resizable when the shell style is initially
set.
This method is used to ensure that all style
bits appropriate for resizable dialogs are added to the
shell style. Individual dialogs may always set the shell
style to ensure that a dialog is resizable, but using this
method ensures that resizable dialogs will be created with
the same set of style bits.
Style bits will never be removed based on the return value
of this method. For example, if a dialog returns
false, but also sets a style bit for a
SWT.RESIZE border, the style bit will be honored.