Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
IngestSettingsPanel.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.centralrepository.ingestmodule;
20 
23 
27 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
28 final class IngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
29 
33  public IngestSettingsPanel(IngestSettings settings) {
34  initComponents();
35  customizeComponents(settings);
36  }
37 
43  private void customizeComponents(IngestSettings settings) {
44  flagTaggedNotableItemsCheckbox.setSelected(settings.isFlagTaggedNotableItems());
45  flagPreviouslySeenDevicesCheckbox.setSelected(settings.isFlagPreviousDevices());
46  createCorrelationPropertiesCheckbox.setSelected(settings.shouldCreateCorrelationProperties());
47  }
48 
49  @Override
50  public IngestModuleIngestJobSettings getSettings() {
51  return new IngestSettings(flagTaggedNotableItemsCheckbox.isSelected(), flagPreviouslySeenDevicesCheckbox.isSelected(), createCorrelationPropertiesCheckbox.isSelected());
52  }
53 
59  @SuppressWarnings("unchecked")
60  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
61  private void initComponents() {
62 
63  ingestSettingsLabel = new javax.swing.JLabel();
64  flagTaggedNotableItemsCheckbox = new javax.swing.JCheckBox();
65  flagPreviouslySeenDevicesCheckbox = new javax.swing.JCheckBox();
66  createCorrelationPropertiesCheckbox = new javax.swing.JCheckBox();
67 
68  ingestSettingsLabel.setFont(ingestSettingsLabel.getFont().deriveFont(ingestSettingsLabel.getFont().getStyle() | java.awt.Font.BOLD));
69  org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel, org.openide.util.NbBundle.getMessage(IngestSettingsPanel.class, "IngestSettingsPanel.ingestSettingsLabel.text")); // NOI18N
70 
71  org.openide.awt.Mnemonics.setLocalizedText(flagTaggedNotableItemsCheckbox, org.openide.util.NbBundle.getMessage(IngestSettingsPanel.class, "IngestSettingsPanel.flagTaggedNotableItemsCheckbox.text")); // NOI18N
72 
73  org.openide.awt.Mnemonics.setLocalizedText(flagPreviouslySeenDevicesCheckbox, org.openide.util.NbBundle.getMessage(IngestSettingsPanel.class, "IngestSettingsPanel.flagPreviouslySeenDevicesCheckbox.text")); // NOI18N
74 
75  org.openide.awt.Mnemonics.setLocalizedText(createCorrelationPropertiesCheckbox, org.openide.util.NbBundle.getMessage(IngestSettingsPanel.class, "IngestSettingsPanel.createCorrelationPropertiesCheckbox.text")); // NOI18N
76 
77  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
78  this.setLayout(layout);
79  layout.setHorizontalGroup(
80  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81  .addGroup(layout.createSequentialGroup()
82  .addContainerGap()
83  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
84  .addComponent(ingestSettingsLabel)
85  .addGroup(layout.createSequentialGroup()
86  .addGap(10, 10, 10)
87  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
88  .addComponent(flagTaggedNotableItemsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
89  .addComponent(flagPreviouslySeenDevicesCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
90  .addComponent(createCorrelationPropertiesCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
91  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
92  );
93  layout.setVerticalGroup(
94  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95  .addGroup(layout.createSequentialGroup()
96  .addContainerGap()
97  .addComponent(ingestSettingsLabel)
98  .addGap(9, 9, 9)
99  .addComponent(createCorrelationPropertiesCheckbox)
100  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
101  .addComponent(flagTaggedNotableItemsCheckbox)
102  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
103  .addComponent(flagPreviouslySeenDevicesCheckbox)
104  .addContainerGap(47, Short.MAX_VALUE))
105  );
106  }// </editor-fold>//GEN-END:initComponents
107 
108  // Variables declaration - do not modify//GEN-BEGIN:variables
109  private javax.swing.JCheckBox createCorrelationPropertiesCheckbox;
110  private javax.swing.JCheckBox flagPreviouslySeenDevicesCheckbox;
111  private javax.swing.JCheckBox flagTaggedNotableItemsCheckbox;
112  private javax.swing.JLabel ingestSettingsLabel;
113  // End of variables declaration//GEN-END:variables
114 
115 }

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.