01: /*
02: * uDig - User Friendly Desktop Internet GIS client
03: * http://udig.refractions.net
04: * (C) 2004, Refractions Research Inc.
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: */
17: package net.refractions.udig.catalog.ui.wizard;
18:
19: import java.io.Serializable;
20: import java.util.Map;
21:
22: import net.refractions.udig.catalog.ui.AbstractUDIGImportPage;
23:
24: import org.eclipse.jface.wizard.IWizardPage;
25: import org.geotools.data.DataStoreFactorySpi;
26:
27: /**
28: * Provides ...TODO summary sentence
29: * <p>
30: * TODO Description
31: * </p>
32: * <p>
33: * Responsibilities:
34: * <ul>
35: * <li>
36: * <li>
37: * </ul>
38: * </p>
39: * <p>
40: * Example Use:
41: *
42: * <pre><code>
43: * DataStoreWizardPage x = new DataStoreWizardPage( ... );
44: * TODO code example
45: * </code></pre>
46: *
47: * </p>
48: *
49: * @author dzwiers
50: * @since 0.3
51: */
52: public abstract class DataStoreWizardPage extends
53: AbstractUDIGImportPage /* extends WizardPage */{
54: protected boolean canFlipToNextPage = false;
55:
56: public DataStoreWizardPage(String name) {
57: super (name);
58: }
59:
60: public DataStoreWizardPage() {
61: super (""); //$NON-NLS-1$
62: }
63:
64: public abstract Map<String, Serializable> getParams();
65:
66: protected abstract DataStoreFactorySpi getDataStoreFactorySpi();
67:
68: /**
69: * @see org.eclipse.jface.wizard.IWizardPage#isPageComplete()
70: */
71: @Override
72: public abstract boolean isPageComplete();
73:
74: /**
75: * TODO summary sentence for canFlipToNextPage ...
76: *
77: * @see net.refractions.udig.catalog.internal.ui.datastore.DataStoreWizardPage#canFlipToNextPage()
78: * @return
79: */
80: @Override
81: final public boolean canFlipToNextPage() {
82: IWizardPage[] pages = getWizard().getPages();
83: return isPageComplete()
84: && !pages[pages.length - 1].equals(this );
85: // return canFlipToNextPage;
86: }
87:
88: final public void setCanFlipToNextPage(boolean canFlipToNextPage) {
89: this.canFlipToNextPage = canFlipToNextPage;
90: }
91: }
|