public abstract class WizardDataTransferPage extends WizardPage implements Listener, IOverwriteQuery
This class is not intended to be subclassed outside of the workbench.
Modifier and Type | Field and Description |
---|---|
protected static int |
COMBO_HISTORY_LENGTH |
protected static int |
SIZING_TEXT_FIELD_WIDTH |
ERROR, INFORMATION, NONE, WARNING
Modifier | Constructor and Description |
---|---|
protected |
WizardDataTransferPage(String pageName)
Creates a new wizard page.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToHistory(List history,
String newEntry)
Adds an entry to a history, while taking care of duplicate history items
and excessively long histories.
|
protected String[] |
addToHistory(String[] history,
String newEntry)
Adds an entry to a history, while taking care of duplicate history items
and excessively long histories.
|
protected abstract boolean |
allowNewContainerName()
Return whether the user is allowed to enter a new container name or just
choose from existing ones.
|
protected Label |
createBoldLabel(Composite parent,
String text)
Creates a new label with a bold font.
|
protected void |
createOptionsGroup(Composite parent)
Create the options specification widgets.
|
protected void |
createOptionsGroupButtons(Group optionsGroup)
Creates the import/export options group controls.
|
protected Label |
createPlainLabel(Composite parent,
String text)
Creates a new label with a bold font.
|
protected void |
createSpacer(Composite parent)
Creates a horizontal spacer line that fills the width of its container.
|
protected boolean |
determinePageCompletion()
Returns whether this page is complete.
|
protected void |
displayErrorDialog(String message)
Display an error dialog with the specified message.
|
protected void |
displayErrorDialog(Throwable exception)
Display an error dislog with the information from the
supplied exception.
|
protected String |
getErrorDialogTitle()
Get the title for an error dialog.
|
protected IPath |
getPathFromText(Text textField)
Get a path from the supplied text widget.
|
protected IPath |
queryForContainer(IContainer initialSelection,
String msg)
Queries the user to supply a container resource.
|
protected IPath |
queryForContainer(IContainer initialSelection,
String msg,
String title)
Queries the user to supply a container resource.
|
String |
queryOverwrite(String pathString)
The
WizardDataTransfer implementation of this
IOverwriteQuery method asks the user whether the existing
resource at the given path should be overwritten. |
protected boolean |
queryYesNoQuestion(String message)
Displays a Yes/No question to the user with the specified message and returns
the user's response.
|
protected void |
restoreWidgetValues()
Restores control settings that were saved in the previous instance of this
page.
|
protected void |
saveWidgetValues()
Saves control settings that are to be restored in the next instance of
this page.
|
protected void |
updatePageCompletion()
Determine if the page is complete and update the page appropriately.
|
protected void |
updateWidgetEnablements()
Updates the enable state of this page's controls.
|
protected boolean |
validateDestinationGroup()
Returns whether this page's destination specification controls currently all
contain valid values.
|
protected boolean |
validateOptionsGroup()
Returns whether this page's options group's controls currently all contain
valid values.
|
protected boolean |
validateSourceGroup()
Returns whether this page's source specification controls currently all
contain valid values.
|
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
handleEvent
createControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
protected static final int SIZING_TEXT_FIELD_WIDTH
protected static final int COMBO_HISTORY_LENGTH
protected WizardDataTransferPage(String pageName)
pageName
- the name of the pageprotected String[] addToHistory(String[] history, String newEntry)
WizardDataTransferPage.COMBO_HISTORY_LENGTH
.history
- the current historynewEntry
- the entry to add to the historyprotected void addToHistory(List history, String newEntry)
WizardDataTransferPage.COMBO_HISTORY_LENGTH
.history
- the current historynewEntry
- the entry to add to the historyprotected abstract boolean allowNewContainerName()
Subclasses must implement this method.
true
if new ones are okay, and false
if only existing ones are allowedprotected Label createBoldLabel(Composite parent, String text)
parent
- the parent controltext
- the label textprotected void createOptionsGroupButtons(Group optionsGroup)
The WizardDataTransferPage
implementation of this method does
nothing. Subclasses wishing to define such components should reimplement
this hook method.
optionsGroup
- the parent controlprotected Label createPlainLabel(Composite parent, String text)
parent
- the parent controltext
- the label textprotected void createSpacer(Composite parent)
parent
- the parent controlprotected boolean determinePageCompletion()
validateSourceGroup
and/or validateOptionsGroup
.true
if this page is complete, and false
if
incompletevalidateSourceGroup()
,
validateOptionsGroup()
protected IPath getPathFromText(Text textField)
protected IPath queryForContainer(IContainer initialSelection, String msg)
null
if the
user cancelled the dialogprotected IPath queryForContainer(IContainer initialSelection, String msg, String title)
null
if the
user cancelled the dialogpublic String queryOverwrite(String pathString)
WizardDataTransfer
implementation of this
IOverwriteQuery
method asks the user whether the existing
resource at the given path should be overwritten.queryOverwrite
in interface IOverwriteQuery
pathString
- "YES"
, "NO"
, "ALL"
,
or "CANCEL"
protected boolean queryYesNoQuestion(String message)
message
- the question to asktrue
for Yes, and false
for Noprotected void restoreWidgetValues()
The WizardDataTransferPage
implementation of this method does
nothing. Subclasses may override this hook method.
protected void saveWidgetValues()
The WizardDataTransferPage
implementation of this method does
nothing. Subclasses may override this hook method.
protected void updatePageCompletion()
protected void updateWidgetEnablements()
The WizardDataTransferPage
implementation of this method does
nothing. Subclasses may extend this hook method.
protected boolean validateDestinationGroup()
The WizardDataTransferPage
implementation of this method returns
true
. Subclasses may reimplement this hook method.
true
indicating validity of all controls in the
destination specification groupprotected boolean validateOptionsGroup()
The WizardDataTransferPage
implementation of this method returns
true
. Subclasses may reimplement this hook method.
true
indicating validity of all controls in the options
groupprotected boolean validateSourceGroup()
The WizardDataTransferPage
implementation of this method returns
true
. Subclasses may reimplement this hook method.
true
indicating validity of all controls in the
source specification groupprotected void createOptionsGroup(Composite parent)
parent
- org.eclipse.swt.widgets.Compositeprotected void displayErrorDialog(String message)
message
- the error messageprotected void displayErrorDialog(Throwable exception)
exception
- Throwableprotected String getErrorDialogTitle()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.