Class WizardDataTransferPage
- All Implemented Interfaces:
- IDialogPage,- IMessageProvider,- IWizardPage,- Listener,- IOverwriteQuery
- Direct Known Subclasses:
- WizardExportResourcesPage,- WizardResourceImportPage
This class is not intended to be subclassed outside of the workbench.
- Restriction:
- This class is not intended to be subclassed by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intFields inherited from interface org.eclipse.jface.dialogs.IMessageProviderERROR, INFORMATION, NONE, WARNING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedWizardDataTransferPage(String pageName) Creates a new wizard page.
- 
Method SummaryModifier and TypeMethodDescriptionprotected String[]addToHistory(String[] history, String newEntry) Adds an entry to a history, while taking care of duplicate history items and excessively long histories.protected voidaddToHistory(List history, String newEntry) Adds an entry to a history, while taking care of duplicate history items and excessively long histories.protected abstract booleanReturn whether the user is allowed to enter a new container name or just choose from existing ones.protected LabelcreateBoldLabel(Composite parent, String text) Creates a new label with a bold font.protected voidcreateOptionsGroup(Composite parent) Create the options specification widgets.protected voidcreateOptionsGroupButtons(Group optionsGroup) Creates the import/export options group controls.protected LabelcreatePlainLabel(Composite parent, String text) Creates a new label with a bold font.protected voidcreateSpacer(Composite parent) Creates a horizontal spacer line that fills the width of its container.protected booleanReturns whether this page is complete.protected voiddisplayErrorDialog(String message) Display an error dialog with the specified message.protected voiddisplayErrorDialog(Throwable exception) Display an error dislog with the information from the supplied exception.protected StringGet the title for an error dialog.protected IPathgetPathFromText(Text textField) Get a path from the supplied text widget.protected IPathqueryForContainer(IContainer initialSelection, String msg) Queries the user to supply a container resource.protected IPathqueryForContainer(IContainer initialSelection, String msg, String title) Queries the user to supply a container resource.queryOverwrite(String pathString) TheWizardDataTransferimplementation of thisIOverwriteQuerymethod asks the user whether the existing resource at the given path should be overwritten.protected booleanqueryYesNoQuestion(String message) Displays a Yes/No question to the user with the specified message and returns the user's response.protected voidRestores control settings that were saved in the previous instance of this page.protected voidSaves control settings that are to be restored in the next instance of this page.protected voidDetermine if the page is complete and update the page appropriately.protected voidUpdates the enable state of this page's controls.protected booleanReturns whether this page's destination specification controls currently all contain valid values.protected booleanReturns whether this page's options group's controls currently all contain valid values.protected booleanReturns whether this page's source specification controls currently all contain valid values.Methods inherited from class org.eclipse.jface.wizard.WizardPagecanFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toStringMethods inherited from class org.eclipse.jface.dialogs.DialogPageconvertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPagecreateControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisibleMethods inherited from interface org.eclipse.jface.wizard.IWizardPagegetMinimumPageSizeMethods inherited from interface org.eclipse.swt.widgets.ListenerhandleEvent
- 
Field Details- 
SIZING_TEXT_FIELD_WIDTHprotected static final int SIZING_TEXT_FIELD_WIDTH- See Also:
 
- 
COMBO_HISTORY_LENGTHprotected static final int COMBO_HISTORY_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
WizardDataTransferPageCreates a new wizard page.- Parameters:
- pageName- the name of the page
 
 
- 
- 
Method Details- 
addToHistoryAdds an entry to a history, while taking care of duplicate history items and excessively long histories. The assumption is made that all histories should be of lengthWizardDataTransferPage.COMBO_HISTORY_LENGTH.- Parameters:
- history- the current history
- newEntry- the entry to add to the history
 
- 
addToHistoryAdds an entry to a history, while taking care of duplicate history items and excessively long histories. The assumption is made that all histories should be of lengthWizardDataTransferPage.COMBO_HISTORY_LENGTH.- Parameters:
- history- the current history
- newEntry- the entry to add to the history
 
- 
allowNewContainerNameprotected abstract boolean allowNewContainerName()Return whether the user is allowed to enter a new container name or just choose from existing ones.Subclasses must implement this method. - Returns:
- trueif new ones are okay, and- falseif only existing ones are allowed
 
- 
createBoldLabelCreates a new label with a bold font.- Parameters:
- parent- the parent control
- text- the label text
- Returns:
- the new label control
 
- 
createOptionsGroupButtonsCreates the import/export options group controls.The WizardDataTransferPageimplementation of this method does nothing. Subclasses wishing to define such components should reimplement this hook method.- Parameters:
- optionsGroup- the parent control
 
- 
createPlainLabelCreates a new label with a bold font.- Parameters:
- parent- the parent control
- text- the label text
- Returns:
- the new label control
 
- 
createSpacerCreates a horizontal spacer line that fills the width of its container.- Parameters:
- parent- the parent control
 
- 
determinePageCompletionprotected boolean determinePageCompletion()Returns whether this page is complete. This determination is made based upon the current contents of this page's controls. Subclasses wishing to include their controls in this determination should override the hook methodsvalidateSourceGroupand/orvalidateOptionsGroup.- Returns:
- trueif this page is complete, and- falseif incomplete
- See Also:
 
- 
getPathFromTextGet a path from the supplied text widget.- Returns:
- org.eclipse.core.runtime.IPath
 
- 
queryForContainerQueries the user to supply a container resource.- Returns:
- the path to an existing or new container, or nullif the user cancelled the dialog
 
- 
queryForContainerQueries the user to supply a container resource.- Returns:
- the path to an existing or new container, or nullif the user cancelled the dialog
 
- 
queryOverwriteTheWizardDataTransferimplementation of thisIOverwriteQuerymethod asks the user whether the existing resource at the given path should be overwritten.- Specified by:
- queryOverwritein interface- IOverwriteQuery
- Parameters:
- pathString- desired path which might be overwritten
- Returns:
- the user's reply: one of "YES","NO","ALL", or"CANCEL"
 
- 
queryYesNoQuestionDisplays a Yes/No question to the user with the specified message and returns the user's response.- Parameters:
- message- the question to ask
- Returns:
- truefor Yes, and- falsefor No
 
- 
restoreWidgetValuesprotected void restoreWidgetValues()Restores control settings that were saved in the previous instance of this page.The WizardDataTransferPageimplementation of this method does nothing. Subclasses may override this hook method.
- 
saveWidgetValuesprotected void saveWidgetValues()Saves control settings that are to be restored in the next instance of this page.The WizardDataTransferPageimplementation of this method does nothing. Subclasses may override this hook method.
- 
updatePageCompletionprotected void updatePageCompletion()Determine if the page is complete and update the page appropriately.
- 
updateWidgetEnablementsprotected void updateWidgetEnablements()Updates the enable state of this page's controls.The WizardDataTransferPageimplementation of this method does nothing. Subclasses may extend this hook method.
- 
validateDestinationGroupprotected boolean validateDestinationGroup()Returns whether this page's destination specification controls currently all contain valid values.The WizardDataTransferPageimplementation of this method returnstrue. Subclasses may reimplement this hook method.- Returns:
- trueindicating validity of all controls in the destination specification group
 
- 
validateOptionsGroupprotected boolean validateOptionsGroup()Returns whether this page's options group's controls currently all contain valid values.The WizardDataTransferPageimplementation of this method returnstrue. Subclasses may reimplement this hook method.- Returns:
- trueindicating validity of all controls in the options group
 
- 
validateSourceGroupprotected boolean validateSourceGroup()Returns whether this page's source specification controls currently all contain valid values.The WizardDataTransferPageimplementation of this method returnstrue. Subclasses may reimplement this hook method.- Returns:
- trueindicating validity of all controls in the source specification group
 
- 
createOptionsGroupCreate the options specification widgets.- Parameters:
- parent- org.eclipse.swt.widgets.Composite
 
- 
displayErrorDialogDisplay an error dialog with the specified message.- Parameters:
- message- the error message
 
- 
displayErrorDialogDisplay an error dislog with the information from the supplied exception.- Parameters:
- exception- Throwable
 
- 
getErrorDialogTitleGet the title for an error dialog. Subclasses should override.
 
-