01: /*
02: * ImportExportWizardModel.java
03: *
04: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or any later version.
10: *
11: * This program 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
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: *
20: */
21:
22: package org.executequery.gui.importexport;
23:
24: import org.underworldlabs.swing.wizard.DefaultWizardProcessModel;
25:
26: /* ----------------------------------------------------------
27: * CVS NOTE: Changes to the CVS repository prior to the
28: * release of version 3.0.0beta1 has meant a
29: * resetting of CVS revision numbers.
30: * ----------------------------------------------------------
31: */
32:
33: /**
34: *
35: * @author Takis Diakoumis
36: * @version $Revision: 1.4 $
37: * @date $Date: 2006/05/14 06:56:52 $
38: */
39: public class ImportExportWizardModel extends DefaultWizardProcessModel {
40:
41: /** the number of steps in this model */
42: private int stepsCount;
43:
44: /** Creates a new instance of ImportExportWizardModel */
45: public ImportExportWizardModel(int stepsCount, int transferType) {
46: this .stepsCount = stepsCount;
47:
48: String firstTitle = "Database Connection and Export Type";
49: String fifthTitle = "Exporting Data...";
50: if (transferType == ImportExportProcess.IMPORT) {
51: firstTitle = "Database Connection and Import Type";
52: fifthTitle = "Importing Data...";
53: }
54:
55: String[] titles = new String[stepsCount];
56: titles[0] = firstTitle;
57: titles[1] = "Table Selection";
58: titles[2] = "Data File Selection";
59: titles[3] = "Options";
60: titles[4] = fifthTitle;
61: setTitles(titles);
62:
63: String[] steps = {
64: "Select database connection and transfer type",
65: "Select the tables/columns",
66: transferType == ImportExportProcess.IMPORT ? "Select the data file(s) to import from"
67: : "Select the data file(s) to export to",
68: "Set any further transfer options",
69: transferType == ImportExportProcess.IMPORT ? "Import the data"
70: : "Export the data" };
71: setSteps(steps);
72: }
73:
74: }
|