Autopsy  4.7.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ImageDetailsPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-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.directorytree;
20 
21 import java.awt.event.ActionListener;
22 
26 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
27 class ImageDetailsPanel extends javax.swing.JPanel {
28 
32  ImageDetailsPanel() {
33  initComponents();
34  }
35 
41  @SuppressWarnings("unchecked")
42  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
43  private void initComponents() {
44 
45  imageInfoLabel = new javax.swing.JLabel();
46  imgNameLabel = new javax.swing.JLabel();
47  imgTypeLabel = new javax.swing.JLabel();
48  imgSectorSizeLabel = new javax.swing.JLabel();
49  imgNameValue = new javax.swing.JLabel();
50  imgTypeValue = new javax.swing.JLabel();
51  imgSectorSizeValue = new javax.swing.JLabel();
52  OKButton = new javax.swing.JButton();
53  imgTotalSizeLabel = new javax.swing.JLabel();
54  imgTotalSizeValue = new javax.swing.JLabel();
55  imgHashLabel = new javax.swing.JLabel();
56  imgHashValue = new javax.swing.JLabel();
57 
58  imageInfoLabel.setFont(imageInfoLabel.getFont().deriveFont(imageInfoLabel.getFont().getStyle() | java.awt.Font.BOLD, 18));
59  imageInfoLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imageInfoLabel.text")); // NOI18N
60 
61  imgNameLabel.setFont(imgNameLabel.getFont().deriveFont(imgNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
62  imgNameLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgNameLabel.text")); // NOI18N
63 
64  imgTypeLabel.setFont(imgTypeLabel.getFont().deriveFont(imgTypeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
65  imgTypeLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgTypeLabel.text")); // NOI18N
66 
67  imgSectorSizeLabel.setFont(imgSectorSizeLabel.getFont().deriveFont(imgSectorSizeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
68  imgSectorSizeLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgSectorSizeLabel.text")); // NOI18N
69 
70  imgNameValue.setFont(imgNameValue.getFont().deriveFont(imgNameValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
71  imgNameValue.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgNameValue.text")); // NOI18N
72 
73  imgTypeValue.setFont(imgTypeValue.getFont().deriveFont(imgTypeValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
74  imgTypeValue.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgTypeValue.text")); // NOI18N
75 
76  imgSectorSizeValue.setFont(imgSectorSizeValue.getFont().deriveFont(imgSectorSizeValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
77  imgSectorSizeValue.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgSectorSizeValue.text")); // NOI18N
78 
79  OKButton.setFont(OKButton.getFont().deriveFont(OKButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
80  OKButton.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.OKButton.text")); // NOI18N
81 
82  imgTotalSizeLabel.setFont(imgTotalSizeLabel.getFont().deriveFont(imgTotalSizeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
83  imgTotalSizeLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgTotalSizeLabel.text")); // NOI18N
84 
85  imgTotalSizeValue.setFont(imgTotalSizeValue.getFont().deriveFont(imgTotalSizeValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
86  imgTotalSizeValue.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgTotalSizeValue.text")); // NOI18N
87 
88  imgHashLabel.setFont(imgHashLabel.getFont().deriveFont(imgHashLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
89  imgHashLabel.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgHashLabel.text")); // NOI18N
90 
91  imgHashValue.setFont(imgHashValue.getFont().deriveFont(imgHashValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
92  imgHashValue.setText(org.openide.util.NbBundle.getMessage(ImageDetailsPanel.class, "ImageDetailsPanel.imgHashValue.text")); // NOI18N
93 
94  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
95  this.setLayout(layout);
96  layout.setHorizontalGroup(
97  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
98  .addGroup(layout.createSequentialGroup()
99  .addGap(0, 68, Short.MAX_VALUE)
100  .addComponent(imageInfoLabel)
101  .addContainerGap(78, Short.MAX_VALUE))
102  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
103  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
104  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
105  .addGroup(layout.createSequentialGroup()
106  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
107  .addComponent(imgNameLabel)
108  .addComponent(imgTypeLabel)
109  .addComponent(imgSectorSizeLabel)
110  .addComponent(imgTotalSizeLabel)
111  .addComponent(imgHashLabel))
112  .addGap(18, 18, 18)
113  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
114  .addComponent(imgNameValue)
115  .addComponent(imgTypeValue)
116  .addComponent(imgSectorSizeValue)
117  .addComponent(imgTotalSizeValue)
118  .addComponent(imgHashValue)))
119  .addComponent(OKButton))
120  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
121  );
122  layout.setVerticalGroup(
123  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
124  .addGroup(layout.createSequentialGroup()
125  .addGap(38, 38, 38)
126  .addComponent(imageInfoLabel)
127  .addGap(18, 18, 18)
128  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
129  .addGroup(layout.createSequentialGroup()
130  .addComponent(imgNameValue)
131  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
132  .addComponent(imgTypeValue)
133  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
134  .addComponent(imgSectorSizeValue)
135  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
136  .addComponent(imgTotalSizeValue)
137  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
138  .addComponent(imgHashValue))
139  .addGroup(layout.createSequentialGroup()
140  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
141  .addGroup(layout.createSequentialGroup()
142  .addComponent(imgNameLabel)
143  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
144  .addComponent(imgTypeLabel)
145  .addGap(25, 25, 25))
146  .addComponent(imgSectorSizeLabel))
147  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
148  .addComponent(imgTotalSizeLabel)
149  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
150  .addComponent(imgHashLabel)))
151  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
152  .addComponent(OKButton)
153  .addContainerGap())
154  );
155  }// </editor-fold>//GEN-END:initComponents
156 
157  // Variables declaration - do not modify//GEN-BEGIN:variables
158  private javax.swing.JButton OKButton;
159  private javax.swing.JLabel imageInfoLabel;
160  private javax.swing.JLabel imgHashLabel;
161  private javax.swing.JLabel imgHashValue;
162  private javax.swing.JLabel imgNameLabel;
163  private javax.swing.JLabel imgNameValue;
164  private javax.swing.JLabel imgSectorSizeLabel;
165  private javax.swing.JLabel imgSectorSizeValue;
166  private javax.swing.JLabel imgTotalSizeLabel;
167  private javax.swing.JLabel imgTotalSizeValue;
168  private javax.swing.JLabel imgTypeLabel;
169  private javax.swing.JLabel imgTypeValue;
170  // End of variables declaration//GEN-END:variables
171 
177  public void setImgNameValue(String arg) {
178  imgNameValue.setText(arg);
179  }
180 
186  public void setImgTypeValue(String arg) {
187  imgTypeValue.setText(arg);
188  }
189 
195  public void setImgSectorSizeValue(String arg) {
196  imgSectorSizeValue.setText(arg);
197  }
198 
204  public void setImgTotalSizeValue(String arg) {
205  imgTotalSizeValue.setText(arg);
206  }
207 
213  public void setImgHashValue(String arg) {
214  imgHashValue.setText(arg);
215  }
216 
217  public void setVisibleHashInfo(boolean visible) {
218  imgHashLabel.setVisible(visible);
219  imgHashValue.setVisible(visible);
220  }
221 
227  public void setOKButtonActionListener(ActionListener e) {
228  OKButton.addActionListener(e);
229  }
230 }

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