19 package org.sleuthkit.autopsy.casemodule;
21 import java.awt.event.ActionListener;
22 import javax.swing.event.ChangeEvent;
23 import org.openide.util.NbBundle.Messages;
29 class CaseInformationPanel
extends javax.swing.JPanel {
31 private static final long serialVersionUID = 1L;
37 CaseInformationPanel() {
39 customizeComponents();
43 "CaseInformationPanel.caseDetails.header=Case Details",
44 "CaseInformationPanel.ingestJobInfo.header=Ingest History"
46 private void customizeComponents() {
47 CasePropertiesPanel propertiesPanel =
new CasePropertiesPanel(Case.getCurrentCase());
48 propertiesPanel.setSize(propertiesPanel.getPreferredSize());
49 this.tabbedPane.addTab(Bundle.CaseInformationPanel_caseDetails_header(), propertiesPanel);
50 this.tabbedPane.addTab(Bundle.CaseInformationPanel_ingestJobInfo_header(),
new IngestJobInfoPanel());
51 this.tabbedPane.addChangeListener((ChangeEvent e) -> {
52 tabbedPane.getSelectedComponent().setSize(tabbedPane.getSelectedComponent().getPreferredSize());
61 void addCloseButtonAction(ActionListener action) {
62 this.closeButton.addActionListener(action);
70 @SuppressWarnings(
"unchecked")
72 private
void initComponents() {
74 jPanel1 =
new javax.swing.JPanel();
75 tabbedPane =
new javax.swing.JTabbedPane();
76 closeButton =
new javax.swing.JButton();
78 tabbedPane.setPreferredSize(
new java.awt.Dimension(420, 200));
80 org.openide.awt.Mnemonics.setLocalizedText(closeButton,
org.openide.util.NbBundle.getMessage(CaseInformationPanel.class,
"CaseInformationPanel.closeButton.text"));
81 closeButton.addActionListener(
new java.awt.event.ActionListener() {
82 public void actionPerformed(java.awt.event.ActionEvent evt) {
83 closeButtonActionPerformed(evt);
87 javax.swing.GroupLayout jPanel1Layout =
new javax.swing.GroupLayout(jPanel1);
88 jPanel1.setLayout(jPanel1Layout);
89 jPanel1Layout.setHorizontalGroup(
90 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 709, Short.MAX_VALUE)
92 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
93 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
94 .addComponent(closeButton)
97 jPanel1Layout.setVerticalGroup(
98 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
99 .addGroup(jPanel1Layout.createSequentialGroup()
100 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
101 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
102 .addComponent(closeButton)
106 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
107 this.setLayout(layout);
108 layout.setHorizontalGroup(
109 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 .addGroup(layout.createSequentialGroup()
112 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
115 layout.setVerticalGroup(
116 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
117 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
121 private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {
127 private javax.swing.JButton closeButton;
128 private javax.swing.JPanel jPanel1;
129 private javax.swing.JTabbedPane tabbedPane;