19 package org.sleuthkit.autopsy.report.modules.file;
24 class ReportFileTextConfigurationPanel
extends javax.swing.JPanel {
26 private static final long serialVersionUID = 1L;
27 private static final String TAB_DELIMITER =
"\t";
28 private static final String COMMA_DELIMITER =
",";
33 ReportFileTextConfigurationPanel() {
42 void setConfiguration(FileReportModuleSettings settings) {
43 if (settings.getReportDelimiter() == FileReportModuleSettings.ReportDelimiter.COMA_DELIMITED) {
44 commaDelimitedButton.setSelected(
true);
47 tabDelimitedButton.setSelected(
true);
56 FileReportModuleSettings getConfiguration() {
57 if (commaDelimitedButton.isSelected()) {
58 return new FileReportModuleSettings(FileReportModuleSettings.ReportDelimiter.COMA_DELIMITED);
60 return new FileReportModuleSettings(FileReportModuleSettings.ReportDelimiter.TAB_DELIMITED);
69 String getDelimiter() {
70 if (commaDelimitedButton.isSelected()) {
71 return COMMA_DELIMITER;
83 @SuppressWarnings(
"unchecked")
85 private
void initComponents() {
87 delimiterGroup =
new javax.swing.ButtonGroup();
88 tabDelimitedButton =
new javax.swing.JRadioButton();
89 commaDelimitedButton =
new javax.swing.JRadioButton();
91 delimiterGroup.add(tabDelimitedButton);
92 tabDelimitedButton.setSelected(
true);
93 org.openide.awt.Mnemonics.setLocalizedText(tabDelimitedButton,
org.openide.util.NbBundle.getMessage(ReportFileTextConfigurationPanel.class,
"ReportFileTextConfigurationPanel.tabDelimitedButton.text"));
95 delimiterGroup.add(commaDelimitedButton);
96 org.openide.awt.Mnemonics.setLocalizedText(commaDelimitedButton,
org.openide.util.NbBundle.getMessage(ReportFileTextConfigurationPanel.class,
"ReportFileTextConfigurationPanel.commaDelimitedButton.text"));
98 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
99 this.setLayout(layout);
100 layout.setHorizontalGroup(
101 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
102 .addGroup(layout.createSequentialGroup()
104 .addComponent(tabDelimitedButton, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
105 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
106 .addComponent(commaDelimitedButton, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
107 .addContainerGap(166, Short.MAX_VALUE))
109 layout.setVerticalGroup(
110 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
111 .addGroup(layout.createSequentialGroup()
113 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
114 .addComponent(tabDelimitedButton)
115 .addComponent(commaDelimitedButton))
116 .addContainerGap(78, Short.MAX_VALUE))
122 private javax.swing.JRadioButton commaDelimitedButton;
123 private javax.swing.ButtonGroup delimiterGroup;
124 private javax.swing.JRadioButton tabDelimitedButton;