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 bytesLabel1 =
new javax.swing.JLabel();
90 bytesLabel2 =
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.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.fsTypeLabel.text"));
99 imgOffsetLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.imgOffsetLabel.text"));
101 volumeIDLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.volumeIDLabel.text"));
103 blockSizeLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockSizeLabel.text"));
105 blockCountLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockCountLabel.text"));
107 rootInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.rootInumLabel.text"));
109 firstInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.firstInumLabel.text"));
111 lastInumLabel.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.lastInumLabel.text"));
113 fsTypeValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.fsTypeValue.text"));
115 imgOffsetValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.imgOffsetValue.text"));
117 volumeIDValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.volumeIDValue.text"));
119 blockSizeValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockSizeValue.text"));
121 blockCountValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.blockCountValue.text"));
123 rootInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.rootInumValue.text"));
125 firstInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.firstInumValue.text"));
127 lastInumValue.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.lastInumValue.text"));
129 jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
131 bytesLabel1.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.bytesLabel1.text"));
133 bytesLabel2.setText(
org.openide.util.NbBundle.getMessage(FileSystemDetailsPanel.class,
"FileSystemDetailsPanel.bytesLabel2.text"));
135 javax.swing.GroupLayout genInfoPanelLayout =
new javax.swing.GroupLayout(genInfoPanel);
136 genInfoPanel.setLayout(genInfoPanelLayout);
137 genInfoPanelLayout.setHorizontalGroup(
138 genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
139 .addGroup(genInfoPanelLayout.createSequentialGroup()
141 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
142 .addComponent(fsTypeLabel)
143 .addComponent(imgOffsetLabel)
144 .addComponent(volumeIDLabel)
145 .addComponent(blockSizeLabel))
147 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
148 .addGroup(genInfoPanelLayout.createSequentialGroup()
149 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
150 .addComponent(blockSizeValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
151 .addComponent(imgOffsetValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
152 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
153 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
154 .addComponent(bytesLabel1)
155 .addComponent(bytesLabel2)))
156 .addComponent(volumeIDValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
157 .addComponent(fsTypeValue))
159 .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
161 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
162 .addComponent(blockCountLabel)
163 .addComponent(rootInumLabel)
164 .addComponent(firstInumLabel)
165 .addComponent(lastInumLabel))
167 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
168 .addComponent(blockCountValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
169 .addComponent(rootInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
170 .addComponent(firstInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
171 .addComponent(lastInumValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
172 .addContainerGap(226, Short.MAX_VALUE))
174 genInfoPanelLayout.setVerticalGroup(
175 genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
176 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, genInfoPanelLayout.createSequentialGroup()
178 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
180 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
181 .addGroup(genInfoPanelLayout.createSequentialGroup()
182 .addComponent(fsTypeLabel)
183 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
184 .addComponent(imgOffsetLabel)
185 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
186 .addComponent(volumeIDLabel)
187 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
188 .addComponent(blockSizeLabel))
189 .addGroup(genInfoPanelLayout.createSequentialGroup()
190 .addComponent(fsTypeValue)
191 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
192 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
193 .addComponent(imgOffsetValue)
194 .addComponent(bytesLabel1))
195 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
196 .addComponent(volumeIDValue)
197 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
198 .addGroup(genInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
199 .addComponent(blockSizeValue)
200 .addComponent(bytesLabel2))))
201 .addGroup(genInfoPanelLayout.createSequentialGroup()
202 .addComponent(blockCountValue)
203 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
204 .addComponent(rootInumValue)
205 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
206 .addComponent(firstInumValue)
207 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
208 .addComponent(lastInumValue))
209 .addGroup(genInfoPanelLayout.createSequentialGroup()
210 .addComponent(blockCountLabel)
211 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
212 .addComponent(rootInumLabel)
213 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
214 .addComponent(firstInumLabel)
215 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
216 .addComponent(lastInumLabel)))
217 .addComponent(jSeparator1))
221 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
222 this.setLayout(layout);
223 layout.setHorizontalGroup(
224 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
225 .addGroup(layout.createSequentialGroup()
226 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
227 .addGroup(layout.createSequentialGroup()
229 .addComponent(genInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 534, javax.swing.GroupLayout.PREFERRED_SIZE))
230 .addGroup(layout.createSequentialGroup()
231 .addGap(221, 221, 221)
232 .addComponent(OKButton)))
233 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
235 layout.setVerticalGroup(
236 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
237 .addGroup(layout.createSequentialGroup()
239 .addComponent(genInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
240 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
241 .addComponent(OKButton)
242 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
251 public void setFileSystemTypeValue(String arg) {
252 fsTypeValue.setText(arg);
260 public void setImageOffsetValue(String arg) {
261 imgOffsetValue.setText(arg);
269 public void setVolumeIDValue(String arg) {
270 volumeIDValue.setText(arg);
278 public void setBlockSizeValue(String arg) {
279 blockSizeValue.setText(arg);
287 public void setBlockCountValue(String arg) {
288 blockCountValue.setText(arg);
296 public void setRootInumValue(String arg) {
297 rootInumValue.setText(arg);
305 public void setFirstInumValue(String arg) {
306 firstInumValue.setText(arg);
314 public void setLastInumValue(String arg) {
315 lastInumValue.setText(arg);
323 public void setOKButtonActionListener(ActionListener e) {
324 OKButton.addActionListener(e);
327 private javax.swing.JButton OKButton;
328 private javax.swing.JLabel blockCountLabel;
329 private javax.swing.JLabel blockCountValue;
330 private javax.swing.JLabel blockSizeLabel;
331 private javax.swing.JLabel blockSizeValue;
332 private javax.swing.JLabel bytesLabel1;
333 private javax.swing.JLabel bytesLabel2;
334 private javax.swing.JLabel firstInumLabel;
335 private javax.swing.JLabel firstInumValue;
336 private javax.swing.JLabel fsTypeLabel;
337 private javax.swing.JLabel fsTypeValue;
338 private javax.swing.JPanel genInfoPanel;
339 private javax.swing.JLabel imgOffsetLabel;
340 private javax.swing.JLabel imgOffsetValue;
341 private javax.swing.JSeparator jSeparator1;
342 private javax.swing.JLabel lastInumLabel;
343 private javax.swing.JLabel lastInumValue;
344 private javax.swing.JLabel rootInumLabel;
345 private javax.swing.JLabel rootInumValue;
346 private javax.swing.JLabel volumeIDLabel;
347 private javax.swing.JLabel volumeIDValue;