Autopsy  4.11.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ReportFileTextConfigurationPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 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.report;
20 
24 class ReportFileTextConfigurationPanel extends javax.swing.JPanel {
25 
26  private static final long serialVersionUID = 1L;
27  private static final String TAB_DELIMITER = "\t"; //NON-NLS
28  private static final String COMMA_DELIMITER = ","; //NON-NLS
29 
33  ReportFileTextConfigurationPanel() {
34  initComponents();
35  }
36 
42  String getDelimiter() {
43  if (commaDelimitedButton.isSelected()) {
44  return COMMA_DELIMITER;
45  } else {
46  //if the comma button is not selected default to tab since it was previously the only option
47  return TAB_DELIMITER;
48  }
49  }
50 
56  @SuppressWarnings("unchecked")
57  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
58  private void initComponents() {
59 
60  delimiterGroup = new javax.swing.ButtonGroup();
61  tabDelimitedButton = new javax.swing.JRadioButton();
62  commaDelimitedButton = new javax.swing.JRadioButton();
63 
64  delimiterGroup.add(tabDelimitedButton);
65  tabDelimitedButton.setSelected(true);
66  org.openide.awt.Mnemonics.setLocalizedText(tabDelimitedButton, org.openide.util.NbBundle.getMessage(ReportFileTextConfigurationPanel.class, "ReportFileTextConfigurationPanel.tabDelimitedButton.text")); // NOI18N
67 
68  delimiterGroup.add(commaDelimitedButton);
69  org.openide.awt.Mnemonics.setLocalizedText(commaDelimitedButton, org.openide.util.NbBundle.getMessage(ReportFileTextConfigurationPanel.class, "ReportFileTextConfigurationPanel.commaDelimitedButton.text")); // NOI18N
70 
71  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
72  this.setLayout(layout);
73  layout.setHorizontalGroup(
74  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75  .addGroup(layout.createSequentialGroup()
76  .addContainerGap()
77  .addComponent(tabDelimitedButton, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
78  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
79  .addComponent(commaDelimitedButton, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
80  .addContainerGap(166, Short.MAX_VALUE))
81  );
82  layout.setVerticalGroup(
83  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
84  .addGroup(layout.createSequentialGroup()
85  .addContainerGap()
86  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
87  .addComponent(tabDelimitedButton)
88  .addComponent(commaDelimitedButton))
89  .addContainerGap(78, Short.MAX_VALUE))
90  );
91  }// </editor-fold>//GEN-END:initComponents
92 
93 
94  // Variables declaration - do not modify//GEN-BEGIN:variables
95  private javax.swing.JRadioButton commaDelimitedButton;
96  private javax.swing.ButtonGroup delimiterGroup;
97  private javax.swing.JRadioButton tabDelimitedButton;
98  // End of variables declaration//GEN-END:variables
99 }

Copyright © 2012-2018 Basis Technology. Generated on: Fri Jun 21 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.