19 package org.sleuthkit.autopsy.directorytree;
21 import java.awt.event.ActionListener;
22 import java.util.logging.Level;
31 @SuppressWarnings(
"PMD.SingularField")
32 final class FileSystemDetailsPanel extends javax.swing.JPanel {
33 private static final Logger logger = Logger.getLogger(FileSystemDetailsPanel.class.getName());
34 private static final long serialVersionUID = 1L;
39 FileSystemDetailsPanel() {
43 FileSystemDetailsPanel(Volume content) {
46 FileSystem fSystem = content.getFileSystems().get(0);
47 setFileSystemTypeValue(fSystem.getFsType().getDisplayName());
48 setImageOffsetValue(Long.toString(fSystem.getImageOffset()));
49 setVolumeIDValue(Long.toString(fSystem.getId()));
50 setBlockSizeValue(Long.toString(fSystem.getBlock_size()));
51 setBlockCountValue(Long.toString(fSystem.getBlock_count()));
52 setRootInumValue(Long.toString(fSystem.getRoot_inum()));
53 setFirstInumValue(Long.toString(fSystem.getFirst_inum()));
54 setLastInumValue(Long.toString(fSystem.getLastInum()));
55 }
catch (TskCoreException|ArrayIndexOutOfBoundsException ex) {
56 logger.log(Level.SEVERE,
"Unable to construct FileSystemDetailsPanel",ex);
66 @SuppressWarnings(
"unchecked")
68 private
void initComponents() {
70 OKButton =
new javax.swing.JButton();
71 genInfoPanel =
new javax.swing.JPanel();
72 fsTypeLabel =
new javax.swing.JLabel();
73 imgOffsetLabel =
new javax.swing.JLabel();
74 volumeIDLabel =
new javax.swing.JLabel();
75 blockSizeLabel =
new javax.swing.JLabel();
76 blockCountLabel =
new javax.swing.JLabel();
77 rootInumLabel =
new javax.swing.JLabel();
78 firstInumLabel =
new javax.swing.JLabel();
79 lastInumLabel =
new javax.swing.JLabel();
80 fsTypeValue =
new javax.swing.JLabel();
81 imgOffsetValue =
new javax.swing.JLabel();
82 volumeIDValue =
new javax.swing.JLabel();
83 blockSizeValue =
new javax.swing.JLabel();
84 blockCountValue =
new javax.swing.JLabel();
85 rootInumValue =
new javax.swing.JLabel();
86 firstInumValue =
new javax.swing.JLabel();
87 lastInumValue =
new javax.swing.JLabel();
88 jSeparator1 =
new javax.swing.JSeparator();
89 jLabel2 =
new javax.swing.JLabel();
90 jLabel3 =
new javax.swing.JLabel();
92 OKButton.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.OKButton.text"));
94 genInfoPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
95 genInfoPanel.setPreferredSize(
new java.awt.Dimension(815, 170));
97 fsTypeLabel.setFont(fsTypeLabel.getFont().deriveFont(fsTypeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
98 fsTypeLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.fsTypeLabel.text"));
100 imgOffsetLabel.setFont(imgOffsetLabel.getFont().deriveFont(imgOffsetLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
101 imgOffsetLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.imgOffsetLabel.text"));
103 volumeIDLabel.setFont(volumeIDLabel.getFont().deriveFont(volumeIDLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
104 volumeIDLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.volumeIDLabel.text"));
106 blockSizeLabel.setFont(blockSizeLabel.getFont().deriveFont(blockSizeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
107 blockSizeLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockSizeLabel.text"));
109 blockCountLabel.setFont(blockCountLabel.getFont().deriveFont(blockCountLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
110 blockCountLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockCountLabel.text"));
112 rootInumLabel.setFont(rootInumLabel.getFont().deriveFont(rootInumLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
113 rootInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.rootInumLabel.text"));
115 firstInumLabel.setFont(firstInumLabel.getFont().deriveFont(firstInumLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
116 firstInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.firstInumLabel.text"));
118 lastInumLabel.setFont(lastInumLabel.getFont().deriveFont(lastInumLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
119 lastInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.lastInumLabel.text"));
121 fsTypeValue.setFont(fsTypeValue.getFont().deriveFont(fsTypeValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
122 fsTypeValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.fsTypeValue.text"));
124 imgOffsetValue.setFont(imgOffsetValue.getFont().deriveFont(imgOffsetValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
125 imgOffsetValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.imgOffsetValue.text"));
127 volumeIDValue.setFont(volumeIDValue.getFont().deriveFont(volumeIDValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
128 volumeIDValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.volumeIDValue.text"));
130 blockSizeValue.setFont(blockSizeValue.getFont().deriveFont(blockSizeValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
131 blockSizeValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockSizeValue.text"));
133 blockCountValue.setFont(blockCountValue.getFont().deriveFont(blockCountValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
134 blockCountValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockCountValue.text"));
136 rootInumValue.setFont(rootInumValue.getFont().deriveFont(rootInumValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
137 rootInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.rootInumValue.text"));
139 firstInumValue.setFont(firstInumValue.getFont().deriveFont(firstInumValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
140 firstInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.firstInumValue.text"));
142 lastInumValue.setFont(lastInumValue.getFont().deriveFont(lastInumValue.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
143 lastInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.lastInumValue.text"));
145 jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
147 jLabel2.setFont(jLabel2.getFont().deriveFont(jLabel2.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
148 jLabel2.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.jLabel2.text"));
150 jLabel3.setFont(jLabel3.getFont().deriveFont(jLabel3.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
151 jLabel3.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.jLabel3.text"));
153 javax.swing.GroupLayout genInfoPanelLayout =
new javax.swing.GroupLayout(genInfoPanel);
154 genInfoPanel.setLayout(genInfoPanelLayout);
155 genInfoPanelLayout.setHorizontalGroup(
156 genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
157 .addGroup(genInfoPanelLayout.createSequentialGroup()
159 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
160 .addComponent(fsTypeLabel)
161 .addComponent(imgOffsetLabel)
162 .addComponent(volumeIDLabel)
163 .addComponent(blockSizeLabel))
165 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
166 .addGroup(genInfoPanelLayout.createSequentialGroup()
167 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
168 .addComponent(blockSizeValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
169 .addComponent(imgOffsetValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
170 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
171 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
172 .addComponent(jLabel2)
173 .addComponent(jLabel3)))
174 .addComponent(volumeIDValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
175 .addComponent(fsTypeValue))
177 .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
179 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
180 .addComponent(blockCountLabel)
181 .addComponent(rootInumLabel)
182 .addComponent(firstInumLabel)
183 .addComponent(lastInumLabel))
185 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
186 .addComponent(blockCountValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
187 .addComponent(rootInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
188 .addComponent(firstInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
189 .addComponent(lastInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
190 .addContainerGap(229, Short.MAX_VALUE))
192 genInfoPanelLayout.setVerticalGroup(
193 genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
194 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, genInfoPanelLayout.createSequentialGroup()
196 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
197 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
198 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
199 .addGroup(genInfoPanelLayout.createSequentialGroup()
200 .addComponent(fsTypeLabel)
201 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
202 .addComponent(imgOffsetLabel)
203 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
204 .addComponent(volumeIDLabel)
205 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
206 .addComponent(blockSizeLabel))
207 .addGroup(genInfoPanelLayout.createSequentialGroup()
208 .addComponent(fsTypeValue)
209 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
210 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
211 .addComponent(imgOffsetValue)
212 .addComponent(jLabel2))
213 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
214 .addComponent(volumeIDValue)
215 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
216 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
217 .addComponent(blockSizeValue)
218 .addComponent(jLabel3))))
219 .addGroup(genInfoPanelLayout.createSequentialGroup()
220 .addComponent(blockCountValue)
221 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
222 .addComponent(rootInumValue)
223 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
224 .addComponent(firstInumValue)
225 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
226 .addComponent(lastInumValue))
227 .addGroup(genInfoPanelLayout.createSequentialGroup()
228 .addComponent(blockCountLabel)
229 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
230 .addComponent(rootInumLabel)
231 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
232 .addComponent(firstInumLabel)
233 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
234 .addComponent(lastInumLabel)))
235 .addComponent(jSeparator1))
239 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
240 this.setLayout(layout);
241 layout.setHorizontalGroup(
242 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
243 .addGroup(layout.createSequentialGroup()
244 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
245 .addGroup(layout.createSequentialGroup()
247 .addComponent(genInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 534, javax.swing.GroupLayout.PREFERRED_SIZE))
248 .addGroup(layout.createSequentialGroup()
249 .addGap(221, 221, 221)
250 .addComponent(OKButton)))
251 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
253 layout.setVerticalGroup(
254 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
255 .addGroup(layout.createSequentialGroup()
257 .addComponent(genInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
258 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
259 .addComponent(OKButton)
260 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
269 public void setFileSystemTypeValue(String arg) {
270 fsTypeValue.setText(arg);
278 public void setImageOffsetValue(String arg) {
279 imgOffsetValue.setText(arg);
287 public void setVolumeIDValue(String arg) {
288 volumeIDValue.setText(arg);
296 public void setBlockSizeValue(String arg) {
297 blockSizeValue.setText(arg);
305 public void setBlockCountValue(String arg) {
306 blockCountValue.setText(arg);
314 public void setRootInumValue(String arg) {
315 rootInumValue.setText(arg);
323 public void setFirstInumValue(String arg) {
324 firstInumValue.setText(arg);
332 public void setLastInumValue(String arg) {
333 lastInumValue.setText(arg);
341 public void setOKButtonActionListener(ActionListener e) {
342 OKButton.addActionListener(e);
345 private javax.swing.JButton OKButton;
346 private javax.swing.JLabel blockCountLabel;
347 private javax.swing.JLabel blockCountValue;
348 private javax.swing.JLabel blockSizeLabel;
349 private javax.swing.JLabel blockSizeValue;
350 private javax.swing.JLabel firstInumLabel;
351 private javax.swing.JLabel firstInumValue;
352 private javax.swing.JLabel fsTypeLabel;
353 private javax.swing.JLabel fsTypeValue;
354 private javax.swing.JPanel genInfoPanel;
355 private javax.swing.JLabel imgOffsetLabel;
356 private javax.swing.JLabel imgOffsetValue;
357 private javax.swing.JLabel jLabel2;
358 private javax.swing.JLabel jLabel3;
359 private javax.swing.JSeparator jSeparator1;
360 private javax.swing.JLabel lastInumLabel;
361 private javax.swing.JLabel lastInumValue;
362 private javax.swing.JLabel rootInumLabel;
363 private javax.swing.JLabel rootInumValue;
364 private javax.swing.JLabel volumeIDLabel;
365 private javax.swing.JLabel volumeIDValue;