Revision 37780 branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/exportto/swing/impl/wizard/ExporterSelectionWizard.java

View differences:

ExporterSelectionWizard.java
28 28
import org.slf4j.Logger;
29 29
import org.slf4j.LoggerFactory;
30 30

  
31
import org.cresques.Messages;
32 31
import org.gvsig.exportto.swing.ExporttoSwingLocator;
33 32
import org.gvsig.exportto.swing.ExporttoSwingManager;
34 33
import org.gvsig.exportto.swing.impl.DefaultJExporttoServicePanel;
......
39 38
import org.gvsig.gui.beans.wizard.panel.OptionPanel;
40 39
import org.gvsig.tools.service.ServiceException;
41 40

  
42

  
43 41
/**
44 42
 * @author gvSIG Team
45 43
 * @version $Id$
46
 *
44
 * 
47 45
 */
48
public class ExporterSelectionWizard extends ProviderSelectionPanel implements OptionPanel, ListSelectionListener{
46
public class ExporterSelectionWizard extends ProviderSelectionPanel implements
47
    OptionPanel, ListSelectionListener {
48

  
49 49
    private static final long serialVersionUID = -2818813233378801919L;
50 50
    private static final ExporttoSwingManager EXPORTTO_SWING_MANAGER =
51 51
        ExporttoSwingLocator.getSwingManager();
52 52
    private static final ExporttoSwingProviderManager EXPORTTO_SWING_PROVIDER_MANAGER =
53
            ExporttoSwingProviderLocator.getManager();
54
    private static final Logger LOG =
55
        LoggerFactory.getLogger(ExporterSelectionWizard.class);
53
        ExporttoSwingProviderLocator.getManager();
54
    private static final Logger LOG = LoggerFactory
55
        .getLogger(ExporterSelectionWizard.class);
56 56

  
57
    public ExporterSelectionWizard(DefaultJExporttoServicePanel exporttoServicePanel, int[] providerTypes) {
58
        super(exporttoServicePanel, providerTypes);     
59
        this.exporttoProviderList.addListSelectionListener(this);        
57
    public ExporterSelectionWizard(
58
        DefaultJExporttoServicePanel exporttoServicePanel, int[] providerTypes) {
59
        super(exporttoServicePanel, providerTypes);
60
        this.exporttoProviderList.addListSelectionListener(this);
60 61
    }
61 62

  
62 63
    public String getPanelTitle() {
63
        return exporttoServicePanel.getExporttoSwingManager().getTranslation("select_format_to_export");
64
        return exporttoServicePanel.getExporttoSwingManager().getTranslation(
65
            "select_format_to_export");
64 66
    }
65 67

  
66 68
    public void nextPanel() throws NotContinueWizardException {
67 69
        String providerName = this.getSelectedProvider();
68 70

  
69
        if (providerName != null){
70
            try {            
71
        if (providerName != null) {
72
            try {
71 73
                exporttoServicePanel.selectExporttoSwingProvider(providerName);
72 74
            } catch (ServiceException e) {
73 75
                LOG.error("Not possible to create a exporto swing provider", e);
74 76
                throw new NotContinueWizardException(
75
                    EXPORTTO_SWING_MANAGER.getTranslation("execute_adding_error"), e, this);
77
                    EXPORTTO_SWING_MANAGER
78
                        .getTranslation("execute_adding_error"),
79
                    e, this);
76 80
            }
77
        }          
78
    }    
81
        }
82
    }
79 83

  
80 84
    public void lastPanel() {
81 85
        // TODO Auto-generated method stub
......
87 91

  
88 92
    }
89 93

  
90
    public JPanel getJPanel() {     
94
    public JPanel getJPanel() {
91 95
        return this;
92 96
    }
93 97

  
94 98
    public void valueChanged(ListSelectionEvent e) {
95 99
        String providerName = this.getSelectedProvider();
96 100

  
97
        if (providerName != null){        	 
98
	         descriptionText.setText(EXPORTTO_SWING_PROVIDER_MANAGER.getDescription(providerName));
99
             
101
        if (providerName != null) {
102
            descriptionText.setText(EXPORTTO_SWING_PROVIDER_MANAGER
103
                .getDescription(providerName));
104

  
100 105
            exporttoServicePanel.setNextButtonEnabled(true);
101 106
        }
102 107
    }
103
}
108
}

Also available in: Unified diff