net.sourceforge.java.feednread.frontend.wizard
Class WatchSettingsWizardPage

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.wizard.WizardPage
          extended bynet.sourceforge.java.feednread.frontend.wizard.WatchSettingsWizardPage
All Implemented Interfaces:
IDialogPage, IMessageProvider, IWizardPage

public class WatchSettingsWizardPage
extends WizardPage

WizardPage that lets the end-user manage the WatchSettingsEntry objects related to a WatchSettings object.

Author:
Sebastian Machhausen

Nested Class Summary
private  class WatchSettingsWizardPage.ButtonHandler
           Handles SelectionEvents triggered by the Buttons within the button bar.
 
Field Summary
private  Button addButton
           Button to add a WatchSettingsEntry object
private  WatchSettingsWizardPage.ButtonHandler buttonHandler
           Event handler for the Buttons
private  WatchSettingsTableContentProvider contentProvider
           Acts as model bridge for the TableViewer
private  Button editButton
           Button to edit a WatchSettingsEntry object
private  WatchSettingsTableLabelProvider labelProvider
           Converts model to gui presentable objects
private  Button removeAllButton
           Button to remove all WatchSettingsEntry objects
private  Button removeButton
           Button to remove a WatchSettingsEntry object
private  WatchSettings settings
           The WatchSettings object to be edited or added
private  Table settingsTable
          The Table to display WatchSettingsEntry objects.
private  TableViewer settingsViewer
           The TableViewer to control the management of WatchSettingsEntry objects
private  TableViewerSorter sorter
           Sorts the WatchSettingsEntries
private  TableViewerSorterHandler sorterHandler
           Handles the sorting on TableColumn header mouse clicks
 
Fields inherited from class org.eclipse.jface.wizard.WizardPage
 
Fields inherited from class org.eclipse.jface.dialogs.DialogPage
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
WatchSettingsWizardPage()
           Creates a new WatchSettingsWizardPage instance.
WatchSettingsWizardPage(WatchSettings settings)
           Creates a new WatchSettingsWizardPage instance.
 
Method Summary
private  void createButtonBar(Composite parent, LanguageResource resource)
           Creates the Button bar which holds the management buttons (add, edit, remove, remove all).
private  void createColumns(LanguageResource resource)
           Creates the TableColumns for the settingsTable component.
 void createControl(Composite parent)
           Creates the controls of this WatchSettingsWizardPage.
 void dispose()
           Disposes all resources claimed by this WatchSettingsWizardPage.
 WatchSettings getSettings()
           Gets the WatchSettings object edited or created by this WatchSettingsWizardPage depending on the mode it is running in.
private  void registerEventHandler()
           Registers all event handlers required by this WatchSettingsWizardPage.
private  void unregisterEventHandler()
           Unregisters all event handlers from this WatchSettingsWizardPage.
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Field Detail

settings

private WatchSettings settings

The WatchSettings object to be edited or added


settingsViewer

private TableViewer settingsViewer

The TableViewer to control the management of WatchSettingsEntry objects


contentProvider

private WatchSettingsTableContentProvider contentProvider

Acts as model bridge for the TableViewer


labelProvider

private WatchSettingsTableLabelProvider labelProvider

Converts model to gui presentable objects


sorter

private TableViewerSorter sorter

Sorts the WatchSettingsEntries


sorterHandler

private TableViewerSorterHandler sorterHandler

Handles the sorting on TableColumn header mouse clicks


settingsTable

private Table settingsTable
The Table to display WatchSettingsEntry objects.


addButton

private Button addButton

Button to add a WatchSettingsEntry object


editButton

private Button editButton

Button to edit a WatchSettingsEntry object


removeButton

private Button removeButton

Button to remove a WatchSettingsEntry object


removeAllButton

private Button removeAllButton

Button to remove all WatchSettingsEntry objects


buttonHandler

private WatchSettingsWizardPage.ButtonHandler buttonHandler

Event handler for the Buttons

Constructor Detail

WatchSettingsWizardPage

public WatchSettingsWizardPage()

Creates a new WatchSettingsWizardPage instance.

See Also:
WatchSettingsWizardPage(WatchSettings)

WatchSettingsWizardPage

public WatchSettingsWizardPage(WatchSettings settings)

Creates a new WatchSettingsWizardPage instance.

Parameters:
settings - the WatchSettings object to edit
See Also:
WatchSettingsWizardPage()
Method Detail

getSettings

public WatchSettings getSettings()

Gets the WatchSettings object edited or created by this WatchSettingsWizardPage depending on the mode it is running in.

Returns:
the WatchSettings object edited or created by this WatchSettingsWizardPage

dispose

public void dispose()

Disposes all resources claimed by this WatchSettingsWizardPage.


createControl

public void createControl(Composite parent)

Creates the controls of this WatchSettingsWizardPage.

Parameters:
parent - the parent Composite to embed the created controls into
See Also:
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)

createButtonBar

private void createButtonBar(Composite parent,
                             LanguageResource resource)

Creates the Button bar which holds the management buttons (add, edit, remove, remove all).

Parameters:
parent - the parent Composite to embed the Button bar into
resource - the LanguageResouce holding the localized Button labels

createColumns

private void createColumns(LanguageResource resource)

Creates the TableColumns for the settingsTable component.

Parameters:
resource - the LanguageResource holding the localized TableColumn headers

registerEventHandler

private void registerEventHandler()

Registers all event handlers required by this WatchSettingsWizardPage.

See Also:
unregisterEventHandler()

unregisterEventHandler

private void unregisterEventHandler()

Unregisters all event handlers from this WatchSettingsWizardPage.

See Also:
registerEventHandler()