Revision 32286 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/ProgressWizard.java
ProgressWizard.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.swing.impl.creation.wizard; |
29 | 29 |
|
30 |
import java.io.OutputStream; |
|
31 |
|
|
30 | 32 |
import javax.swing.JPanel; |
31 | 33 |
|
34 |
import org.gvsig.installer.lib.api.creation.InstallerCreationService; |
|
35 |
import org.gvsig.installer.lib.api.creation.InstallerCreationServiceException; |
|
32 | 36 |
import org.gvsig.installer.swing.impl.InstallerWizardPanel; |
33 | 37 |
import org.gvsig.installer.swing.impl.creation.DefaultInstallerCreationWizard; |
34 | 38 |
import org.gvsig.installer.swing.impl.creation.panel.ProgressPanel; |
39 |
import org.slf4j.Logger; |
|
40 |
import org.slf4j.LoggerFactory; |
|
35 | 41 |
|
36 | 42 |
/** |
37 | 43 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
38 | 44 |
*/ |
39 | 45 |
public class ProgressWizard extends ProgressPanel implements InstallerWizardPanel{ |
40 | 46 |
private DefaultInstallerCreationWizard installerCreationWizard; |
47 |
private static final Logger logger = LoggerFactory.getLogger(ProgressWizard.class); |
|
41 | 48 |
|
42 | 49 |
public ProgressWizard(DefaultInstallerCreationWizard installerCreationWizard) { |
43 | 50 |
super(); |
... | ... | |
63 | 70 |
} |
64 | 71 |
|
65 | 72 |
public void updatePanel() { |
66 |
setPluginText(installerCreationWizard.getInstallerCreationService().getInstallerInfo().getName());
|
|
67 |
//Write the InfoResource file
|
|
73 |
InstallerCreationService installerCreationService =
|
|
74 |
installerCreationWizard.getInstallerCreationService();
|
|
68 | 75 |
|
69 |
//Compress the plugin |
|
70 |
setCompressingText(); |
|
76 |
setPluginText(installerCreationService.getInstallerInfo().getName()); |
|
71 | 77 |
|
72 |
|
|
73 |
//Set the finished text |
|
74 |
setFinishedText(); |
|
75 |
|
|
78 |
try { |
|
79 |
//Compress the plugin |
|
80 |
setCompressingText(); |
|
81 |
installerCreationService.createInstaller(installerCreationWizard.getOutputStream()); |
|
82 |
setProgress(100); |
|
83 |
|
|
84 |
//Set the finished text |
|
85 |
setFinishedText(); |
|
86 |
} catch (InstallerCreationServiceException e) { |
|
87 |
logger.error(swingInstallerManager.getText("installer_create_output_file_exception"), e); |
|
88 |
setExceptionText(e); |
|
89 |
} |
|
76 | 90 |
} |
77 | 91 |
|
92 |
|
|
78 | 93 |
} |
79 | 94 |
|
80 | 95 |
|
Also available in: Unified diff