Statistics
| Revision:

root / branches / v2_0_0_prep / extensions / org.gvsig.symbology.app / org.gvsig.symbology.app.symbolinstaller / src / main / java / org / gvsig / symbology / app / symbolinstaller / creation / wizard / PackageInfoWizard.java @ 37171

History | View | Annotate | Download (2.69 KB)

1
package org.gvsig.symbology.app.symbolinstaller.creation.wizard;
2

    
3
/* gvSIG. Geographic Information System of the Valencian Government
4
 *
5
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
6
 * of the Valencian Government (CIT)
7
 * 
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (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., 51 Franklin Street, Fifth Floor, Boston, 
21
 * MA  02110-1301, USA.
22
 * 
23
 */
24

    
25
/*
26
 * AUTHORS (In addition to CIT):
27
 * 2010 {Prodevelop}   {Task}
28
 */
29

    
30
import javax.swing.JPanel;
31

    
32
import org.gvsig.gui.beans.wizard.WizardPanel;
33
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
34
import org.gvsig.gui.beans.wizard.panel.OptionPanel;
35
import org.gvsig.installer.lib.api.PackageInfo;
36
import org.gvsig.installer.swing.api.SwingInstallerLocator;
37
import org.gvsig.installer.swing.api.creation.JPackageInfoPanel;
38

    
39
/**
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
41
 */
42
public class PackageInfoWizard implements OptionPanel {
43

    
44
    private static final long serialVersionUID = 6880987804806802863L;
45

    
46
    // private WizardPanel wizard;
47

    
48
    private JPackageInfoPanel packageInfoPanel;
49

    
50
    private PackageInfo packageInfo;
51

    
52
    public PackageInfoWizard(WizardPanel wizard, PackageInfo packageInfo) {
53
        super();
54
        // this.wizard = wizard;
55
        this.packageInfoPanel =
56
            SwingInstallerLocator.getSwingInstallerManager()
57
                .createPackageInfoPanel();
58
        this.packageInfo = packageInfo;
59
    }
60

    
61
    private String getText(String msg) {
62
        return msg; // FIXME
63
    }
64

    
65
    public JPanel getJPanel() {
66
        return this.packageInfoPanel;
67
    }
68

    
69
    public String getPanelTitle() {
70
        return getText("plugin_description");
71
    }
72

    
73
    public void lastPanel() {
74
        // TODO Auto-generated method stub
75

    
76
    }
77

    
78
    public void nextPanel() throws NotContinueWizardException {
79
        if (!this.packageInfoPanel.validatePanel()) {
80
            throw new NotContinueWizardException("", null, false);
81
        }
82
        this.packageInfoPanel.panelToPackageInfo(packageInfo);
83
    }
84

    
85
    public void updatePanel() {
86
        this.packageInfoPanel.packageInfoToPanel(packageInfo);
87
    }
88

    
89
}