Autopsy  4.19.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
DataSourceIngestCancellationPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2014-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.ingest;
20 
25 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
26 final class DataSourceIngestCancellationPanel extends javax.swing.JPanel {
27 
28  private boolean cancelAllIngestModules;
29 
33  DataSourceIngestCancellationPanel() {
34  initComponents();
35  this.cancelCurrentModuleRadioButton.setSelected(true);
36  }
37 
45  boolean cancelAllDataSourceIngestModules() {
46  return this.cancelAllIngestModules;
47  }
48 
54  @SuppressWarnings("unchecked")
55  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
56  private void initComponents() {
57 
58  cancelRadioButtonsGroup = new javax.swing.ButtonGroup();
59  cancelCurrentModuleRadioButton = new javax.swing.JRadioButton();
60  cancelAllModulesRadioButton = new javax.swing.JRadioButton();
61 
62  cancelRadioButtonsGroup.add(cancelCurrentModuleRadioButton);
63  org.openide.awt.Mnemonics.setLocalizedText(cancelCurrentModuleRadioButton, org.openide.util.NbBundle.getMessage(DataSourceIngestCancellationPanel.class, "DataSourceIngestCancellationPanel.cancelCurrentModuleRadioButton.text")); // NOI18N
64  cancelCurrentModuleRadioButton.addActionListener(new java.awt.event.ActionListener() {
65  public void actionPerformed(java.awt.event.ActionEvent evt) {
66  cancelCurrentModuleRadioButtonActionPerformed(evt);
67  }
68  });
69 
70  cancelRadioButtonsGroup.add(cancelAllModulesRadioButton);
71  org.openide.awt.Mnemonics.setLocalizedText(cancelAllModulesRadioButton, org.openide.util.NbBundle.getMessage(DataSourceIngestCancellationPanel.class, "DataSourceIngestCancellationPanel.cancelAllModulesRadioButton.text")); // NOI18N
72  cancelAllModulesRadioButton.addActionListener(new java.awt.event.ActionListener() {
73  public void actionPerformed(java.awt.event.ActionEvent evt) {
74  cancelAllModulesRadioButtonActionPerformed(evt);
75  }
76  });
77 
78  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
79  this.setLayout(layout);
80  layout.setHorizontalGroup(
81  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
82  .addGroup(layout.createSequentialGroup()
83  .addContainerGap()
84  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85  .addComponent(cancelAllModulesRadioButton)
86  .addComponent(cancelCurrentModuleRadioButton))
87  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
88  );
89  layout.setVerticalGroup(
90  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
92  .addContainerGap()
93  .addComponent(cancelCurrentModuleRadioButton)
94  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
95  .addComponent(cancelAllModulesRadioButton)
96  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
97  );
98  }// </editor-fold>//GEN-END:initComponents
99 
100  private void cancelCurrentModuleRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelCurrentModuleRadioButtonActionPerformed
101  this.cancelAllIngestModules = this.cancelAllModulesRadioButton.isEnabled();
102  }//GEN-LAST:event_cancelCurrentModuleRadioButtonActionPerformed
103 
104  private void cancelAllModulesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelAllModulesRadioButtonActionPerformed
105  this.cancelAllIngestModules = this.cancelAllModulesRadioButton.isEnabled();
106  }//GEN-LAST:event_cancelAllModulesRadioButtonActionPerformed
107 
108  // Variables declaration - do not modify//GEN-BEGIN:variables
109  private javax.swing.JRadioButton cancelAllModulesRadioButton;
110  private javax.swing.JRadioButton cancelCurrentModuleRadioButton;
111  private javax.swing.ButtonGroup cancelRadioButtonsGroup;
112  // End of variables declaration//GEN-END:variables
113 }

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