19 package org.sleuthkit.autopsy.modules.dataSourceIntegrity;
27 @SuppressWarnings(
"PMD.SingularField")
28 final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
33 public DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) {
35 customizeComponents(settings);
43 private void customizeComponents(DataSourceIntegrityIngestSettings settings) {
44 computeHashesCheckbox.setSelected(settings.shouldComputeHashes());
45 verifyHashesCheckbox.setSelected(settings.shouldVerifyHashes());
49 public IngestModuleIngestJobSettings getSettings() {
50 return new DataSourceIntegrityIngestSettings(computeHashesCheckbox.isSelected(), verifyHashesCheckbox.isSelected());
58 @SuppressWarnings(
"unchecked")
60 private
void initComponents() {
62 computeHashesCheckbox =
new javax.swing.JCheckBox();
63 verifyHashesCheckbox =
new javax.swing.JCheckBox();
64 ingestSettingsLabel =
new javax.swing.JLabel();
65 noteLabel =
new javax.swing.JLabel();
67 setPreferredSize(
new java.awt.Dimension(300, 155));
69 org.openide.awt.Mnemonics.setLocalizedText(computeHashesCheckbox,
org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class,
"DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text"));
70 computeHashesCheckbox.addActionListener(
new java.awt.event.ActionListener() {
71 public void actionPerformed(java.awt.event.ActionEvent evt) {
72 computeHashesCheckboxActionPerformed(evt);
76 org.openide.awt.Mnemonics.setLocalizedText(verifyHashesCheckbox,
org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class,
"DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text"));
78 ingestSettingsLabel.setFont(ingestSettingsLabel.getFont().deriveFont(ingestSettingsLabel.getFont().getStyle() | java.awt.Font.BOLD));
79 org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel,
org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class,
"DataSourceIntegrityIngestSettingsPanel.ingestSettingsLabel.text"));
81 org.openide.awt.Mnemonics.setLocalizedText(noteLabel,
org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class,
"DataSourceIntegrityIngestSettingsPanel.noteLabel.text"));
83 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
84 this.setLayout(layout);
85 layout.setHorizontalGroup(
86 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 .addGroup(layout.createSequentialGroup()
89 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
90 .addComponent(noteLabel)
91 .addComponent(verifyHashesCheckbox)
92 .addComponent(computeHashesCheckbox)
93 .addComponent(ingestSettingsLabel))
94 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
96 layout.setVerticalGroup(
97 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
98 .addGroup(layout.createSequentialGroup()
100 .addComponent(ingestSettingsLabel)
101 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
102 .addComponent(computeHashesCheckbox)
103 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
104 .addComponent(verifyHashesCheckbox)
105 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
106 .addComponent(noteLabel)
107 .addContainerGap(53, Short.MAX_VALUE))
111 private void computeHashesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {
116 private javax.swing.JCheckBox computeHashesCheckbox;
117 private javax.swing.JLabel ingestSettingsLabel;
118 private javax.swing.JLabel noteLabel;
119 private javax.swing.JCheckBox verifyHashesCheckbox;