Autopsy  4.14.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
DataSourceIntegrityIngestSettingsPanel.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2018 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.modules.dataSourceIntegrity;
20 
23 
27 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
28 final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
29 
33  public DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) {
34  initComponents();
35  customizeComponents(settings);
36  }
37 
43  private void customizeComponents(DataSourceIntegrityIngestSettings settings) {
44  computeHashesCheckbox.setSelected(settings.shouldComputeHashes());
45  verifyHashesCheckbox.setSelected(settings.shouldVerifyHashes());
46  }
47 
48  @Override
49  public IngestModuleIngestJobSettings getSettings() {
50  return new DataSourceIntegrityIngestSettings(computeHashesCheckbox.isSelected(), verifyHashesCheckbox.isSelected());
51  }
52 
58  @SuppressWarnings("unchecked")
59  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
60  private void initComponents() {
61 
62  computeHashesCheckbox = new javax.swing.JCheckBox();
63  verifyHashesCheckbox = new javax.swing.JCheckBox();
64  ingestSettingsLabel = new javax.swing.JLabel();
65  noteLabel = new javax.swing.JLabel();
66 
67  setPreferredSize(new java.awt.Dimension(300, 155));
68 
69  org.openide.awt.Mnemonics.setLocalizedText(computeHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N
70  computeHashesCheckbox.addActionListener(new java.awt.event.ActionListener() {
71  public void actionPerformed(java.awt.event.ActionEvent evt) {
72  computeHashesCheckboxActionPerformed(evt);
73  }
74  });
75 
76  org.openide.awt.Mnemonics.setLocalizedText(verifyHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text")); // NOI18N
77 
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")); // NOI18N
80 
81  org.openide.awt.Mnemonics.setLocalizedText(noteLabel, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.noteLabel.text")); // NOI18N
82 
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()
88  .addContainerGap()
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))
95  );
96  layout.setVerticalGroup(
97  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
98  .addGroup(layout.createSequentialGroup()
99  .addContainerGap()
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))
108  );
109  }// </editor-fold>//GEN-END:initComponents
110 
111  private void computeHashesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_computeHashesCheckboxActionPerformed
112  // TODO add your handling code here:
113  }//GEN-LAST:event_computeHashesCheckboxActionPerformed
114 
115  // Variables declaration - do not modify//GEN-BEGIN:variables
116  private javax.swing.JCheckBox computeHashesCheckbox;
117  private javax.swing.JLabel ingestSettingsLabel;
118  private javax.swing.JLabel noteLabel;
119  private javax.swing.JCheckBox verifyHashesCheckbox;
120  // End of variables declaration//GEN-END:variables
121 
122 }

Copyright © 2012-2020 Basis Technology. Generated on: Wed Apr 8 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.