19 package org.sleuthkit.autopsy.directorytree;
21 import java.awt.event.ActionListener;
26 @SuppressWarnings(
"PMD.SingularField")
27 class ImageDetailsPanel extends javax.swing.JPanel {
41 @SuppressWarnings(
"unchecked")
43 private
void initComponents() {
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();
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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))
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))
122 layout.setVerticalGroup(
123 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
124 .addGroup(layout.createSequentialGroup()
126 .addComponent(imageInfoLabel)
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)
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)
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;
177 public void setImgNameValue(String arg) {
178 imgNameValue.setText(arg);
186 public void setImgTypeValue(String arg) {
187 imgTypeValue.setText(arg);
195 public void setImgSectorSizeValue(String arg) {
196 imgSectorSizeValue.setText(arg);
204 public void setImgTotalSizeValue(String arg) {
205 imgTotalSizeValue.setText(arg);
213 public void setImgHashValue(String arg) {
214 imgHashValue.setText(arg);
217 public void setVisibleHashInfo(
boolean visible) {
218 imgHashLabel.setVisible(visible);
219 imgHashValue.setVisible(visible);
227 public void setOKButtonActionListener(ActionListener e) {
228 OKButton.addActionListener(e);