Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ContainerPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 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.datasourcesummary.ui;
20 
21 import java.beans.PropertyChangeEvent;
22 import java.sql.SQLException;
23 import java.util.ArrayList;
24 import java.util.Arrays;
25 import java.util.Collections;
26 import java.util.HashSet;
27 import java.util.List;
28 import java.util.Set;
29 import java.util.logging.Level;
30 import java.util.stream.Collectors;
31 import java.util.stream.Stream;
33 import javax.swing.table.DefaultTableModel;
34 import org.apache.commons.lang.StringUtils;
35 import org.openide.util.NbBundle.Messages;
52 import org.sleuthkit.datamodel.DataSource;
53 import org.sleuthkit.datamodel.Image;
54 import org.sleuthkit.datamodel.TskCoreException;
55 
59 @Messages({
60  "ContainerPanel_tabName=Container"
61 })
62 class ContainerPanel extends BaseDataSourceSummaryPanel {
63 
67  private static class ImageViewModel {
68 
69  private final long unallocatedSize;
70  private final long size;
71  private final long sectorSize;
72 
73  private final String timeZone;
74  private final String imageType;
75 
76  private final List<String> paths;
77  private final String md5Hash;
78  private final String sha1Hash;
79  private final String sha256Hash;
80 
94  ImageViewModel(long unallocatedSize, long size, long sectorSize,
95  String timeZone, String imageType, List<String> paths, String md5Hash,
96  String sha1Hash, String sha256Hash) {
97  this.unallocatedSize = unallocatedSize;
98  this.size = size;
99  this.sectorSize = sectorSize;
100  this.timeZone = timeZone;
101  this.imageType = imageType;
102  this.paths = paths == null ? Collections.emptyList() : new ArrayList<>(paths);
103  this.md5Hash = md5Hash;
104  this.sha1Hash = sha1Hash;
105  this.sha256Hash = sha256Hash;
106  }
107 
111  long getUnallocatedSize() {
112  return unallocatedSize;
113  }
114 
118  long getSize() {
119  return size;
120  }
121 
125  long getSectorSize() {
126  return sectorSize;
127  }
128 
132  String getTimeZone() {
133  return timeZone;
134  }
135 
139  String getImageType() {
140  return imageType;
141  }
142 
146  List<String> getPaths() {
147  return paths;
148  }
149 
153  String getMd5Hash() {
154  return md5Hash;
155  }
156 
160  String getSha1Hash() {
161  return sha1Hash;
162  }
163 
167  String getSha256Hash() {
168  return sha256Hash;
169  }
170  }
171 
175  private static class ContainerViewModel {
176 
177  private final String displayName;
178  private final String originalName;
179  private final String deviceIdValue;
180  private final String acquisitionDetails;
182 
194  ContainerViewModel(String displayName, String originalName, String deviceIdValue,
195  String acquisitionDetails, ImageViewModel imageViewModel) {
196  this.displayName = displayName;
197  this.originalName = originalName;
198  this.deviceIdValue = deviceIdValue;
199  this.acquisitionDetails = acquisitionDetails;
200  this.imageViewModel = imageViewModel;
201  }
202 
206  String getDisplayName() {
207  return displayName;
208  }
209 
213  String getOriginalName() {
214  return originalName;
215  }
216 
220  String getDeviceId() {
221  return deviceIdValue;
222  }
223 
227  String getAcquisitionDetails() {
228  return acquisitionDetails;
229  }
230 
235  ImageViewModel getImageViewModel() {
236  return imageViewModel;
237  }
238  }
239 
240  // set of case events for which to call update (if the name changes, that will impact data shown)
241  private static final Set<Case.Events> CASE_EVENT_SET = new HashSet<>(Arrays.asList(
242  Case.Events.DATA_SOURCE_NAME_CHANGED
243  ));
244 
245  // governor for handling these updates
246  private static final UpdateGovernor CONTAINER_UPDATES = new DefaultUpdateGovernor() {
247 
248  @Override
249  public Set<Case.Events> getCaseEventUpdates() {
250  return CASE_EVENT_SET;
251  }
252 
253  @Override
254  public boolean isRefreshRequiredForCaseEvent(PropertyChangeEvent evt) {
255  return true;
256  }
257 
258  };
259 
260  //Because this panel was made using the gridbaglayout and netbean's Customize Layout tool it will be best to continue to modify it through that
261  private static final long serialVersionUID = 1L;
262  private static final Logger logger = Logger.getLogger(ContainerPanel.class.getName());
263 
264  private final List<DataFetchComponents<DataSource, ?>> dataFetchComponents;
265  private final DataFetcher<DataSource, ContainerViewModel> containerDataFetcher;
266 
270  ContainerPanel() {
271  this(new ContainerSummary());
272  }
273 
277  ContainerPanel(ContainerSummary containerSummary) {
278  super(containerSummary, CONTAINER_UPDATES);
279 
280  containerDataFetcher = (dataSource) -> getContainerViewModel(containerSummary, dataSource);
281 
282  dataFetchComponents = Arrays.asList(
283  new DataFetchComponents<>(
284  containerDataFetcher,
285  (result) -> {
286  if (result != null && result.getResultType() == ResultType.SUCCESS) {
287  ContainerViewModel data = result.getData();
288  updateDetailsPanelData(data);
289  } else {
290  if (result == null) {
291  logger.log(Level.WARNING, "No data fetch result was provided to the ContainerPanel.");
292  } else {
293  logger.log(Level.WARNING, "An exception occurred while attempting to fetch data for the ContainerPanel.",
294  result.getException());
295  }
296  updateDetailsPanelData(null);
297  }
298  }
299  )
300  );
301 
302  initComponents();
303  setDataSource(null);
304  }
305 
306  @Override
307  protected void onNewDataSource(DataSource dataSource) {
308  fetchInformation(dataSource);
309  }
310 
311  @Override
312  protected void fetchInformation(DataSource dataSource) {
313  fetchInformation(dataFetchComponents, dataSource);
314  }
315 
319  private interface Retriever<O> {
320 
329  O retrieve() throws TskCoreException, SleuthkitCaseProviderException, SQLException;
330  }
331 
339  private static <O> O retrieve(Retriever<O> retriever) {
340  try {
341  return retriever.retrieve();
342  } catch (TskCoreException | SleuthkitCaseProviderException | SQLException ex) {
343  logger.log(Level.WARNING, "Error while retrieving data.", ex);
344  return null;
345  }
346  }
347 
356  private static ContainerViewModel getContainerViewModel(ContainerSummary containerSummary, DataSource ds) {
357  if (ds == null) {
358  return null;
359  }
360 
361  return new ContainerViewModel(
362  ds.getName(),
363  ds.getName(),
364  ds.getDeviceId(),
365  retrieve(() -> ds.getAcquisitionDetails()),
366  ds instanceof Image ? getImageViewModel(containerSummary, (Image) ds) : null
367  );
368  }
369 
378  private static ImageViewModel getImageViewModel(ContainerSummary containerSummary, Image image) {
379  if (image == null) {
380  return null;
381  }
382 
383  Long unallocSize = retrieve(() -> containerSummary.getSizeOfUnallocatedFiles(image));
384  String imageType = image.getType().getName();
385  Long size = image.getSize();
386  Long sectorSize = image.getSsize();
387  String timeZone = image.getTimeZone();
388  List<String> paths = image.getPaths() == null ? Collections.emptyList() : Arrays.asList(image.getPaths());
389  String md5 = retrieve(() -> image.getMd5());
390  String sha1 = retrieve(() -> image.getSha1());
391  String sha256 = retrieve(() -> image.getSha256());
392 
393  return new ImageViewModel(unallocSize, size, sectorSize, timeZone, imageType, paths, md5, sha1, sha256);
394  }
395 
401  private void updateDetailsPanelData(ContainerViewModel viewModel) {
402  clearTableValues();
403  if (viewModel == null) {
404  return;
405  }
406 
407  displayNameValue.setText(viewModel.getDisplayName());
408  originalNameValue.setText(viewModel.getOriginalName());
409  deviceIdValue.setText(viewModel.getDeviceId());
410  acquisitionDetailsTextArea.setText(viewModel.getAcquisitionDetails());
411 
412  if (viewModel.getImageViewModel() != null) {
413  setFieldsForImage(viewModel.getImageViewModel());
414  } else {
415  setFieldsForNonImageDataSource();
416  }
417 
418  this.repaint();
419  }
420 
424  @Messages({
425  "ContainerPanel_setFieldsForNonImageDataSource_na=N/A"
426  })
427  private void setFieldsForNonImageDataSource() {
428  String NA = Bundle.ContainerPanel_setFieldsForNonImageDataSource_na();
429 
430  unallocatedSizeValue.setText(NA);
431  imageTypeValue.setText(NA);
432  sizeValue.setText(NA);
433  sectorSizeValue.setText(NA);
434  timeZoneValue.setText(NA);
435 
436  ((DefaultTableModel) filePathsTable.getModel()).addRow(new Object[]{NA});
437 
438  md5HashValue.setText(NA);
439  sha1HashValue.setText(NA);
440  sha256HashValue.setText(NA);
441  }
442 
448  private void setFieldsForImage(ImageViewModel viewModel) {
449  unallocatedSizeValue.setText(SizeRepresentationUtil.getSizeString(viewModel.getUnallocatedSize()));
450  imageTypeValue.setText(viewModel.getImageType());
451  sizeValue.setText(SizeRepresentationUtil.getSizeString(viewModel.getSize()));
452  sectorSizeValue.setText(SizeRepresentationUtil.getSizeString(viewModel.getSectorSize()));
453  timeZoneValue.setText(viewModel.getTimeZone());
454 
455  for (String path : viewModel.getPaths()) {
456  ((DefaultTableModel) filePathsTable.getModel()).addRow(new Object[]{path});
457  }
458 
459  md5HashValue.setText(viewModel.getMd5Hash());
460  sha1HashValue.setText(viewModel.getSha1Hash());
461  sha256HashValue.setText(viewModel.getSha256Hash());
462  }
463 
467  private void clearTableValues() {
468  displayNameValue.setText("");
469  originalNameValue.setText("");
470  deviceIdValue.setText("");
471  timeZoneValue.setText("");
472  acquisitionDetailsTextArea.setText("");
473  imageTypeValue.setText("");
474  sizeValue.setText("");
475  sectorSizeValue.setText("");
476  md5HashValue.setText("");
477  sha1HashValue.setText("");
478  sha256HashValue.setText("");
479  unallocatedSizeValue.setText("");
480  ((DefaultTableModel) filePathsTable.getModel()).setRowCount(0);
481  }
482 
491  private static List<? extends ExcelItemExportable> getAcquisitionDetails(String acquisitionDetails) {
492  if (StringUtils.isBlank(acquisitionDetails)) {
493  return Collections.emptyList();
494  } else {
495  return Stream.of(acquisitionDetails.split("\\r?\\n"))
496  .map((line) -> (StringUtils.isBlank(line)) ? null : new SingleCellExportable(line))
497  .filter(item -> item != null)
498  .collect(Collectors.toList());
499  }
500  }
501 
502  @Override
503  @Messages({
504  "ContainerPanel_export_displayName=Display Name:",
505  "ContainerPanel_export_originalName=Name:",
506  "ContainerPanel_export_deviceId=Device ID:",
507  "ContainerPanel_export_timeZone=Time Zone:",
508  "ContainerPanel_export_acquisitionDetails=Acquisition Details:",
509  "ContainerPanel_export_imageType=Image Type:",
510  "ContainerPanel_export_size=Size:",
511  "ContainerPanel_export_sectorSize=Sector Size:",
512  "ContainerPanel_export_md5=MD5:",
513  "ContainerPanel_export_sha1=SHA1:",
514  "ContainerPanel_export_sha256=SHA256:",
515  "ContainerPanel_export_unallocatedSize=Unallocated Space:",
516  "ContainerPanel_export_filePaths=File Paths:",})
517  protected List<ExcelSheetExport> getExports(DataSource ds) {
518  ContainerViewModel result = getFetchResult(containerDataFetcher, "Container sheets", ds);
519  if (ds == null || result == null) {
520  return Collections.emptyList();
521  }
522 
523  String NA = Bundle.ContainerPanel_setFieldsForNonImageDataSource_na();
524  DefaultCellModel<?> NACell = new DefaultCellModel<>(NA);
525 
526  ImageViewModel imageModel = result.getImageViewModel();
527  boolean hasImage = imageModel != null;
528 
529  DefaultCellModel<?> timeZone = hasImage ? new DefaultCellModel<>(imageModel.getTimeZone()) : NACell;
530  DefaultCellModel<?> imageType = hasImage ? new DefaultCellModel<>(imageModel.getImageType()) : NACell;
531  DefaultCellModel<?> size = hasImage ? SizeRepresentationUtil.getBytesCell(imageModel.getSize()) : NACell;
532  DefaultCellModel<?> sectorSize = hasImage ? SizeRepresentationUtil.getBytesCell(imageModel.getSectorSize()) : NACell;
533  DefaultCellModel<?> md5 = hasImage ? new DefaultCellModel<>(imageModel.getMd5Hash()) : NACell;
534  DefaultCellModel<?> sha1 = hasImage ? new DefaultCellModel<>(imageModel.getSha1Hash()) : NACell;
535  DefaultCellModel<?> sha256 = hasImage ? new DefaultCellModel<>(imageModel.getSha256Hash()) : NACell;
536  DefaultCellModel<?> unallocatedSize = hasImage ? SizeRepresentationUtil.getBytesCell(imageModel.getUnallocatedSize()) : NACell;
537  List<String> paths = result.getImageViewModel() == null ? Collections.singletonList(NA) : result.getImageViewModel().getPaths();
538  List<SingleCellExportable> cellPaths = paths.stream()
539  .map(SingleCellExportable::new)
540  .collect(Collectors.toList());
541 
542  return Arrays.asList(
543  new ExcelSpecialFormatExport(Bundle.ContainerPanel_tabName(), Arrays.asList(
544  new KeyValueItemExportable(Bundle.ContainerPanel_export_displayName(), new DefaultCellModel<>(result.getDisplayName())),
545  new KeyValueItemExportable(Bundle.ContainerPanel_export_originalName(), new DefaultCellModel<>(result.getOriginalName())),
546  new KeyValueItemExportable(Bundle.ContainerPanel_export_deviceId(), new DefaultCellModel<>(result.getDeviceId())),
547  new KeyValueItemExportable(Bundle.ContainerPanel_export_timeZone(), timeZone),
548  new TitledExportable(Bundle.ContainerPanel_export_acquisitionDetails(), getAcquisitionDetails(result.getAcquisitionDetails())),
549  new KeyValueItemExportable(Bundle.ContainerPanel_export_imageType(), imageType),
550  new KeyValueItemExportable(Bundle.ContainerPanel_export_size(), size),
551  new KeyValueItemExportable(Bundle.ContainerPanel_export_sectorSize(), sectorSize),
552  new KeyValueItemExportable(Bundle.ContainerPanel_export_md5(), md5),
553  new KeyValueItemExportable(Bundle.ContainerPanel_export_sha1(), sha1),
554  new KeyValueItemExportable(Bundle.ContainerPanel_export_sha256(), sha256),
555  new KeyValueItemExportable(Bundle.ContainerPanel_export_unallocatedSize(), unallocatedSize),
556  new TitledExportable(Bundle.ContainerPanel_export_filePaths(), cellPaths)
557  )));
558 
559  }
560 
566  @SuppressWarnings("unchecked")
567  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
568  private void initComponents() {
569  java.awt.GridBagConstraints gridBagConstraints;
570 
571  jScrollPane1 = new javax.swing.JScrollPane();
572  jPanel1 = new javax.swing.JPanel();
573  displayNameLabel = new javax.swing.JLabel();
574  originalNameLabel = new javax.swing.JLabel();
575  sha1HashValue = new javax.swing.JLabel();
576  displayNameValue = new javax.swing.JLabel();
577  sha256HashValue = new javax.swing.JLabel();
578  originalNameValue = new javax.swing.JLabel();
579  deviceIdValue = new javax.swing.JLabel();
580  filePathsScrollPane = new javax.swing.JScrollPane();
581  filePathsTable = new javax.swing.JTable();
582  timeZoneValue = new javax.swing.JLabel();
583  imageTypeValue = new javax.swing.JLabel();
584  md5HashValue = new javax.swing.JLabel();
585  sectorSizeValue = new javax.swing.JLabel();
586  sizeValue = new javax.swing.JLabel();
587  filePathsLabel = new javax.swing.JLabel();
588  sha256HashLabel = new javax.swing.JLabel();
589  sha1HashLabel = new javax.swing.JLabel();
590  md5HashLabel = new javax.swing.JLabel();
591  sectorSizeLabel = new javax.swing.JLabel();
592  sizeLabel = new javax.swing.JLabel();
593  imageTypeLabel = new javax.swing.JLabel();
594  acquisitionDetailsLabel = new javax.swing.JLabel();
595  timeZoneLabel = new javax.swing.JLabel();
596  deviceIdLabel = new javax.swing.JLabel();
597  acquisitionDetailsScrollPane = new javax.swing.JScrollPane();
598  acquisitionDetailsTextArea = new javax.swing.JTextArea();
599  filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
600  filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
601  unallocatedSizeLabel = new javax.swing.JLabel();
602  unallocatedSizeValue = new javax.swing.JLabel();
603 
604  jPanel1.setLayout(new java.awt.GridBagLayout());
605 
606  org.openide.awt.Mnemonics.setLocalizedText(displayNameLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.displayNameLabel.text")); // NOI18N
607  gridBagConstraints = new java.awt.GridBagConstraints();
608  gridBagConstraints.gridx = 0;
609  gridBagConstraints.gridy = 0;
610  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
611  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
612  gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 4);
613  jPanel1.add(displayNameLabel, gridBagConstraints);
614 
615  org.openide.awt.Mnemonics.setLocalizedText(originalNameLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.originalNameLabel.text")); // NOI18N
616  gridBagConstraints = new java.awt.GridBagConstraints();
617  gridBagConstraints.gridx = 0;
618  gridBagConstraints.gridy = 1;
619  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
620  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
621  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
622  jPanel1.add(originalNameLabel, gridBagConstraints);
623 
624  org.openide.awt.Mnemonics.setLocalizedText(sha1HashValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sha1HashValue.text")); // NOI18N
625  gridBagConstraints = new java.awt.GridBagConstraints();
626  gridBagConstraints.gridx = 1;
627  gridBagConstraints.gridy = 12;
628  gridBagConstraints.gridwidth = 4;
629  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
630  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
631  gridBagConstraints.weightx = 0.5;
632  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
633  jPanel1.add(sha1HashValue, gridBagConstraints);
634 
635  org.openide.awt.Mnemonics.setLocalizedText(displayNameValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.displayNameValue.text")); // NOI18N
636  gridBagConstraints = new java.awt.GridBagConstraints();
637  gridBagConstraints.gridx = 1;
638  gridBagConstraints.gridy = 0;
639  gridBagConstraints.gridwidth = 4;
640  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
641  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
642  gridBagConstraints.weightx = 0.5;
643  gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 10);
644  jPanel1.add(displayNameValue, gridBagConstraints);
645 
646  org.openide.awt.Mnemonics.setLocalizedText(sha256HashValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sha256HashValue.text")); // NOI18N
647  gridBagConstraints = new java.awt.GridBagConstraints();
648  gridBagConstraints.gridx = 1;
649  gridBagConstraints.gridy = 13;
650  gridBagConstraints.gridwidth = 4;
651  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
652  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
653  gridBagConstraints.weightx = 0.5;
654  gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 10);
655  jPanel1.add(sha256HashValue, gridBagConstraints);
656 
657  org.openide.awt.Mnemonics.setLocalizedText(originalNameValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.originalNameValue.text")); // NOI18N
658  gridBagConstraints = new java.awt.GridBagConstraints();
659  gridBagConstraints.gridx = 1;
660  gridBagConstraints.gridy = 1;
661  gridBagConstraints.gridwidth = 4;
662  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
663  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
664  gridBagConstraints.weightx = 0.5;
665  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
666  jPanel1.add(originalNameValue, gridBagConstraints);
667 
668  org.openide.awt.Mnemonics.setLocalizedText(deviceIdValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.deviceIdValue.text")); // NOI18N
669  deviceIdValue.setToolTipText(org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.deviceIdValue.toolTipText")); // NOI18N
670  gridBagConstraints = new java.awt.GridBagConstraints();
671  gridBagConstraints.gridx = 1;
672  gridBagConstraints.gridy = 2;
673  gridBagConstraints.gridwidth = 4;
674  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
675  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
676  gridBagConstraints.weightx = 0.5;
677  gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 10);
678  jPanel1.add(deviceIdValue, gridBagConstraints);
679 
680  filePathsScrollPane.setPreferredSize(new java.awt.Dimension(80, 50));
681 
682  filePathsTable.setModel(new javax.swing.table.DefaultTableModel(
683  new Object [][] {
684 
685  },
686  new String [] {
687  ""
688  }
689  ) {
690  boolean[] canEdit = new boolean [] {
691  false
692  };
693 
694  public boolean isCellEditable(int rowIndex, int columnIndex) {
695  return canEdit [columnIndex];
696  }
697  });
698  filePathsTable.setTableHeader(null);
699  filePathsScrollPane.setViewportView(filePathsTable);
700  if (filePathsTable.getColumnModel().getColumnCount() > 0) {
701  filePathsTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.filePathsTable.columnModel.title0")); // NOI18N
702  }
703 
704  gridBagConstraints = new java.awt.GridBagConstraints();
705  gridBagConstraints.gridx = 1;
706  gridBagConstraints.gridy = 14;
707  gridBagConstraints.gridwidth = 4;
708  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
709  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
710  gridBagConstraints.weightx = 0.5;
711  gridBagConstraints.weighty = 1.2;
712  gridBagConstraints.insets = new java.awt.Insets(6, 0, 10, 10);
713  jPanel1.add(filePathsScrollPane, gridBagConstraints);
714 
715  org.openide.awt.Mnemonics.setLocalizedText(timeZoneValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.timeZoneValue.text")); // NOI18N
716  gridBagConstraints = new java.awt.GridBagConstraints();
717  gridBagConstraints.gridx = 1;
718  gridBagConstraints.gridy = 5;
719  gridBagConstraints.gridwidth = 4;
720  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
721  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
722  gridBagConstraints.weightx = 0.5;
723  gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 10);
724  jPanel1.add(timeZoneValue, gridBagConstraints);
725 
726  org.openide.awt.Mnemonics.setLocalizedText(imageTypeValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.imageTypeValue.text")); // NOI18N
727  imageTypeValue.setToolTipText(org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.imageTypeValue.toolTipText")); // NOI18N
728  gridBagConstraints = new java.awt.GridBagConstraints();
729  gridBagConstraints.gridx = 1;
730  gridBagConstraints.gridy = 7;
731  gridBagConstraints.gridwidth = 4;
732  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
733  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
734  gridBagConstraints.weightx = 0.5;
735  gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 10);
736  jPanel1.add(imageTypeValue, gridBagConstraints);
737 
738  org.openide.awt.Mnemonics.setLocalizedText(md5HashValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.md5HashValue.text")); // NOI18N
739  md5HashValue.setToolTipText(org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.md5HashValue.toolTipText")); // NOI18N
740  gridBagConstraints = new java.awt.GridBagConstraints();
741  gridBagConstraints.gridx = 1;
742  gridBagConstraints.gridy = 11;
743  gridBagConstraints.gridwidth = 4;
744  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
745  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
746  gridBagConstraints.weightx = 0.5;
747  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
748  jPanel1.add(md5HashValue, gridBagConstraints);
749 
750  org.openide.awt.Mnemonics.setLocalizedText(sectorSizeValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sectorSizeValue.text")); // NOI18N
751  gridBagConstraints = new java.awt.GridBagConstraints();
752  gridBagConstraints.gridx = 1;
753  gridBagConstraints.gridy = 10;
754  gridBagConstraints.gridwidth = 4;
755  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
756  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
757  gridBagConstraints.weightx = 0.5;
758  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
759  jPanel1.add(sectorSizeValue, gridBagConstraints);
760 
761  org.openide.awt.Mnemonics.setLocalizedText(sizeValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sizeValue.text")); // NOI18N
762  gridBagConstraints = new java.awt.GridBagConstraints();
763  gridBagConstraints.gridx = 1;
764  gridBagConstraints.gridy = 8;
765  gridBagConstraints.gridwidth = 4;
766  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
767  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
768  gridBagConstraints.weightx = 0.5;
769  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
770  jPanel1.add(sizeValue, gridBagConstraints);
771 
772  org.openide.awt.Mnemonics.setLocalizedText(filePathsLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.filePathsLabel.text")); // NOI18N
773  gridBagConstraints = new java.awt.GridBagConstraints();
774  gridBagConstraints.gridx = 0;
775  gridBagConstraints.gridy = 14;
776  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
777  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
778  gridBagConstraints.weighty = 1.2;
779  gridBagConstraints.insets = new java.awt.Insets(6, 10, 10, 4);
780  jPanel1.add(filePathsLabel, gridBagConstraints);
781 
782  org.openide.awt.Mnemonics.setLocalizedText(sha256HashLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sha256HashLabel.text")); // NOI18N
783  gridBagConstraints = new java.awt.GridBagConstraints();
784  gridBagConstraints.gridx = 0;
785  gridBagConstraints.gridy = 13;
786  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
787  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
788  gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 4);
789  jPanel1.add(sha256HashLabel, gridBagConstraints);
790 
791  org.openide.awt.Mnemonics.setLocalizedText(sha1HashLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sha1HashLabel.text")); // NOI18N
792  gridBagConstraints = new java.awt.GridBagConstraints();
793  gridBagConstraints.gridx = 0;
794  gridBagConstraints.gridy = 12;
795  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
796  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
797  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
798  jPanel1.add(sha1HashLabel, gridBagConstraints);
799 
800  org.openide.awt.Mnemonics.setLocalizedText(md5HashLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.md5HashLabel.text")); // NOI18N
801  gridBagConstraints = new java.awt.GridBagConstraints();
802  gridBagConstraints.gridx = 0;
803  gridBagConstraints.gridy = 11;
804  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
805  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
806  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
807  jPanel1.add(md5HashLabel, gridBagConstraints);
808 
809  org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sectorSizeLabel.text")); // NOI18N
810  gridBagConstraints = new java.awt.GridBagConstraints();
811  gridBagConstraints.gridx = 0;
812  gridBagConstraints.gridy = 10;
813  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
814  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
815  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
816  jPanel1.add(sectorSizeLabel, gridBagConstraints);
817 
818  org.openide.awt.Mnemonics.setLocalizedText(sizeLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.sizeLabel.text")); // NOI18N
819  gridBagConstraints = new java.awt.GridBagConstraints();
820  gridBagConstraints.gridx = 0;
821  gridBagConstraints.gridy = 8;
822  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
823  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
824  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
825  jPanel1.add(sizeLabel, gridBagConstraints);
826 
827  org.openide.awt.Mnemonics.setLocalizedText(imageTypeLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.imageTypeLabel.text")); // NOI18N
828  gridBagConstraints = new java.awt.GridBagConstraints();
829  gridBagConstraints.gridx = 0;
830  gridBagConstraints.gridy = 7;
831  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
832  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
833  gridBagConstraints.insets = new java.awt.Insets(6, 10, 0, 4);
834  jPanel1.add(imageTypeLabel, gridBagConstraints);
835 
836  org.openide.awt.Mnemonics.setLocalizedText(acquisitionDetailsLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.acquisitionDetailsLabel.text")); // NOI18N
837  gridBagConstraints = new java.awt.GridBagConstraints();
838  gridBagConstraints.gridx = 0;
839  gridBagConstraints.gridy = 6;
840  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
841  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
842  gridBagConstraints.weighty = 0.6;
843  gridBagConstraints.insets = new java.awt.Insets(6, 10, 6, 4);
844  jPanel1.add(acquisitionDetailsLabel, gridBagConstraints);
845 
846  org.openide.awt.Mnemonics.setLocalizedText(timeZoneLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.timeZoneLabel.text")); // NOI18N
847  gridBagConstraints = new java.awt.GridBagConstraints();
848  gridBagConstraints.gridx = 0;
849  gridBagConstraints.gridy = 5;
850  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
851  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
852  gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 4);
853  jPanel1.add(timeZoneLabel, gridBagConstraints);
854 
855  org.openide.awt.Mnemonics.setLocalizedText(deviceIdLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.deviceIdLabel.text")); // NOI18N
856  gridBagConstraints = new java.awt.GridBagConstraints();
857  gridBagConstraints.gridx = 0;
858  gridBagConstraints.gridy = 2;
859  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
860  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
861  gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 4);
862  jPanel1.add(deviceIdLabel, gridBagConstraints);
863 
864  acquisitionDetailsTextArea.setEditable(false);
865  acquisitionDetailsTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("TextArea.disabledBackground"));
866  acquisitionDetailsTextArea.setColumns(20);
867  acquisitionDetailsTextArea.setRows(4);
868  acquisitionDetailsTextArea.setText(org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.acquisitionDetailsTextArea.text")); // NOI18N
869  acquisitionDetailsTextArea.setBorder(null);
870  acquisitionDetailsScrollPane.setViewportView(acquisitionDetailsTextArea);
871 
872  gridBagConstraints = new java.awt.GridBagConstraints();
873  gridBagConstraints.gridx = 1;
874  gridBagConstraints.gridy = 6;
875  gridBagConstraints.gridwidth = 4;
876  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
877  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
878  gridBagConstraints.weightx = 0.5;
879  gridBagConstraints.weighty = 0.6;
880  gridBagConstraints.insets = new java.awt.Insets(6, 0, 6, 10);
881  jPanel1.add(acquisitionDetailsScrollPane, gridBagConstraints);
882  gridBagConstraints = new java.awt.GridBagConstraints();
883  gridBagConstraints.gridx = 0;
884  gridBagConstraints.gridy = 15;
885  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
886  gridBagConstraints.weighty = 0.1;
887  jPanel1.add(filler1, gridBagConstraints);
888  gridBagConstraints = new java.awt.GridBagConstraints();
889  gridBagConstraints.gridx = 1;
890  gridBagConstraints.gridy = 15;
891  gridBagConstraints.gridwidth = 4;
892  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
893  gridBagConstraints.weighty = 0.1;
894  jPanel1.add(filler2, gridBagConstraints);
895 
896  org.openide.awt.Mnemonics.setLocalizedText(unallocatedSizeLabel, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.unallocatedSizeLabel.text")); // NOI18N
897  gridBagConstraints = new java.awt.GridBagConstraints();
898  gridBagConstraints.gridx = 0;
899  gridBagConstraints.gridy = 9;
900  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
901  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
902  gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
903  jPanel1.add(unallocatedSizeLabel, gridBagConstraints);
904 
905  org.openide.awt.Mnemonics.setLocalizedText(unallocatedSizeValue, org.openide.util.NbBundle.getMessage(ContainerPanel.class, "ContainerPanel.unallocatedSizeValue.text")); // NOI18N
906  gridBagConstraints = new java.awt.GridBagConstraints();
907  gridBagConstraints.gridx = 1;
908  gridBagConstraints.gridy = 9;
909  gridBagConstraints.gridwidth = 4;
910  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
911  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
912  gridBagConstraints.weightx = 0.5;
913  gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
914  jPanel1.add(unallocatedSizeValue, gridBagConstraints);
915 
916  jScrollPane1.setViewportView(jPanel1);
917 
918  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
919  this.setLayout(layout);
920  layout.setHorizontalGroup(
921  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
922  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
923  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
924  .addGap(0, 0, 0))
925  );
926  layout.setVerticalGroup(
927  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
928  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
929  );
930  }// </editor-fold>//GEN-END:initComponents
931 
932 
933  // Variables declaration - do not modify//GEN-BEGIN:variables
934  private javax.swing.JLabel acquisitionDetailsLabel;
935  private javax.swing.JScrollPane acquisitionDetailsScrollPane;
936  private javax.swing.JTextArea acquisitionDetailsTextArea;
937  private javax.swing.JLabel deviceIdLabel;
938  private javax.swing.JLabel deviceIdValue;
939  private javax.swing.JLabel displayNameLabel;
940  private javax.swing.JLabel displayNameValue;
941  private javax.swing.JLabel filePathsLabel;
942  private javax.swing.JScrollPane filePathsScrollPane;
943  private javax.swing.JTable filePathsTable;
944  private javax.swing.Box.Filler filler1;
945  private javax.swing.Box.Filler filler2;
946  private javax.swing.JLabel imageTypeLabel;
947  private javax.swing.JLabel imageTypeValue;
948  private javax.swing.JPanel jPanel1;
949  private javax.swing.JScrollPane jScrollPane1;
950  private javax.swing.JLabel md5HashLabel;
951  private javax.swing.JLabel md5HashValue;
952  private javax.swing.JLabel originalNameLabel;
953  private javax.swing.JLabel originalNameValue;
954  private javax.swing.JLabel sectorSizeLabel;
955  private javax.swing.JLabel sectorSizeValue;
956  private javax.swing.JLabel sha1HashLabel;
957  private javax.swing.JLabel sha1HashValue;
958  private javax.swing.JLabel sha256HashLabel;
959  private javax.swing.JLabel sha256HashValue;
960  private javax.swing.JLabel sizeLabel;
961  private javax.swing.JLabel sizeValue;
962  private javax.swing.JLabel timeZoneLabel;
963  private javax.swing.JLabel timeZoneValue;
964  private javax.swing.JLabel unallocatedSizeLabel;
965  private javax.swing.JLabel unallocatedSizeValue;
966  // End of variables declaration//GEN-END:variables
967 }

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.