Source code: javatools/applications/DBScriptWizard/DBScriptWizard.java
1 /*
2 * DBScriptWizard.java
3 *
4 * Created on 8 febbraio 2002, 11.53
5 Javatools (modified version) - Some useful general classes.
6 Copyright (C) 2002-2003 Chris Bitmead (original) Antonio Petrelli (modified)
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 Contact me at: brenmcguire@users.sourceforge.net
23 */
24
25 package javatools.applications.DBScriptWizard;
26
27 import javatools.swing.ScriptExecutorWizard;
28 import javatools.swing.WizardException;
29 import javatools.util.Props;
30 /**
31 * It is a sample application to run the <CODE>ScriptExecutorWizard</CODE> class.
32 * @author Antonio Petrelli
33 * @version 0.0.1
34 */
35 public class DBScriptWizard {
36
37 /** Creates new DBScriptWizard */
38 public DBScriptWizard() {
39 }
40
41 /** The main...
42 * @param args the command line arguments
43 */
44 public static void main (String args[]) {
45 ScriptExecutorWizard test;
46 String localConfigDir;
47
48 test = new ScriptExecutorWizard();
49 test.setExitOnClose(true);
50 test.setScriptListFileName("availableScripts");
51 localConfigDir = Props.getLocalConfigDir();
52 if (!localConfigDir.equals(""))
53 localConfigDir += "/";
54 try {
55 test.loadPresentationText(localConfigDir + "Presentation.htm");
56 }
57 catch (WizardException e) {
58 System.out.println(e.getMessage());
59 }
60 try {
61 test.loadFinishText(localConfigDir + "FinishText.htm");
62 }
63 catch (WizardException e) {
64 System.out.println(e.getMessage());
65 }
66 try {
67 test.setBackgroundFile("Background.jpg");
68 }
69 catch (WizardException e) {
70 System.out.println(e.getMessage());
71 }
72 test.setDefaultPropertiesFileName("wizardDefaults");
73 test.show();
74 }
75 }