root / branches / v2_0_0_prep / extensions / org.gvsig.symbology.app / org.gvsig.symbology.app.symbolinstaller / src / main / java / org / gvsig / symbology / app / symbolinstaller / execution / SymbolInstallerExtension.java @ 37171
History | View | Annotate | Download (3.31 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) 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., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
package org.gvsig.symbology.app.symbolinstaller.execution; |
24 |
|
25 |
import org.gvsig.andami.plugins.Extension; |
26 |
import org.gvsig.andami.ui.ToolsWindowManager; |
27 |
import org.gvsig.symbology.app.symbolinstaller.creation.DefaultMakeSymbolPackageWizard; |
28 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
29 |
|
30 |
public class SymbolInstallerExtension extends Extension { |
31 |
|
32 |
public void initialize() { |
33 |
} |
34 |
|
35 |
@Override
|
36 |
public void postInitialize() { |
37 |
|
38 |
} |
39 |
|
40 |
public boolean isEnabled() { |
41 |
return true; |
42 |
} |
43 |
|
44 |
public boolean isVisible() { |
45 |
return true; |
46 |
} |
47 |
|
48 |
public void execute(String actionCommand) { |
49 |
System.out.println("installer starts! \n\n actioncommand: " |
50 |
+ actionCommand); |
51 |
|
52 |
if (actionCommand.equals("Create_Package")) { |
53 |
|
54 |
DefaultMakeSymbolPackageWizard wizard = |
55 |
new DefaultMakeSymbolPackageWizard();
|
56 |
// wizard.getWizardPanelActionListener();
|
57 |
|
58 |
// ApplicationManager application = ApplicationLocator.getManager();
|
59 |
|
60 |
// WizardPanel wizardPanel = (WizardPanel) wizard;
|
61 |
WindowManager windowManager = new ToolsWindowManager();
|
62 |
windowManager.showWindow(wizard, "_Symbols_Wizard",
|
63 |
WindowManager.MODE.DIALOG); |
64 |
|
65 |
// try {
|
66 |
// System.out.println("class: " +
|
67 |
// application.getWizardPanels().getClass());
|
68 |
// } catch (Exception e) {
|
69 |
// // TODO Auto-generated catch block
|
70 |
// e.printStackTrace();
|
71 |
// }
|
72 |
|
73 |
// ToolsWindowManager windowManager = new ToolsWindowManager();
|
74 |
//
|
75 |
// windowManager.showWindow(wizard, "_Symbols_Wizard",
|
76 |
// WindowManager.MODE.WINDOW, GridBagConstraints.CENTER);
|
77 |
|
78 |
// AbstractInstallPackageWizard installPackageWizard =
|
79 |
// SwingInstallerLocator.getSwingInstallerManager()
|
80 |
// .createInstallPackageWizard(applicationFolder, pluginsFolder,
|
81 |
// installFolder);
|
82 |
// installPackageWizard
|
83 |
// .setWizardActionListener(new WindowInstallerListener(this));
|
84 |
// this.setLayout(new BorderLayout());
|
85 |
// add(installPackageWizard, BorderLayout.CENTER);
|
86 |
|
87 |
// PluginServices.
|
88 |
// .addWindow(
|
89 |
// manager.createWizard().getWindow());
|
90 |
|
91 |
// PluginServices.getMDIManager().addCentredWindow(
|
92 |
|
93 |
} |
94 |
|
95 |
System.out.println("\ninstaller ends!\n"); |
96 |
} |
97 |
} |