19 package org.sleuthkit.autopsy.modules.fileextmismatch;
28 final class FileExtMismatchModuleSettingsPanel
extends IngestModuleIngestJobSettingsPanel {
30 private final FileExtMismatchDetectorModuleSettings settings;
32 FileExtMismatchModuleSettingsPanel(FileExtMismatchDetectorModuleSettings settings) {
33 this.settings = settings;
35 customizeComponents();
38 private void customizeComponents() {
39 skipNoExtCheckBox.setSelected(settings.skipFilesWithNoExtension());
40 skipTextPlain.setSelected(settings.skipFilesWithTextPlainMimeType());
41 skipKnownFiles.setSelected(settings.skipKnownFiles());
45 public IngestModuleIngestJobSettings getSettings() {
54 @SuppressWarnings(
"unchecked")
56 private
void initComponents() {
58 skipNoExtCheckBox =
new javax.swing.JCheckBox();
59 skipTextPlain =
new javax.swing.JCheckBox();
60 skipKnownFiles =
new javax.swing.JCheckBox();
62 skipNoExtCheckBox.setSelected(
true);
63 skipNoExtCheckBox.setText(
org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class,
"FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text"));
64 skipNoExtCheckBox.addActionListener(
new java.awt.event.ActionListener() {
65 public void actionPerformed(java.awt.event.ActionEvent evt) {
66 skipNoExtCheckBoxActionPerformed(evt);
70 skipTextPlain.setText(
org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class,
"FileExtMismatchModuleSettingsPanel.skipTextPlain.text"));
71 skipTextPlain.setSelected(
true);
72 skipTextPlain.addActionListener(
new java.awt.event.ActionListener() {
73 public void actionPerformed(java.awt.event.ActionEvent evt) {
74 skipTextPlainActionPerformed(evt);
78 skipKnownFiles.setSelected(
true);
79 skipKnownFiles.setText(
org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class,
"FileExtMismatchModuleSettingsPanel.skipKnownFiles.text"));
80 skipKnownFiles.addActionListener(
new java.awt.event.ActionListener() {
81 public void actionPerformed(java.awt.event.ActionEvent evt) {
82 skipKnownFilesActionPerformed(evt);
86 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
87 this.setLayout(layout);
88 layout.setHorizontalGroup(
89 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
90 .addGroup(layout.createSequentialGroup()
92 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
93 .addComponent(skipTextPlain)
94 .addComponent(skipNoExtCheckBox)
95 .addComponent(skipKnownFiles))
96 .addGap(0, 10, Short.MAX_VALUE))
98 layout.setVerticalGroup(
99 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
100 .addGroup(layout.createSequentialGroup()
101 .addComponent(skipNoExtCheckBox)
102 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
103 .addComponent(skipTextPlain)
104 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
105 .addComponent(skipKnownFiles)
106 .addContainerGap(28, Short.MAX_VALUE))
110 private void skipNoExtCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {
111 settings.setSkipFilesWithNoExtension(skipNoExtCheckBox.isSelected());
114 private void skipTextPlainActionPerformed(java.awt.event.ActionEvent evt) {
115 settings.setSkipFilesWithTextPlainMimeType(skipTextPlain.isSelected());
118 private void skipKnownFilesActionPerformed(java.awt.event.ActionEvent evt) {
119 settings.setSkipKnownFiles(skipKnownFiles.isSelected());
123 private javax.swing.JCheckBox skipKnownFiles;
124 private javax.swing.JCheckBox skipNoExtCheckBox;
125 private javax.swing.JCheckBox skipTextPlain;