svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.impl / src / main / java / org / gvsig / installer / swing / impl / creation / wizard / SelectPlugintoInstallWizard.java @ 33729
History | View | Annotate | Download (2.95 KB)
1 | 32269 | jpiera | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | 33729 | cordinyana | *
|
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 | 32269 | jpiera | |
23 | /*
|
||
24 | 33729 | cordinyana | * AUTHORS (In addition to CIT):
|
25 | * 2010 {Prodevelop} {Task}
|
||
26 | */
|
||
27 | |||
28 | 32269 | jpiera | package org.gvsig.installer.swing.impl.creation.wizard; |
29 | |||
30 | import javax.swing.JPanel; |
||
31 | |||
32 | 33729 | cordinyana | import org.slf4j.Logger; |
33 | import org.slf4j.LoggerFactory; |
||
34 | |||
35 | 33260 | jpiera | import org.gvsig.gui.beans.wizard.panel.OptionPanel; |
36 | 32565 | jpiera | import org.gvsig.installer.lib.api.PackageInfo; |
37 | import org.gvsig.installer.swing.impl.creation.DefaultMakePluginPackageWizard; |
||
38 | 32269 | jpiera | import org.gvsig.installer.swing.impl.creation.panel.SelectPluginToInstallPanel; |
39 | |||
40 | /**
|
||
41 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
||
42 | */
|
||
43 | 33729 | cordinyana | public class SelectPlugintoInstallWizard extends SelectPluginToInstallPanel |
44 | implements OptionPanel {
|
||
45 | 32269 | jpiera | |
46 | 33729 | cordinyana | /**
|
47 | *
|
||
48 | */
|
||
49 | private static final long serialVersionUID = 3735333214491700782L; |
||
50 | private String selectedPluginText; |
||
51 | private DefaultMakePluginPackageWizard installerCreationWizard;
|
||
52 | private static final Logger logger = LoggerFactory |
||
53 | .getLogger(SelectPlugintoInstallWizard.class); |
||
54 | 32269 | jpiera | |
55 | 33729 | cordinyana | public SelectPlugintoInstallWizard(
|
56 | DefaultMakePluginPackageWizard installerCreationWizard) { |
||
57 | super();
|
||
58 | this.installerCreationWizard = installerCreationWizard;
|
||
59 | installerCreationWizard.setNextButtonEnabled(false);
|
||
60 | } |
||
61 | 32269 | jpiera | |
62 | 33729 | cordinyana | public JPanel getJPanel() { |
63 | return this; |
||
64 | } |
||
65 | 32269 | jpiera | |
66 | 33729 | cordinyana | public String getPanelTitle() { |
67 | return swingInstallerManager.getText("plugin_to_install"); |
||
68 | } |
||
69 | 32269 | jpiera | |
70 | 33729 | cordinyana | public void lastPanel() { |
71 | // TODO Auto-generated method stub
|
||
72 | 32269 | jpiera | |
73 | 33729 | cordinyana | } |
74 | 32269 | jpiera | |
75 | 33729 | cordinyana | public void nextPanel() { |
76 | installerCreationWizard.setSelectedPackageInfo(super
|
||
77 | .getSelectedInstallerInfo()); |
||
78 | } |
||
79 | |||
80 | public void updatePanel() { |
||
81 | |||
82 | } |
||
83 | |||
84 | /*
|
||
85 | * (non-Javadoc)
|
||
86 | *
|
||
87 | * @see
|
||
88 | * org.gvsig.installer.swing.impl.creation.panel.SelectPluginToInstallPanel
|
||
89 | * #setSelectedPlugin(java.lang.String)
|
||
90 | */
|
||
91 | @Override
|
||
92 | public void setSelectedInstallerInfo(PackageInfo installerInfo) { |
||
93 | super.setSelectedInstallerInfo(installerInfo);
|
||
94 | installerInfo.setType("plugin");
|
||
95 | installerCreationWizard.setNextButtonEnabled(installerInfo != null);
|
||
96 | } |
||
97 | } |