Autopsy  4.9.1
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  jLabel3 = new javax.swing.JLabel();
65  jLabel1 = new javax.swing.JLabel();
66 
67  org.openide.awt.Mnemonics.setLocalizedText(computeHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N
68  computeHashesCheckbox.addActionListener(new java.awt.event.ActionListener() {
69  public void actionPerformed(java.awt.event.ActionEvent evt) {
70  computeHashesCheckboxActionPerformed(evt);
71  }
72  });
73 
74  org.openide.awt.Mnemonics.setLocalizedText(verifyHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text")); // NOI18N
75 
76  jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
77  org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.jLabel3.text")); // NOI18N
78 
79  org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.jLabel1.text")); // NOI18N
80 
81  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
82  this.setLayout(layout);
83  layout.setHorizontalGroup(
84  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85  .addGroup(layout.createSequentialGroup()
86  .addContainerGap()
87  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
88  .addComponent(jLabel1)
89  .addComponent(verifyHashesCheckbox)
90  .addComponent(computeHashesCheckbox)
91  .addComponent(jLabel3))
92  .addContainerGap(47, Short.MAX_VALUE))
93  );
94  layout.setVerticalGroup(
95  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
96  .addGroup(layout.createSequentialGroup()
97  .addContainerGap()
98  .addComponent(jLabel3)
99  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
100  .addComponent(computeHashesCheckbox)
101  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
102  .addComponent(verifyHashesCheckbox)
103  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
104  .addComponent(jLabel1)
105  .addContainerGap(53, Short.MAX_VALUE))
106  );
107  }// </editor-fold>//GEN-END:initComponents
108 
109  private void computeHashesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_computeHashesCheckboxActionPerformed
110  // TODO add your handling code here:
111  }//GEN-LAST:event_computeHashesCheckboxActionPerformed
112 
113  // Variables declaration - do not modify//GEN-BEGIN:variables
114  private javax.swing.JCheckBox computeHashesCheckbox;
115  private javax.swing.JLabel jLabel1;
116  private javax.swing.JLabel jLabel3;
117  private javax.swing.JCheckBox verifyHashesCheckbox;
118  // End of variables declaration//GEN-END:variables
119 
120 }

Copyright © 2012-2018 Basis Technology. Generated on: Tue Dec 18 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.