net.sourceforge.geeboss.view.dialog
Class PreferencesDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by net.sourceforge.geeboss.view.dialog.PreferencesDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class PreferencesDialog
extends org.eclipse.jface.dialogs.Dialog

The preferences dialog allows the user to change Geeboss's preferences. The user selects one of the categories from the left tree: + Workbench - Hotkeys - Language - View - Midi Every category offers a "Restore defaults" button to reset to the default settings. The "Apply" or "OK" Button saves the settings.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
static int mLastOpenedPropertyPage
          Remember the last opened property page
 
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
PreferencesDialog(org.eclipse.swt.widgets.Shell parentShell, java.lang.String dialogTitle, MainView geebossGui)
          Creates a Dialog with a tree holding different categories.
 
Method Summary
protected  void buttonPressed(int buttonId)
           
protected  void configureShell(org.eclipse.swt.widgets.Shell shell)
           
protected  org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected  void initializeBounds()
           
protected  void initializeBounds(boolean updateLocation)
          Set size and location of the dialog
protected  void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
          Set the layout data of the button to a GridData with appropriate widths This method was slightly modified so that it is not setting a heightHint.
protected  void setShellStyle(int newShellStyle)
           
 void updateI18N()
          Update I18N - Is only called from the Language properties view!
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeDialogUnits, okPressed, setBlockedHandler, 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, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLastOpenedPropertyPage

public static int mLastOpenedPropertyPage
Remember the last opened property page

Constructor Detail

PreferencesDialog

public PreferencesDialog(org.eclipse.swt.widgets.Shell parentShell,
                         java.lang.String dialogTitle,
                         MainView geebossGui)
Creates a Dialog with a tree holding different categories. Each selected tree item will open a view to change some settings. Note that the dialog will have no visual representation (no widgets) until it is told to open.

Note that the open method blocks for input dialogs.

Parameters:
parentShell - the parent shell
dialogTitle - the dialog title, or null if none
geebossGui - The MainController
Method Detail

updateI18N

public void updateI18N()
Update I18N - Is only called from the Language properties view!


buttonPressed

protected void buttonPressed(int buttonId)
Overrides:
buttonPressed in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.buttonPressed(int)

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell shell)
Overrides:
configureShell in class org.eclipse.jface.window.Window
See Also:
Window.configureShell(org.eclipse.swt.widgets.Shell)

createButtonBar

protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
Overrides:
createButtonBar in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.createButtonBar(org.eclipse.swt.widgets.Composite)

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.createDialogArea(org.eclipse.swt.widgets.Composite)

initializeBounds

protected void initializeBounds()
Overrides:
initializeBounds in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.initializeBounds()

initializeBounds

protected void initializeBounds(boolean updateLocation)
Set size and location of the dialog

Parameters:
updateLocation - If true also update the location of the dialog

setButtonLayoutData

protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
Set the layout data of the button to a GridData with appropriate widths This method was slightly modified so that it is not setting a heightHint.

Overrides:
setButtonLayoutData in class org.eclipse.jface.dialogs.Dialog
Parameters:
button - The button to layout

setShellStyle

protected void setShellStyle(int newShellStyle)
Overrides:
setShellStyle in class org.eclipse.jface.window.Window
See Also:
Window.setShellStyle(int)


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.