19 package org.sleuthkit.autopsy.report.infrastructure;
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
24 import javax.swing.JButton;
25 import javax.swing.event.ChangeListener;
26 import org.openide.WizardDescriptor;
27 import org.openide.util.HelpCtx;
28 import org.openide.util.NbBundle;
34 class ReportWizardPortableCaseOptionsPanel
implements WizardDescriptor.FinishablePanel<WizardDescriptor> {
36 private WizardDescriptor wiz;
37 private ReportWizardPortableCaseOptionsVisualPanel component;
38 private final JButton finishButton;
39 private Map<String, ReportModuleConfig> moduleConfigs;
40 private final boolean useCaseSpecificData;
42 ReportWizardPortableCaseOptionsPanel(Map<String, ReportModuleConfig> moduleConfigs,
boolean useCaseSpecificData) {
43 this.moduleConfigs = moduleConfigs;
44 this.useCaseSpecificData = useCaseSpecificData;
45 finishButton =
new JButton(
46 NbBundle.getMessage(
this.getClass(),
"ReportWizardFileOptionsPanel.finishButton.text"));
47 finishButton.setEnabled(
false);
49 finishButton.addActionListener(
new ActionListener() {
51 public void actionPerformed(ActionEvent e) {
62 void setFinish(
boolean enable) {
63 finishButton.setEnabled(enable);
67 public boolean isFinishPanel() {
72 public ReportWizardPortableCaseOptionsVisualPanel getComponent() {
73 if (component == null) {
74 component =
new ReportWizardPortableCaseOptionsVisualPanel(
this, moduleConfigs, useCaseSpecificData);
80 public HelpCtx getHelp() {
81 return HelpCtx.DEFAULT_HELP;
85 public void readSettings(WizardDescriptor data) {
87 wiz.setOptions(
new Object[]{WizardDescriptor.PREVIOUS_OPTION, WizardDescriptor.NEXT_OPTION, finishButton, WizardDescriptor.CANCEL_OPTION});
91 public void storeSettings(WizardDescriptor data) {
92 data.putProperty(
"portableCaseReportSettings", getComponent().getPortableCaseReportSettings());
96 public boolean isValid() {
101 public void addChangeListener(ChangeListener cl) {
106 public void removeChangeListener(ChangeListener cl) {