## org.eclipse.contribution.visualiser.internal.preference
Class VisualiserPreferencesDialog

    java.lang.Object
      org.eclipse.jface.window.Window
          org.eclipse.jface.dialogs.Dialog
              org.eclipse.contribution.visualiser.internal.preference.VisualiserPreferencesDialog

All Implemented Interfaces:
  org.eclipse.jface.preference.IPreferencePageContainer, org.eclipse.jface.window.IShellProvider

public class VisualiserPreferencesDialog
extends org.eclipse.jface.dialogs.Dialog
implements org.eclipse.jface.preference.IPreferencePageContainer

Dialog containing Visualiser preferences Mostly copied from org.eclipse.jface.preference.PreferenceDialog

Nested Class Summary

Nested classes inherited from class org.eclipse.jface.window.Window
`org.eclipse.jface.window.Window.IExceptionHandler`

Field Summary
`static java.lang.String` `PREF_DLG_IMG_TITLE_ERROR`
`static java.lang.String` `PREF_DLG_TITLE_IMG`
`protected org.eclipse.swt.graphics.Color` `titleAreaColor`

Fields inherited from class org.eclipse.jface.dialogs.Dialog
`blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS`

Fields inherited from class org.eclipse.jface.window.Window
`CANCEL, OK`

Constructor Summary
`VisualiserPreferencesDialog(org.eclipse.swt.widgets.Shell parentShell)` Default constructor

Method Summary
`boolean` `close()` Disposes the preference page
`protected void` `configureShell(org.eclipse.swt.widgets.Shell shell)` Override to set the title
`protected org.eclipse.swt.widgets.Control` `createDialogArea(org.eclipse.swt.widgets.Composite parent)` Create the contents of the dialog
`org.eclipse.jface.preference.IPreferenceStore` `getPreferenceStore()` Get the preference store
`protected void` `okPressed()` Called when OK is pressed in the dialog.
`void` `setErrorMessage(java.lang.String newErrorMessage)` Display the given error message.
`void` `setMessage(java.lang.String newMessage)` Set the message text.
`void` `setMessage(java.lang.String newMessage, int newType)` Sets the message for this dialog with an indication of what type of message it is.
`void` `updateButtons()` Update the enabled state of buttons in the page
`void` `updateMessage()` Update the message
`void` `updateTitle()` Update the title

Methods inherited from class org.eclipse.jface.dialogs.Dialog

`applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText`

Methods inherited from class org.eclipse.jface.window.Window

`canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PREF_DLG_TITLE_IMG

    public static final java.lang.String PREF_DLG_TITLE_IMG

See Also:
  Constant Field Values

### PREF_DLG_IMG_TITLE_ERROR

    public static final java.lang.String PREF_DLG_IMG_TITLE_ERROR

See Also:
  Constant Field Values

### titleAreaColor

    protected org.eclipse.swt.graphics.Color titleAreaColor

Constructor Detail

### VisualiserPreferencesDialog

    public VisualiserPreferencesDialog(org.eclipse.swt.widgets.Shell parentShell)

  Default constructor

Parameters:
  `parentShell` -

Method Detail

### configureShell

    protected void configureShell(org.eclipse.swt.widgets.Shell shell)

  Override to set the title

### createDialogArea

    protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)

  Create the contents of the dialog

### setErrorMessage

    public void setErrorMessage(java.lang.String newErrorMessage)

  Display the given error message. The currently displayed message is saved and will be redisplayed when the error message is set to `null`.

  Parameters:
    `newErrorMessage` - the errorMessage to display or `null`

### getPreferenceStore

    public org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()

  Get the preference store

  Specified by:
    `getPreferenceStore` in interface `org.eclipse.jface.preference.IPreferencePageContainer`
  See Also:
    `IPreferencePageContainer.getPreferenceStore()`

### updateButtons

    public void updateButtons()

  Update the enabled state of buttons in the page

  Specified by:
    `updateButtons` in interface `org.eclipse.jface.preference.IPreferencePageContainer`
  See Also:
    `IPreferencePageContainer.updateButtons()`

### setMessage

    public void setMessage(java.lang.String newMessage)

  Set the message text. If the message line currently displays an error, the message is stored and will be shown after a call to clearErrorMessage

  Shortcut for `setMessage(newMessage, NONE)`

  Parameters:
    `newMessage` - the message, or `null` to clear the message

### setMessage

    public void setMessage(java.lang.String newMessage,
                           int newType)

  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.

  Parameters:
    `newMessage` - the message, or `null` to clear the message
    `newType` - the message type

### updateMessage

    public void updateMessage()

  Update the message

  Specified by:
    `updateMessage` in interface `org.eclipse.jface.preference.IPreferencePageContainer`
  See Also:
    `IPreferencePageContainer.updateMessage()`

### updateTitle

    public void updateTitle()

  Update the title

  Specified by:
    `updateTitle` in interface `org.eclipse.jface.preference.IPreferencePageContainer`
  See Also:
    `IPreferencePageContainer.updateTitle()`

### close

    public boolean close()

  Disposes the preference page

### okPressed

    protected void okPressed()

  Called when OK is pressed in the dialog. Send OK to the visualiser prefernce page contained in this dialog