Class ValidationDialog
- All Implemented Interfaces:
IValidationMessage, IPageChangeProvider, IRunnableContext, IShellProvider, IWizardContainer, IWizardContainer2
Template validation dialog box for a large composite. On top of this composite is created a banner like the "New Wizard" does, and the bottom contains the OK and Cancel buttons.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class WizardDialog
WizardDialog.PageContainerFillLayoutNested classes/interfaces inherited from class Window
Window.IExceptionHandlerField Summary
Fields inherited from class WizardDialog
WIZ_IMG_ERRORFields inherited from class TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGEFields inherited from class Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISFields inherited from class Window
CANCEL, OK, resizeHasOccurredConstructor Summary
ConstructorsConstructorDescriptionValidationDialog(Shell parent, Image dialogWindowIcon, String title, String banner, ImageDescriptor image) Create the dialog.Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureShell(Shell newShell) Configures the new shell.protected CompositecreateComposite(Composite parent) Override to create the main composite of the dialog.Gets the validator manager.voidonValidate(boolean isValid) Call to inform validity of all validators.booleanProcesses the dialog.booleanFinishes the dialog.booleanvalidate()Validates the entire dialog.Methods inherited from class WizardDialog
createContents, createProgressMonitorPart, finishPressedMethods inherited from class WizardDialog
addPageChangedListener, addPageChangingListener, backPressed, buttonPressed, cancelPressed, close, createButtonsForButtonBar, createDialogArea, firePageChanged, firePageChanging, getButton, getCurrentPage, getDialogBoundsSettings, getProgressMonitor, getSelectedPage, getShellStyle, getWizard, helpPressed, isModal, nextPressed, removePageChangedListener, removePageChangingListener, run, setButtonLayoutData, setMinimumPageSize, setMinimumPageSize, setModal, setPageSize, setPageSize, setShellStyle, setWizard, showPage, update, updateButtons, updateMessage, updateSize, updateSize, updateTitleBar, updateWindowTitleMethods inherited from class TitleAreaDialog
getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImageMethods inherited from class TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableMethods inherited from class Dialog
applyDialogFont, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutFormData, shortenTextMethods inherited from class Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setWindowManagerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IValidationMessage
setMessageMethods inherited from interface IWizardContainer
getShell
Constructor Details
ValidationDialog
public ValidationDialog(Shell parent, Image dialogWindowIcon, String title, String banner, ImageDescriptor image) Create the dialog.- Parameters:
parent- The parent shell.
Method Details
configureShell
Configures the new shell.- Overrides:
configureShellin classWizardDialog
openModal
public boolean openModal()Processes the dialog.- Returns:
- true for OK, false for cancel.
createComposite
getValidatorManager
Gets the validator manager.validate
public boolean validate()Validates the entire dialog.- Returns:
- true if all validates OK (with possible warnings), false otherwise.
onValidate
public void onValidate(boolean isValid) Call to inform validity of all validators.- Specified by:
onValidatein interfaceIValidationMessage- Parameters:
isValid- true if valid, false otherwise.
performFinish
public boolean performFinish()Finishes the dialog. Override to perform custom processing. This method returns true by default.- Returns:
- true to indicate the finish request was accepted, and false to indicate that the finish request was refused.