19 package org.sleuthkit.autopsy.report.infrastructure;
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import javax.swing.JButton;
24 import javax.swing.event.ChangeListener;
25 import org.openide.WizardDescriptor;
26 import org.openide.util.HelpCtx;
27 import org.openide.util.NbBundle;
29 class ReportWizardPanel2
implements WizardDescriptor.Panel<WizardDescriptor> {
31 private ReportVisualPanel2 component;
32 private final JButton finishButton;
33 private final JButton nextButton;
34 private WizardDescriptor wiz;
35 private final boolean useCaseSpecificData;
36 private final TableReportSettings settings;
38 ReportWizardPanel2(
boolean useCaseSpecificData, TableReportSettings settings) {
39 this.useCaseSpecificData = useCaseSpecificData;
40 this.settings = settings;
41 finishButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"ReportWizardPanel2.finishButton.text"));
42 nextButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"ReportWizardPanel2.nextButton.text"));
43 nextButton.setEnabled(
true);
45 nextButton.addActionListener(
new ActionListener() {
47 public void actionPerformed(ActionEvent e) {
52 finishButton.addActionListener(
new ActionListener() {
54 public void actionPerformed(ActionEvent e) {
61 public ReportVisualPanel2 getComponent() {
62 if (component == null) {
63 component =
new ReportVisualPanel2(
this, useCaseSpecificData, settings);
69 public HelpCtx getHelp() {
70 return HelpCtx.DEFAULT_HELP;
74 public boolean isValid() {
79 public void addChangeListener(ChangeListener l) {
83 public void removeChangeListener(ChangeListener l) {
86 public void setFinish(
boolean enabled) {
87 nextButton.setEnabled(
false);
88 finishButton.setEnabled(enabled);
92 public void readSettings(WizardDescriptor wiz) {
95 wiz.setOptions(
new Object[]{WizardDescriptor.PREVIOUS_OPTION, nextButton, finishButton, WizardDescriptor.CANCEL_OPTION});
99 public void storeSettings(WizardDescriptor wiz) {
100 wiz.putProperty(
"tableReportSettings",
new TableReportSettings(getComponent().getArtifactStates(), getComponent().getTagStates(), useCaseSpecificData, getComponent().getSelectedReportType()));