Package com.iizigo.validator
Class ValidationDialog
- java.lang.Object
- org.eclipse.jface.window.Window
- org.eclipse.jface.dialogs.Dialog
- org.eclipse.jface.dialogs.TrayDialog
- org.eclipse.jface.dialogs.TitleAreaDialog
- org.eclipse.jface.wizard.WizardDialog
- com.iizigo.swt.WizardDialog
- com.iizigo.validator.ValidationDialog
- All Implemented Interfaces:
IValidationMessage
,org.eclipse.jface.dialogs.IPageChangeProvider
,org.eclipse.jface.operation.IRunnableContext
,org.eclipse.jface.window.IShellProvider
,org.eclipse.jface.wizard.IWizardContainer
,org.eclipse.jface.wizard.IWizardContainer2
public class ValidationDialog extends WizardDialog implements IValidationMessage
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
Field Summary
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
Fields inherited from class org.eclipse.jface.dialogs.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, ELLIPSIS
Constructor Summary
Constructors Constructor Description ValidationDialog(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.graphics.Image dialogWindowIcon, java.lang.String title, java.lang.String banner, org.eclipse.jface.resource.ImageDescriptor image)
Create the dialog.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureShell(org.eclipse.swt.widgets.Shell newShell)
Configures the new shell.protected org.eclipse.swt.widgets.Composite
createComposite(org.eclipse.swt.widgets.Composite parent)
Override to create the main composite of the dialog.ValidatorManager
getValidatorManager()
Gets the validator manager.void
onValidate(boolean isValid)
Call to inform validity of all validators.boolean
openModal()
Processes the dialog.boolean
performFinish()
Finishes the dialog.boolean
validate()
Validates the entire dialog.Methods inherited from class com.iizigo.swt.WizardDialog
createContents, createProgressMonitorPart, finishPressed
Methods inherited from class org.eclipse.jface.wizard.WizardDialog
addPageChangedListener, addPageChangingListener, backPressed, buttonPressed, cancelPressed, close, createButtonsForButtonBar, createDialogArea, firePageChanged, firePageChanging, getButton, getCurrentPage, 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, updateWindowTitle
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutFormData, shortenText
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setWindowManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.iizigo.validator.IValidationMessage
setMessage
Method Detail
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Configures the new shell.- Overrides:
configureShell
in classorg.eclipse.jface.wizard.WizardDialog
openModal
public boolean openModal()
Processes the dialog.- Returns:
- true for OK, false for cancel.
createComposite
protected org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
Override to create the main composite of the dialog.
getValidatorManager
public ValidatorManager 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:
onValidate
in 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.