mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
4621 4655 move unallocated space to details panel
This commit is contained in:
parent
691abe6ddc
commit
ae5d2247af
@ -5,9 +5,9 @@ DataSourceSummaryDetailsPanel.deviceIdLabel.text=Device ID:
|
||||
DataSourceSummaryDetailsPanel.operatingSystemLabel.text=OS:
|
||||
DataSourceSummaryDetailsPanel.dataSourceUsageLabel.text=Usage:
|
||||
DataSourceSummaryDetailsPanel.timeZoneLabel.text=Time Zone:
|
||||
DataSourceSummaryDetailsPanel.imageTypeLabel.text=Image Type
|
||||
DataSourceSummaryDetailsPanel.sizeLabel.text=Size
|
||||
DataSourceSummaryDetailsPanel.sectorSizeLabel.text=Sector Size
|
||||
DataSourceSummaryDetailsPanel.imageTypeLabel.text=Image Type:
|
||||
DataSourceSummaryDetailsPanel.sizeLabel.text=Size:
|
||||
DataSourceSummaryDetailsPanel.sectorSizeLabel.text=Sector Size:
|
||||
DataSourceSummaryDetailsPanel.md5HashLabel.text=MD5:
|
||||
DataSourceSummaryDetailsPanel.sha1HashLabel.text=SHA1:
|
||||
DataSourceSummaryDetailsPanel.sha256HashLabel.text=SHA256:
|
||||
@ -33,5 +33,5 @@ DataSourceSummaryDetailsPanel.acquisitionDetailsTextArea.text=
|
||||
DataSourceSummaryDetailsPanel.acquisitionDetailsLabel.text=Acquisition Details:
|
||||
DataSourceSummaryFilesPanel.byCategoryLabel.text=By Category
|
||||
DataSourceSummaryFilesPanel.byMimeTypeLabel.text=By MIME Type
|
||||
DataSourceSummaryFilesPanel.unallocatedSpaceLabel.text=Unallocated Space:
|
||||
DataSourceSummaryFilesPanel.unallocatedSpaceValue.text=
|
||||
DataSourceSummaryDetailsPanel.unallocatedSizeLabel.text=Unallocated Space:
|
||||
DataSourceSummaryDetailsPanel.unallocatedSizeValue.text=
|
||||
|
@ -81,7 +81,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="11" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="12" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -120,7 +120,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="12" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="6" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="13" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="6" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -162,7 +162,7 @@
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="13" gridWidth="4" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="0" insetsBottom="10" insetsRight="10" anchor="23" weightX="0.5" weightY="1.2"/>
|
||||
<GridBagConstraints gridX="1" gridY="14" gridWidth="4" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="0" insetsBottom="10" insetsRight="10" anchor="23" weightX="0.5" weightY="1.2"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="10" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="11" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -255,7 +255,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="9" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="10" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -279,7 +279,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="13" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="10" insetsBottom="10" insetsRight="4" anchor="23" weightX="0.0" weightY="1.2"/>
|
||||
<GridBagConstraints gridX="0" gridY="14" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="10" insetsBottom="10" insetsRight="4" anchor="23" weightX="0.0" weightY="1.2"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -291,7 +291,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="6" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="13" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="6" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -303,7 +303,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -315,7 +315,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -327,7 +327,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -447,7 +447,7 @@
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="14" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.1"/>
|
||||
<GridBagConstraints gridX="0" gridY="15" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -462,7 +462,31 @@
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="14" gridWidth="4" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.1"/>
|
||||
<GridBagConstraints gridX="1" gridY="15" gridWidth="4" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="unallocatedSizeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties" key="DataSourceSummaryDetailsPanel.unallocatedSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="0" insetsRight="4" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="unallocatedSizeValue">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties" key="DataSourceSummaryDetailsPanel.unallocatedSizeValue.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="9" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="10" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
@ -37,6 +37,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
//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
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Map<Long, String> osDetailMap = new HashMap<>();
|
||||
private final Map<Long, Long> unallocatedFilesSizeMap;
|
||||
final Map<Long, String> usageMap;
|
||||
private static final Logger logger = Logger.getLogger(DataSourceSummaryDetailsPanel.class.getName());
|
||||
|
||||
@ -48,6 +49,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
public DataSourceSummaryDetailsPanel(Map<Long, String> usageMap) {
|
||||
initComponents();
|
||||
this.usageMap = usageMap;
|
||||
this.unallocatedFilesSizeMap = DataSourceInfoUtilities.getSizeOfUnallocatedFiles();
|
||||
osDetailMap = DataSourceInfoUtilities.getOperatingSystems();
|
||||
}
|
||||
|
||||
@ -107,6 +109,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
acquisitionDetailsTextArea.setText(acquisitionDetailsString);
|
||||
imageTypeValue.setText(imageTypeString);
|
||||
sizeValue.setText(sizeString);
|
||||
unallocatedSizeValue.setText(getSizeOfUnallocatedSpaceText(selectedDataSource));
|
||||
sectorSizeValue.setText(sectorSizeString);
|
||||
md5HashValue.setText(md5String);
|
||||
sha1HashValue.setText(sha1String);
|
||||
@ -119,6 +122,14 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
private String getSizeOfUnallocatedSpaceText(DataSource selectedDataSource) {
|
||||
Long sizeOfUnallocatedSpace = 0L;
|
||||
if (unallocatedFilesSizeMap.get(selectedDataSource.getId()) != null) {
|
||||
sizeOfUnallocatedSpace = unallocatedFilesSizeMap.get(selectedDataSource.getId());
|
||||
}
|
||||
return String.valueOf(sizeOfUnallocatedSpace) + Bundle.DataSourceSummaryDetailsPanel_units_bytes();
|
||||
}
|
||||
|
||||
private void updateFieldVisibility() {
|
||||
displayNameValue.setVisible(!displayNameValue.getText().isEmpty());
|
||||
displayNameLabel.setVisible(!displayNameValue.getText().isEmpty());
|
||||
@ -149,6 +160,8 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
sha256HashLabel.setVisible(!sha256HashValue.getText().isEmpty());
|
||||
filePathsTable.setVisible(filePathsTable.getRowCount() > 0);
|
||||
filePathsLabel.setVisible(filePathsTable.getRowCount() > 0);
|
||||
unallocatedSizeValue.setVisible(unallocatedSizeValue.getText().isEmpty());
|
||||
unallocatedSizeLabel.setVisible(unallocatedSizeValue.getText().isEmpty());
|
||||
filePathsScrollPane.setVisible(filePathsTable.getRowCount() > 0);
|
||||
}
|
||||
|
||||
@ -166,6 +179,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
md5HashValue.setText("");
|
||||
sha1HashValue.setText("");
|
||||
sha256HashValue.setText("");
|
||||
unallocatedSizeValue.setText("");
|
||||
((DefaultTableModel) filePathsTable.getModel()).setRowCount(0);
|
||||
}
|
||||
|
||||
@ -213,6 +227,8 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
acquisitionDetailsTextArea = new javax.swing.JTextArea();
|
||||
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
unallocatedSizeLabel = new javax.swing.JLabel();
|
||||
unallocatedSizeValue = new javax.swing.JLabel();
|
||||
|
||||
jPanel1.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
@ -246,7 +262,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha1HashValue, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sha1HashValue.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -280,7 +296,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha256HashValue, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sha256HashValue.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -337,7 +353,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -384,7 +400,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
md5HashValue.setToolTipText(org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.md5HashValue.toolTipText")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 10;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -395,7 +411,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sectorSizeValue, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sectorSizeValue.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 9;
|
||||
gridBagConstraints.gridy = 10;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -417,7 +433,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(filePathsLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.filePathsLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.weighty = 1.2;
|
||||
@ -427,7 +443,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha256HashLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sha256HashLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 4);
|
||||
@ -436,7 +452,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha1HashLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sha1HashLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
|
||||
@ -445,7 +461,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(md5HashLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.md5HashLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 10;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
|
||||
@ -454,7 +470,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.sectorSizeLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 9;
|
||||
gridBagConstraints.gridy = 10;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
|
||||
@ -536,18 +552,38 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
jPanel1.add(acquisitionDetailsScrollPane, gridBagConstraints);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.gridy = 15;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weighty = 0.1;
|
||||
jPanel1.add(filler1, gridBagConstraints);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.gridy = 15;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weighty = 0.1;
|
||||
jPanel1.add(filler2, gridBagConstraints);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(unallocatedSizeLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.unallocatedSizeLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 9;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 4);
|
||||
jPanel1.add(unallocatedSizeLabel, gridBagConstraints);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(unallocatedSizeValue, org.openide.util.NbBundle.getMessage(DataSourceSummaryDetailsPanel.class, "DataSourceSummaryDetailsPanel.unallocatedSizeValue.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 9;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.weightx = 0.5;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
|
||||
jPanel1.add(unallocatedSizeValue, gridBagConstraints);
|
||||
|
||||
jScrollPane1.setViewportView(jPanel1);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
@ -600,5 +636,7 @@ public class DataSourceSummaryDetailsPanel extends javax.swing.JPanel {
|
||||
private javax.swing.JLabel sizeValue;
|
||||
private javax.swing.JLabel timeZoneLabel;
|
||||
private javax.swing.JLabel timeZoneValue;
|
||||
private javax.swing.JLabel unallocatedSizeLabel;
|
||||
private javax.swing.JLabel unallocatedSizeValue;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
@ -18,13 +18,6 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="unallocatedSpaceLabel" min="-2" pref="107" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="unallocatedSpaceValue" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="fileCountsByMimeTypeScrollPane" linkSize="1" pref="140" max="32767" attributes="0"/>
|
||||
<Component id="byMimeTypeLabel" max="32767" attributes="0"/>
|
||||
@ -34,8 +27,6 @@
|
||||
<Component id="fileCountsByCategoryScrollPane" linkSize="1" min="-2" pref="82" max="-2" attributes="0"/>
|
||||
<Component id="byCategoryLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="248" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -55,12 +46,7 @@
|
||||
<Component id="fileCountsByMimeTypeScrollPane" linkSize="2" min="-2" pref="107" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="unallocatedSpaceLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="unallocatedSpaceValue" alignment="3" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="28" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="48" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -112,19 +98,5 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="unallocatedSpaceLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties" key="DataSourceSummaryFilesPanel.unallocatedSpaceLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="unallocatedSpaceValue">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties" key="DataSourceSummaryFilesPanel.unallocatedSpaceValue.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -43,7 +43,6 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
private final Map<Long, Long> slackFilesCountsMap;
|
||||
private final Map<Long, Long> directoriesCountsMap;
|
||||
private final Map<Long, Long> unallocatedFilesCountsMap;
|
||||
private final Map<Long, Long> unallocatedFilesSizeMap;
|
||||
private final DefaultTableCellRenderer rightAlignedRenderer = new DefaultTableCellRenderer();
|
||||
|
||||
/**
|
||||
@ -54,7 +53,6 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
this.slackFilesCountsMap = DataSourceInfoUtilities.getCountsOfSlackFiles();
|
||||
this.directoriesCountsMap = DataSourceInfoUtilities.getCountsOfDirectories();
|
||||
this.unallocatedFilesCountsMap = DataSourceInfoUtilities.getCountsOfUnallocatedFiles();
|
||||
this.unallocatedFilesSizeMap = DataSourceInfoUtilities.getSizeOfUnallocatedFiles();
|
||||
rightAlignedRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
initComponents();
|
||||
fileCountsByMimeTypeTable.getTableHeader().setReorderingAllowed(false);
|
||||
@ -73,23 +71,9 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
filesByCategoryTableModel = new FilesByCategoryTableModel(selectedDataSource);
|
||||
fileCountsByCategoryTable.setModel(filesByCategoryTableModel);
|
||||
fileCountsByCategoryTable.getColumnModel().getColumn(1).setCellRenderer(rightAlignedRenderer);
|
||||
unallocatedSpaceValue.setText(getSizeOfUnallocatedSpaceText(selectedDataSource));
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"DataSourceSummaryFilesPanel.units.bytes= bytes"
|
||||
})
|
||||
private String getSizeOfUnallocatedSpaceText(DataSource selectedDataSource) {
|
||||
Long sizeOfUnallocatedSpace = 0L;
|
||||
if (selectedDataSource == null) {
|
||||
return "";
|
||||
} else if (unallocatedFilesSizeMap.get(selectedDataSource.getId()) != null) {
|
||||
sizeOfUnallocatedSpace = unallocatedFilesSizeMap.get(selectedDataSource.getId());
|
||||
}
|
||||
return String.valueOf(sizeOfUnallocatedSpace) + Bundle.DataSourceSummaryDetailsPanel_units_bytes();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@ -105,8 +89,6 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
fileCountsByCategoryScrollPane = new javax.swing.JScrollPane();
|
||||
fileCountsByCategoryTable = new javax.swing.JTable();
|
||||
byCategoryLabel = new javax.swing.JLabel();
|
||||
unallocatedSpaceLabel = new javax.swing.JLabel();
|
||||
unallocatedSpaceValue = new javax.swing.JLabel();
|
||||
|
||||
fileCountsByMimeTypeTable.setModel(filesByMimeTypeTableModel);
|
||||
fileCountsByMimeTypeScrollPane.setViewportView(fileCountsByMimeTypeTable);
|
||||
@ -118,29 +100,19 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(byCategoryLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryFilesPanel.class, "DataSourceSummaryFilesPanel.byCategoryLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(unallocatedSpaceLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryFilesPanel.class, "DataSourceSummaryFilesPanel.unallocatedSpaceLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(unallocatedSpaceValue, org.openide.util.NbBundle.getMessage(DataSourceSummaryFilesPanel.class, "DataSourceSummaryFilesPanel.unallocatedSpaceValue.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(unallocatedSpaceLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(unallocatedSpaceValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(fileCountsByMimeTypeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
|
||||
.addComponent(byMimeTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(fileCountsByCategoryScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(byCategoryLabel))))
|
||||
.addComponent(byCategoryLabel))
|
||||
.addContainerGap(248, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
@ -158,11 +130,7 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
.addComponent(byCategoryLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(fileCountsByMimeTypeScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(unallocatedSpaceLabel)
|
||||
.addComponent(unallocatedSpaceValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(28, Short.MAX_VALUE))
|
||||
.addContainerGap(48, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {fileCountsByCategoryScrollPane, fileCountsByMimeTypeScrollPane});
|
||||
@ -177,8 +145,6 @@ public class DataSourceSummaryFilesPanel extends javax.swing.JPanel {
|
||||
private javax.swing.JTable fileCountsByCategoryTable;
|
||||
private javax.swing.JScrollPane fileCountsByMimeTypeScrollPane;
|
||||
private javax.swing.JTable fileCountsByMimeTypeTable;
|
||||
private javax.swing.JLabel unallocatedSpaceLabel;
|
||||
private javax.swing.JLabel unallocatedSpaceValue;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user