Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
HTMLReportConfigurationPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
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.report.modules.html;
20 
24 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
25 final class HTMLReportConfigurationPanel extends javax.swing.JPanel {
26 
30  HTMLReportConfigurationPanel() {
31  initComponents();
32  headerTextField.setText("");
33  footerTextField.setText("");
34  }
35 
36  void setConfiguration(HTMLReportModuleSettings settings) {
37  headerTextField.setText(settings.getHeader());
38  footerTextField.setText(settings.getFooter());
39  }
40 
41  HTMLReportModuleSettings getConfiguration() {
42  return new HTMLReportModuleSettings(headerTextField.getText(), footerTextField.getText());
43  }
44 
50  String getHeader() {
51  return headerTextField.getText();
52  }
53 
59  String getFooter() {
60  return footerTextField.getText();
61  }
62 
68  @SuppressWarnings("unchecked")
69  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
70  private void initComponents() {
71 
72  headerLabel = new javax.swing.JLabel();
73  footerLabel = new javax.swing.JLabel();
74  headerTextField = new javax.swing.JTextField();
75  footerTextField = new javax.swing.JTextField();
76 
77  org.openide.awt.Mnemonics.setLocalizedText(headerLabel, org.openide.util.NbBundle.getMessage(HTMLReportConfigurationPanel.class, "HTMLReportConfigurationPanel.headerLabel.text")); // NOI18N
78 
79  org.openide.awt.Mnemonics.setLocalizedText(footerLabel, org.openide.util.NbBundle.getMessage(HTMLReportConfigurationPanel.class, "HTMLReportConfigurationPanel.footerLabel.text")); // NOI18N
80 
81  headerTextField.setText(org.openide.util.NbBundle.getMessage(HTMLReportConfigurationPanel.class, "HTMLReportConfigurationPanel.headerTextField.text")); // NOI18N
82 
83  footerTextField.setText(org.openide.util.NbBundle.getMessage(HTMLReportConfigurationPanel.class, "HTMLReportConfigurationPanel.footerTextField.text")); // NOI18N
84 
85  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
86  this.setLayout(layout);
87  layout.setHorizontalGroup(
88  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
89  .addGroup(layout.createSequentialGroup()
90  .addContainerGap()
91  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
92  .addComponent(headerLabel)
93  .addComponent(footerLabel))
94  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
95  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
96  .addComponent(headerTextField)
97  .addComponent(footerTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE))
98  .addContainerGap())
99  );
100  layout.setVerticalGroup(
101  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
102  .addGroup(layout.createSequentialGroup()
103  .addContainerGap()
104  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
105  .addComponent(headerLabel)
106  .addComponent(headerTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
107  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
108  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
109  .addComponent(footerTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
110  .addComponent(footerLabel))
111  .addContainerGap(188, Short.MAX_VALUE))
112  );
113  }// </editor-fold>//GEN-END:initComponents
114  // Variables declaration - do not modify//GEN-BEGIN:variables
115  private javax.swing.JLabel footerLabel;
116  private javax.swing.JTextField footerTextField;
117  private javax.swing.JLabel headerLabel;
118  private javax.swing.JTextField headerTextField;
119  // End of variables declaration//GEN-END:variables
120 }

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