mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
127 lines
5.8 KiB
Java
127 lines
5.8 KiB
Java
/*
|
|
* Autopsy Forensic Browser
|
|
*
|
|
* Copyright 2011-2014 Basis Technology Corp.
|
|
* Contact: carrier <at> sleuthkit <dot> org
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
package org.sleuthkit.autopsy.fileextmismatch;
|
|
|
|
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
|
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
|
|
|
/**
|
|
* UI component used to set ingest job options for file extension mismatch
|
|
* detector ingest modules.
|
|
*/
|
|
final class FileExtMismatchModuleSettingsPanel extends IngestModuleSettingsPanel {
|
|
|
|
private final FileExtMismatchDetectorModuleSettings settings;
|
|
|
|
FileExtMismatchModuleSettingsPanel(FileExtMismatchDetectorModuleSettings settings) {
|
|
this.settings = settings;
|
|
initComponents();
|
|
customizeComponents();
|
|
}
|
|
|
|
private void customizeComponents() {
|
|
skipNoExtCheckBox.setSelected(settings.skipFilesWithNoExtension());
|
|
skipTextPlain.setSelected(settings.skipFilesWithTextPlainMimeType());
|
|
skipKnownFilesCheckbox.setSelected(settings.skipKnownFiles());
|
|
}
|
|
|
|
@Override
|
|
public IngestModuleSettings getSettings() {
|
|
return settings;
|
|
}
|
|
|
|
/**
|
|
* This method is called from within the constructor to initialize the form.
|
|
* WARNING: Do NOT modify this code. The content of this method is always
|
|
* regenerated by the Form Editor.
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
private void initComponents() {
|
|
|
|
skipNoExtCheckBox = new javax.swing.JCheckBox();
|
|
skipTextPlain = new javax.swing.JCheckBox();
|
|
skipKnownFilesCheckbox = new javax.swing.JCheckBox();
|
|
|
|
skipNoExtCheckBox.setSelected(true);
|
|
skipNoExtCheckBox.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class, "FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text")); // NOI18N
|
|
skipNoExtCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
skipNoExtCheckBoxActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
skipTextPlain.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class, "FileExtMismatchModuleSettingsPanel.skipTextPlain.text")); // NOI18N
|
|
skipTextPlain.setSelected(true);
|
|
skipTextPlain.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
skipTextPlainActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
skipKnownFilesCheckbox.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchModuleSettingsPanel.class, "FileExtMismatchModuleSettingsPanel.skipKnownFilesCheckbox.text")); // NOI18N
|
|
skipKnownFilesCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
skipKnownFilesCheckboxActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
this.setLayout(layout);
|
|
layout.setHorizontalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(skipTextPlain)
|
|
.addComponent(skipNoExtCheckBox)
|
|
.addComponent(skipKnownFilesCheckbox))
|
|
.addGap(0, 138, Short.MAX_VALUE))
|
|
);
|
|
layout.setVerticalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addComponent(skipNoExtCheckBox)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(skipTextPlain)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(skipKnownFilesCheckbox)
|
|
.addContainerGap(28, Short.MAX_VALUE))
|
|
);
|
|
}// </editor-fold>//GEN-END:initComponents
|
|
|
|
private void skipNoExtCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_skipNoExtCheckBoxActionPerformed
|
|
settings.setSkipFilesWithNoExtension(skipNoExtCheckBox.isSelected());
|
|
}//GEN-LAST:event_skipNoExtCheckBoxActionPerformed
|
|
|
|
private void skipTextPlainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_skipTextPlainActionPerformed
|
|
settings.setSkipFilesWithTextPlainMimeType(skipTextPlain.isSelected());
|
|
}//GEN-LAST:event_skipTextPlainActionPerformed
|
|
|
|
private void skipKnownFilesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_skipKnownFilesCheckboxActionPerformed
|
|
settings.setSkipKnownFiles(skipKnownFilesCheckbox.isSelected());
|
|
}//GEN-LAST:event_skipKnownFilesCheckboxActionPerformed
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
private javax.swing.JCheckBox skipKnownFilesCheckbox;
|
|
private javax.swing.JCheckBox skipNoExtCheckBox;
|
|
private javax.swing.JCheckBox skipTextPlain;
|
|
// End of variables declaration//GEN-END:variables
|
|
}
|