19 package org.sleuthkit.autopsy.report;
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;
28 import org.openide.util.NbPreferences;
30 class ReportWizardPanel2
implements WizardDescriptor.Panel<WizardDescriptor> {
32 private ReportVisualPanel2 component;
33 private JButton finishButton;
34 private JButton nextButton;
35 private WizardDescriptor wiz;
37 ReportWizardPanel2() {
38 finishButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"ReportWizardPanel2.finishButton.text"));
40 nextButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"ReportWizardPanel2.nextButton.text"));
41 nextButton.setEnabled(
true);
43 nextButton.addActionListener(
new ActionListener() {
45 public void actionPerformed(ActionEvent e) {
50 finishButton.addActionListener(
new ActionListener() {
52 public void actionPerformed(ActionEvent e) {
59 public ReportVisualPanel2 getComponent() {
60 if (component == null) {
61 component =
new ReportVisualPanel2(
this);
67 public HelpCtx getHelp() {
68 return HelpCtx.DEFAULT_HELP;
72 public boolean isValid() {
77 public void addChangeListener(ChangeListener l) {
81 public void removeChangeListener(ChangeListener l) {
84 public void setFinish(
boolean enabled) {
85 nextButton.setEnabled(
false);
86 finishButton.setEnabled(enabled);
90 public void readSettings(WizardDescriptor wiz) {
94 wiz.setOptions(
new Object[]{WizardDescriptor.PREVIOUS_OPTION, nextButton, finishButton, WizardDescriptor.CANCEL_OPTION});
98 public void storeSettings(WizardDescriptor wiz) {
99 wiz.putProperty(
"tagStates", getComponent().getTagStates());
100 wiz.putProperty(
"artifactStates", getComponent().getArtifactStates());
101 wiz.putProperty(
"isTagsSelected", getComponent().isTaggedResultsRadioButtonSelected());