Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.impl / src / main / java / org / gvsig / installer / swing / impl / execution / wizard / SelectBundlesWizardPage.java @ 43126

History | View | Annotate | Download (2.73 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License as published by the Free Software
8
 * Foundation; either version 3 of the License, or (at your option) any later
9
 * version.
10
 *
11
 * This program is distributed in the hope that it will be useful, but WITHOUT
12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
 * details.
15
 *
16
 * You should have received a copy of the GNU General Public License along with
17
 * this program; if not, write to the Free Software Foundation, Inc., 51
18
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us at info AT
21
 * gvsig.com, or visit our website www.gvsig.com.
22
 */
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2010 {Prodevelop}   {Task}
26
 */
27
package org.gvsig.installer.swing.impl.execution.wizard;
28

    
29
import java.util.List;
30

    
31
import javax.swing.JPanel;
32

    
33
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
34
import org.gvsig.gui.beans.wizard.panel.OptionPanel;
35
import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
36
import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
37
import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
38

    
39
public class SelectBundlesWizardPage extends SelectBundlesPanel implements
40
        OptionPanel {
41

    
42
    private static final long serialVersionUID = -3694039665800882085L;
43
    private final InstallWizardPanel_ext wizardPanel;
44

    
45
    public SelectBundlesWizardPage(
46
            InstallWizardPanel_ext wizardPanel,
47
            List<UrlAndLabel> defaultDownloadURL) {
48
        super(defaultDownloadURL, wizardPanel.getInstallFolder());
49
        this.wizardPanel = wizardPanel;
50
    }
51

    
52
    @Override
53
    public JPanel getJPanel() {
54
        return this;
55
    }
56

    
57
    @Override
58
    public String getPanelTitle() {
59
        return wizardPanel.getTranslation("_select_installation_source");
60
    }
61

    
62
    @Override
63
    public void lastPanel() {
64
    }
65

    
66
    @Override
67
    public void nextPanel() throws NotContinueWizardException {
68
    }
69

    
70
    @Override
71
    public void updatePanel() {
72
        if (wizardPanel.getSkipSelectBundleWizardPage() && this.isNextButtonEnabled()) {
73
            wizardPanel.skip();
74
            return;
75
        }
76
        wizardPanel.setBackButtonEnabled(false);
77
        wizardPanel.setNextButtonEnabled(isNextButtonEnabled());
78
    }
79

    
80
    @Override
81
    protected void checkNextButtonEnabled() {
82
        if( wizardPanel!=null ) {
83
            wizardPanel.setNextButtonEnabled(isNextButtonEnabled());
84
        }
85
    }
86

    
87
}