01: package org.dbbrowser.ui.helper.exporthelper.wizard.paneldescriptors;
02:
03: import org.dbbrowser.ui.helper.exporthelper.wizard.WizardState;
04: import org.dbbrowser.ui.helper.exporthelper.wizard.panel.ExportConfirmationWizardPanel;
05: import com.nexes.wizard.WizardPanelDescriptor;
06:
07: public class ExportConfirmationPanelDescriptor extends
08: WizardPanelDescriptor {
09: public static final String IDENTIFIER = "EXPORT_CONFIRMATION_PANEL";
10: private static ExportConfirmationWizardPanel exportConfirmationWizardPanel = new ExportConfirmationWizardPanel();
11:
12: public ExportConfirmationPanelDescriptor() {
13: super (IDENTIFIER, exportConfirmationWizardPanel);
14: }
15:
16: public Object getNextPanelDescriptor() {
17: return ExportProgressPanelDescriptor.IDENTIFIER;
18: }
19:
20: public Object getBackPanelDescriptor() {
21: //Get the export type
22: String selectedExportType = (String) WizardState.getInstance()
23: .getState("Export type");
24:
25: //if CSV file is selected, then
26: if ("csv".equals(selectedExportType)) {
27: return IncludeTableColumnsPanelDescriptor.IDENTIFIER;
28: }
29: return PageSetupPanelDescriptor.IDENTIFIER;
30: }
31:
32: public void aboutToDisplayPanel() {
33: exportConfirmationWizardPanel.setupPanel();
34: }
35: }
|