org.eclipse.mylar.internal.tasks.ui.wizards
Class TaskDataExportWizardPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.mylar.internal.tasks.ui.wizards.TaskDataExportWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class TaskDataExportWizardPage
extends org.eclipse.jface.wizard.WizardPage

Wizard Page for the Task Data Export Wizard

Author:
Wesley Coelho, Mik Kersten

Field Summary
private static java.lang.String ACTIVATION_HISTORY_SETTING
           
private  org.eclipse.swt.widgets.Button browseButton
           
private static java.lang.String CONTEXTS_SETTING
           
private static java.lang.String DEST_DIR_SETTING
           
private  org.eclipse.swt.widgets.Text destDirText
           
private static java.lang.String LABEL_ACTIVITY_HISTORY
           
private static java.lang.String LABEL_TASK_CONTEXTS
           
private static java.lang.String LABEL_TASK_LIST
           
private static java.lang.String OVERWRITE_SETTING
           
private  org.eclipse.swt.widgets.Button overwriteCheckBox
           
static java.lang.String PAGE_NAME
           
protected static java.lang.String PAGE_TITLE
           
private static java.lang.String SETTINGS_SAVED
           
private  org.eclipse.swt.widgets.Button taskActivationHistoryCheckBox
           
private  org.eclipse.swt.widgets.Button taskContextsCheckBox
           
private static java.lang.String TASKLIST_SETTING
           
private  org.eclipse.swt.widgets.Button taskListCheckBox
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
TaskDataExportWizardPage()
           
 
Method Summary
 void controlChanged()
          Called to indicate that a control's value has changed
protected  org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Convenience method for creating a new checkbox
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Create the widgets on the page
private  void createExportDirectoryControl(org.eclipse.swt.widgets.Composite parent)
          Create widgets for specifying the destination directory
private  void createFileSelectionControl(org.eclipse.swt.widgets.Composite parent)
          Create widgets for selecting the data files to export
 boolean exportActivationHistory()
          True if the user wants to export task activation history
 boolean exportTaskContexts()
          True if the user wants to export task context files
 boolean exportTaskList()
          True if the user wants to export the task list
 java.lang.String getDestinationDirectory()
          Returns the directory where data files are to be saved
 java.lang.String getName()
           
protected  void initSettings()
          Initializes controls with values from the Dialog Settings object
 boolean overwrite()
          True if the user wants to overwrite files by default
 void saveSettings()
          Saves the control values in the dialog settings to be used as defaults the next time the page is opened
 void setParameters(boolean overwrite, boolean exportTaskList, boolean exportActivationHistory, boolean exportTaskContexts, boolean zip, java.lang.String destinationDir)
          For testing only.
protected  boolean validate()
          Returns true if the information entered by the user is valid
 boolean zip()
          True if the user wants to write to a zip file
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, 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, dispose, 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
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Field Detail

LABEL_TASK_LIST

private static final java.lang.String LABEL_TASK_LIST
See Also:
Constant Field Values

LABEL_TASK_CONTEXTS

private static final java.lang.String LABEL_TASK_CONTEXTS
See Also:
Constant Field Values

LABEL_ACTIVITY_HISTORY

private static final java.lang.String LABEL_ACTIVITY_HISTORY
See Also:
Constant Field Values

PAGE_TITLE

protected static final java.lang.String PAGE_TITLE
See Also:
Constant Field Values

PAGE_NAME

public static final java.lang.String PAGE_NAME
See Also:
Constant Field Values

taskListCheckBox

private org.eclipse.swt.widgets.Button taskListCheckBox

taskActivationHistoryCheckBox

private org.eclipse.swt.widgets.Button taskActivationHistoryCheckBox

taskContextsCheckBox

private org.eclipse.swt.widgets.Button taskContextsCheckBox

browseButton

private org.eclipse.swt.widgets.Button browseButton

destDirText

private org.eclipse.swt.widgets.Text destDirText

overwriteCheckBox

private org.eclipse.swt.widgets.Button overwriteCheckBox

SETTINGS_SAVED

private static final java.lang.String SETTINGS_SAVED
See Also:
Constant Field Values

TASKLIST_SETTING

private static final java.lang.String TASKLIST_SETTING
See Also:
Constant Field Values

ACTIVATION_HISTORY_SETTING

private static final java.lang.String ACTIVATION_HISTORY_SETTING
See Also:
Constant Field Values

CONTEXTS_SETTING

private static final java.lang.String CONTEXTS_SETTING
See Also:
Constant Field Values

DEST_DIR_SETTING

private static final java.lang.String DEST_DIR_SETTING
See Also:
Constant Field Values

OVERWRITE_SETTING

private static final java.lang.String OVERWRITE_SETTING
See Also:
Constant Field Values
Constructor Detail

TaskDataExportWizardPage

public TaskDataExportWizardPage()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
getName in class org.eclipse.jface.wizard.WizardPage

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Create the widgets on the page


createFileSelectionControl

private void createFileSelectionControl(org.eclipse.swt.widgets.Composite parent)
Create widgets for selecting the data files to export


createExportDirectoryControl

private void createExportDirectoryControl(org.eclipse.swt.widgets.Composite parent)
Create widgets for specifying the destination directory


initSettings

protected void initSettings()
Initializes controls with values from the Dialog Settings object


saveSettings

public void saveSettings()
Saves the control values in the dialog settings to be used as defaults the next time the page is opened


createCheckBox

protected org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String text)
Convenience method for creating a new checkbox


controlChanged

public void controlChanged()
Called to indicate that a control's value has changed


validate

protected boolean validate()
Returns true if the information entered by the user is valid


getDestinationDirectory

public java.lang.String getDestinationDirectory()
Returns the directory where data files are to be saved


exportTaskList

public boolean exportTaskList()
True if the user wants to export the task list


exportActivationHistory

public boolean exportActivationHistory()
True if the user wants to export task activation history


exportTaskContexts

public boolean exportTaskContexts()
True if the user wants to export task context files


overwrite

public boolean overwrite()
True if the user wants to overwrite files by default


zip

public boolean zip()
True if the user wants to write to a zip file


setParameters

public void setParameters(boolean overwrite,
                          boolean exportTaskList,
                          boolean exportActivationHistory,
                          boolean exportTaskContexts,
                          boolean zip,
                          java.lang.String destinationDir)
For testing only. Sets controls to the specified values