01: package net.refractions.udig.catalog.ui;
02:
03: import org.eclipse.jface.wizard.IWizardPage;
04: import org.eclipse.jface.wizard.WizardPage;
05:
06: /**
07: * Abstract implementation of UDIGImportPage.
08: *
09: * @author jdeolive
10: */
11: public abstract class AbstractUDIGImportPage extends WizardPage
12: implements UDIGConnectionPage {
13:
14: public AbstractUDIGImportPage(String pageName) {
15: super (pageName);
16: }
17:
18: @Override
19: public void setErrorMessage(String newMessage) {
20: // wizard pages are decorated by a connection page, so the default
21: // implementation of this method will not do anything
22: IWizardPage page = getContainer().getCurrentPage();
23: if (page == this ) {
24: super .setErrorMessage(newMessage);
25: } else {
26: if (page instanceof WizardPage) {
27: ((WizardPage) page).setErrorMessage(newMessage);
28: } else {
29: // some other type of page
30: }
31: }
32: }
33: }
|