Revision 37599 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/execution/wizard/TypicalOrAdvancedWizard.java
TypicalOrAdvancedWizard.java | ||
---|---|---|
38 | 38 |
* |
39 | 39 |
*/ |
40 | 40 |
public class TypicalOrAdvancedWizard extends TypicalOrAdvancedPanel implements |
41 |
OptionPanel {
|
|
41 |
OptionPanel {
|
|
42 | 42 |
|
43 |
private DefaultInstallPackageWizard installerExecutionWizard;
|
|
43 |
private DefaultInstallPackageWizard installerExecutionWizard;
|
|
44 | 44 |
|
45 |
private int direccion = WizardPanelWithLogo.ACTION_NEXT;
|
|
45 |
private int direccion = WizardPanelWithLogo.ACTION_NEXT;
|
|
46 | 46 |
|
47 |
public TypicalOrAdvancedWizard(
|
|
48 |
DefaultInstallPackageWizard installerExecutionWizard) {
|
|
49 |
super();
|
|
50 |
this.installerExecutionWizard = installerExecutionWizard;
|
|
51 |
}
|
|
47 |
public TypicalOrAdvancedWizard(
|
|
48 |
DefaultInstallPackageWizard installerExecutionWizard) {
|
|
49 |
super();
|
|
50 |
this.installerExecutionWizard = installerExecutionWizard;
|
|
51 |
}
|
|
52 | 52 |
|
53 |
private static final long serialVersionUID = -7151675399781722322L;
|
|
53 |
private static final long serialVersionUID = -7151675399781722322L;
|
|
54 | 54 |
|
55 |
public JPanel getJPanel() {
|
|
56 |
return this;
|
|
57 |
}
|
|
55 |
public JPanel getJPanel() {
|
|
56 |
return this;
|
|
57 |
}
|
|
58 | 58 |
|
59 |
public String getPanelTitle() {
|
|
60 |
return swingInstallerManager.getText("select_installation_mode");
|
|
61 |
}
|
|
59 |
public String getPanelTitle() {
|
|
60 |
return swingInstallerManager.getText("select_installation_mode");
|
|
61 |
}
|
|
62 | 62 |
|
63 |
public void lastPanel() {
|
|
64 |
direccion = WizardPanelWithLogo.ACTION_NEXT;
|
|
63 |
public void lastPanel() {
|
|
64 |
direccion = WizardPanelWithLogo.ACTION_NEXT;
|
|
65 | 65 |
|
66 |
}
|
|
66 |
}
|
|
67 | 67 |
|
68 |
public void nextPanel() throws NotContinueWizardException {
|
|
69 |
if (installerExecutionWizard.getAskTypicalOrCustom()) {
|
|
70 |
installerExecutionWizard
|
|
71 |
.setShowSelectPackagesPanel(isAdvancedModeSelected());
|
|
72 |
}
|
|
73 |
direccion = WizardPanelWithLogo.ACTION_PREVIOUS;
|
|
74 |
}
|
|
68 |
public void nextPanel() throws NotContinueWizardException {
|
|
69 |
if (installerExecutionWizard.getAskTypicalOrCustom()) {
|
|
70 |
installerExecutionWizard
|
|
71 |
.setShowSelectPackagesPanel(isAdvancedModeSelected());
|
|
72 |
}
|
|
73 |
direccion = WizardPanelWithLogo.ACTION_PREVIOUS;
|
|
74 |
}
|
|
75 | 75 |
|
76 |
public void updatePanel() {
|
|
77 |
InstallPackageService service =
|
|
78 |
installerExecutionWizard.getInstallerExecutionService();
|
|
76 |
public void updatePanel() {
|
|
77 |
InstallPackageService service = installerExecutionWizard
|
|
78 |
.getInstallerExecutionService();
|
|
79 | 79 |
|
80 |
if (!installerExecutionWizard.getAskTypicalOrCustom()) {
|
|
81 |
(installerExecutionWizard).doAction(direccion);
|
|
82 |
}
|
|
80 |
if (!installerExecutionWizard.getAskTypicalOrCustom()) {
|
|
81 |
(installerExecutionWizard).doAction(direccion);
|
|
82 |
}
|
|
83 | 83 |
|
84 |
// if no packages will be selected on typical mode
|
|
85 |
List<String> defaultdPackagesIDs =
|
|
86 |
service.getDefaultSelectedPackagesIDs();
|
|
84 |
// if no packages will be selected on typical mode
|
|
85 |
List<String> defaultdPackagesIDs = service
|
|
86 |
.getDefaultSelectedPackagesIDs();
|
|
87 | 87 |
|
88 |
// disable or enable the typical mode
|
|
89 |
if ((defaultdPackagesIDs == null) || (defaultdPackagesIDs.size() < 1)) {
|
|
90 |
setEnableTypicalMode(false);
|
|
91 |
} else {
|
|
92 |
// typical mode is enabled
|
|
93 |
setEnableTypicalMode(true);
|
|
94 |
}
|
|
88 |
// disable or enable the typical mode
|
|
89 |
if ((defaultdPackagesIDs == null) || (defaultdPackagesIDs.size() < 1)) {
|
|
90 |
setEnableTypicalMode(false);
|
|
91 |
} else {
|
|
92 |
// typical mode is enabled
|
|
93 |
setEnableTypicalMode(true);
|
|
94 |
}
|
|
95 | 95 |
|
96 |
}
|
|
96 |
}
|
|
97 | 97 |
} |
Also available in: Unified diff