Autopsy  4.4
Graphical digital forensics platform for The Sleuth Kit and other tools.
CaseInformationPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2017 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.casemodule;
20 
21 import java.awt.event.ActionListener;
22 import javax.swing.event.ChangeEvent;
23 import org.openide.util.NbBundle.Messages;
24 
29 class CaseInformationPanel extends javax.swing.JPanel {
30 
31  private static final long serialVersionUID = 1L;
32 
37  CaseInformationPanel() {
38  initComponents();
39  customizeComponents();
40  }
41 
42  @Messages({
43  "CaseInformationPanel.caseDetails.header=Case Details",
44  "CaseInformationPanel.ingestJobInfo.header=Ingest History"
45  })
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());
53  });
54  }
55 
61  void addCloseButtonAction(ActionListener action) {
62  this.closeButton.addActionListener(action);
63  }
64 
70  @SuppressWarnings("unchecked")
71  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
72  private void initComponents() {
73 
74  jPanel1 = new javax.swing.JPanel();
75  tabbedPane = new javax.swing.JTabbedPane();
76  closeButton = new javax.swing.JButton();
77 
78  tabbedPane.setPreferredSize(new java.awt.Dimension(420, 200));
79 
80  org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(CaseInformationPanel.class, "CaseInformationPanel.closeButton.text")); // NOI18N
81  closeButton.addActionListener(new java.awt.event.ActionListener() {
82  public void actionPerformed(java.awt.event.ActionEvent evt) {
83  closeButtonActionPerformed(evt);
84  }
85  });
86 
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)
95  .addGap(5, 5, 5))
96  );
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)
103  .addGap(5, 5, 5))
104  );
105 
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()
111  .addGap(0, 0, 0)
112  .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
113  .addGap(0, 0, 0))
114  );
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)
118  );
119  }// </editor-fold>//GEN-END:initComponents
120 
121  private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
122  // Used by CasePropertiesAction
123  }//GEN-LAST:event_closeButtonActionPerformed
124 
125 
126  // Variables declaration - do not modify//GEN-BEGIN:variables
127  private javax.swing.JButton closeButton;
128  private javax.swing.JPanel jPanel1;
129  private javax.swing.JTabbedPane tabbedPane;
130  // End of variables declaration//GEN-END:variables
131 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Jun 13 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.