19 package org.sleuthkit.autopsy.report.infrastructure;
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import java.util.List;
24 import java.util.logging.Level;
25 import javax.swing.JButton;
26 import javax.swing.event.ChangeListener;
27 import org.openide.WizardDescriptor;
28 import org.openide.util.HelpCtx;
29 import org.openide.util.NbBundle;
30 import org.openide.util.NbPreferences;
47 private WizardDescriptor
wiz;
53 "ReportWizardDataSourceSelectionPanel.nextButton.text=Next",
54 "ReportWizardDataSourceSelectionPanel.finishButton.text=Finish"
57 nextButton =
new JButton(Bundle.ReportWizardDataSourceSelectionPanel_nextButton_text());
58 finishButton =
new JButton(Bundle.ReportWizardDataSourceSelectionPanel_finishButton_text());
59 finishButton.setEnabled(
false);
60 nextButton.setEnabled(
false);
67 "ReportWizardDataSourceSelectionPanel.confirmEmptySelection=Are you sure you want to proceed with no selections?"
70 return (ActionEvent e) -> {
80 return (ActionEvent e) -> {
90 "ReportWizardDataSourceSelectionPanel.title=Select which data source(s) to include"
94 if (dataSourcesSelectionPanel == null) {
96 dataSourcesSelectionPanel.setName(Bundle.ReportWizardDataSourceSelectionPanel_title());
99 for (Content dataSource : dataSources) {
100 String dataSourceName = dataSource.getName();
101 long dataSourceId = dataSource.getId();
102 dataSourcesSelectionPanel.
addElement(dataSourceName, null, dataSourceId);
104 }
catch (TskCoreException ex) {
105 logger.log(Level.SEVERE,
"Unable to get list of data sources from the case", ex);
113 return HelpCtx.DEFAULT_HELP;
119 wiz.setOptions(
new Object[]{WizardDescriptor.PREVIOUS_OPTION,
nextButton,
finishButton, WizardDescriptor.CANCEL_OPTION});
121 boolean generalModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean(
"generalModule",
true);
122 nextButton.setEnabled(!generalModule);
123 finishButton.setEnabled(generalModule);
129 data.putProperty(
"dataSourceSelections", selectedDataSources);
List< Content > getDataSources()
ActionListener createFinishButtonActionListener()
ReportWizardDataSourceSelectionPanel()
CheckBoxListPanel< Long > dataSourcesSelectionPanel
void addChangeListener(ChangeListener cl)
void storeSettings(WizardDescriptor data)
void addElement(String displayName, Icon icon, T obj)
static boolean confirm(String message)
final JButton finishButton
ActionListener createNextButtonActionListener()
CheckBoxListPanel< Long > getComponent()
void removeChangeListener(ChangeListener cl)
static Case getCurrentCase()
synchronized static Logger getLogger(String name)
static final Logger logger
void readSettings(WizardDescriptor data)
List< T > getSelectedElements()