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 / TypicalOrAdvancedWizardPage.java @ 43126
History | View | Annotate | Download (2.71 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 |
package org.gvsig.installer.swing.impl.execution.wizard; |
24 |
|
25 |
import java.util.List; |
26 |
|
27 |
import javax.swing.JPanel; |
28 |
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException; |
29 |
import org.gvsig.gui.beans.wizard.panel.OptionPanel; |
30 |
import org.gvsig.installer.lib.api.execution.InstallPackageService; |
31 |
import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext; |
32 |
import org.gvsig.installer.swing.impl.execution.panel.TypicalOrAdvancedPanel; |
33 |
|
34 |
/**
|
35 |
* @author gvSIG Team
|
36 |
* @version $Id$
|
37 |
*
|
38 |
*/
|
39 |
public class TypicalOrAdvancedWizardPage extends TypicalOrAdvancedPanel implements |
40 |
OptionPanel { |
41 |
|
42 |
private static final long serialVersionUID = -7151675399781722322L; |
43 |
|
44 |
private final InstallWizardPanel_ext wizardPanel; |
45 |
|
46 |
public TypicalOrAdvancedWizardPage(
|
47 |
InstallWizardPanel_ext wizardPanel) { |
48 |
super();
|
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_mode"); |
60 |
} |
61 |
|
62 |
@Override
|
63 |
public void lastPanel() { |
64 |
} |
65 |
|
66 |
@Override
|
67 |
public void nextPanel() throws NotContinueWizardException { |
68 |
wizardPanel.setSkipSelectPackagesWizardPage(isAdvancedModeSelected()); |
69 |
} |
70 |
|
71 |
@Override
|
72 |
public void updatePanel() { |
73 |
InstallPackageService service = wizardPanel.getInstallerExecutionService(); |
74 |
|
75 |
List<String> defaultdPackagesIDs = service.getDefaultSelectedPackagesIDs(); |
76 |
if ( defaultdPackagesIDs == null || defaultdPackagesIDs.isEmpty() ) { |
77 |
setEnableTypicalMode(false);
|
78 |
} else {
|
79 |
setEnableTypicalMode(true);
|
80 |
} |
81 |
|
82 |
if (!wizardPanel.getSkipTypicalOrAdvancedWizardPage()) {
|
83 |
wizardPanel.skip(); |
84 |
} |
85 |
|
86 |
} |
87 |
} |