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

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

public class FavoriteSelectionWizardPage
extends WizardPage

WizardPage that lets the end-user select the Favorites which should be watched.

Author:
Sebastian Machhausen

Field Summary
private  TreeViewerContentProvider contentProvider
           Provides the data for the CheckBoxTreeViewer
private  Button deselectAllButton
           Button to deselect the entire CheckBoxTreeViewer
private  Tree favoritesTree
           The Tree to display the Favorites to select from
private  NewsFeedFavoritesTreeLabelProvider labelProvider
           Converts Category and Favorite objects to gui presentable objects
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  Button selectAllButton
           Button to select the entire CheckBoxTreeViewer
private  IMutableTreeElement[] selectedElements
           The selected IMutableTreeElements; null if in add mode or selection is empty;
private  ContainerCheckedTreeViewer treeViewer
           The CheckboxTreeViewer used to select the Favorites to be watched.
 
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
FavoriteSelectionWizardPage(MainApplicationWindow mainWindow)
           Creates a new FavoriteSelectionWizardPage instance.
FavoriteSelectionWizardPage(MainApplicationWindow mainWindow, IMutableTreeElement[] selectedElements)
           Creates a new FavoriteSelectionWizardPage instance.
 
Method Summary
private  void createButtonBar(Composite parent, IMutableTreeElement root)
           Creates the Button bar holding the selectAllButton and deselectAllButton to select resp. deselect all Favorites.
 void createControl(Composite parent)
           Creates the controls of this FavoriteSelectionWizardPage.
 void dispose()
           Disposes all resources claimed by this FavoriteSelectionWizardPage.
 IMutableTreeElement[] getSelectedElements()
           Gets the IMutableTreeElements as selected by the end-user in this FavoriteSelectionWizardPage
private  void setSelectedElements()
           Updates this FavoriteSelectionWizardPage with the IMutableTreeElements set in selectedElements;
 
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

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


selectedElements

private IMutableTreeElement[] selectedElements

The selected IMutableTreeElements; null if in add mode or selection is empty;


treeViewer

private ContainerCheckedTreeViewer treeViewer

The CheckboxTreeViewer used to select the Favorites to be watched.


favoritesTree

private Tree favoritesTree

The Tree to display the Favorites to select from


contentProvider

private TreeViewerContentProvider contentProvider

Provides the data for the CheckBoxTreeViewer


labelProvider

private NewsFeedFavoritesTreeLabelProvider labelProvider

Converts Category and Favorite objects to gui presentable objects


selectAllButton

private Button selectAllButton

Button to select the entire CheckBoxTreeViewer


deselectAllButton

private Button deselectAllButton

Button to deselect the entire CheckBoxTreeViewer

Constructor Detail

FavoriteSelectionWizardPage

public FavoriteSelectionWizardPage(MainApplicationWindow mainWindow)

Creates a new FavoriteSelectionWizardPage instance.

Parameters:
mainWindow - the Feed'n Read main window
See Also:
FavoriteSelectionWizardPage(MainApplicationWindow, IMutableTreeElement[])

FavoriteSelectionWizardPage

public FavoriteSelectionWizardPage(MainApplicationWindow mainWindow,
                                   IMutableTreeElement[] selectedElements)

Creates a new FavoriteSelectionWizardPage instance.

Parameters:
mainWindow - the Feed'n Read main window
selectedElements - the IMutableTreeElements to preselect
See Also:
FavoriteSelectionWizardPage(MainApplicationWindow)
Method Detail

getSelectedElements

public IMutableTreeElement[] getSelectedElements()

Gets the IMutableTreeElements as selected by the end-user in this FavoriteSelectionWizardPage

Returns:
an array holding the selected IMutableTreeElements

dispose

public void dispose()

Disposes all resources claimed by this FavoriteSelectionWizardPage.


createControl

public void createControl(Composite parent)

Creates the controls of this FavoriteSelectionWizardPage.

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,
                             IMutableTreeElement root)

Creates the Button bar holding the selectAllButton and deselectAllButton to select resp. deselect all Favorites.

Parameters:
parent - the Composite to embed the created Button bar into
root - the root IMutableTreeElement to use for the select/deselect all operations

setSelectedElements

private void setSelectedElements()

Updates this FavoriteSelectionWizardPage with the IMutableTreeElements set in selectedElements;