mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-03 06:25:58 +00:00
Adjusted look of hash components; allowed disabling.
This commit is contained in:
@@ -239,3 +239,5 @@ ImageFilePanel.sha256HashTextField.text=
|
||||
ImageFilePanel.sha1HashTextField.text=
|
||||
ImageFilePanel.md5HashTextField.text=
|
||||
ImageFilePanel.errorLabel.text=Error Label
|
||||
ImageFilePanel.hashValuesNoteLabel.text=NOTE: These values will not be validated when the data source is added.
|
||||
ImageFilePanel.hashValuesLabel.text=Hash Values (optional):
|
||||
|
||||
@@ -32,29 +32,49 @@
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="sha256HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sha1HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="md5HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pathLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" alignment="0" min="-2" pref="262" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="sha256HashTextField" pref="455" max="32767" attributes="0"/>
|
||||
<Component id="sha1HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="md5HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="330" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pathLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" alignment="0" min="-2" pref="262" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="sha256HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sha1HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="md5HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="sha256HashTextField" pref="455" max="32767" attributes="0"/>
|
||||
<Component id="sha1HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="md5HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="275" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="sectorSizeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="sectorSizeComboBox" alignment="0" pref="455" max="32767" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="hashValuesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashValuesNoteLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="325" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -79,6 +99,10 @@
|
||||
<Component id="sectorSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
|
||||
<Component id="hashValuesLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="hashValuesNoteLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="md5HashTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -96,7 +120,7 @@
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="23" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="58" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -223,5 +247,19 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashValuesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.hashValuesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashValuesNoteLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.hashValuesNoteLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -156,6 +156,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
md5HashTextField = new javax.swing.JTextField();
|
||||
sha1HashLabel = new javax.swing.JLabel();
|
||||
md5HashLabel = new javax.swing.JLabel();
|
||||
hashValuesLabel = new javax.swing.JLabel();
|
||||
hashValuesNoteLabel = new javax.swing.JLabel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 65));
|
||||
setPreferredSize(new java.awt.Dimension(403, 65));
|
||||
@@ -195,6 +197,10 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(md5HashLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.md5HashLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashValuesLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.hashValuesLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashValuesNoteLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.hashValuesNoteLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@@ -206,25 +212,37 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGap(2, 2, 2))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(sha256HashLabel)
|
||||
.addComponent(sha1HashLabel)
|
||||
.addComponent(md5HashLabel)
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addComponent(timeZoneLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(sha256HashTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
|
||||
.addComponent(sha1HashTextField)
|
||||
.addComponent(md5HashTextField)
|
||||
.addComponent(sectorSizeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pathLabel)
|
||||
.addComponent(noFatOrphansCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 330, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pathLabel)
|
||||
.addComponent(errorLabel)
|
||||
.addComponent(noFatOrphansCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 325, Short.MAX_VALUE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(sha256HashLabel)
|
||||
.addComponent(sha1HashLabel)
|
||||
.addComponent(md5HashLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(sha256HashTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
|
||||
.addComponent(sha1HashTextField)
|
||||
.addComponent(md5HashTextField)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(errorLabel)
|
||||
.addGap(275, 275, 275)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addComponent(timeZoneLabel))
|
||||
.addGap(26, 26, 26)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(sectorSizeComboBox, 0, 455, Short.MAX_VALUE)
|
||||
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addComponent(hashValuesLabel)
|
||||
.addComponent(hashValuesNoteLabel))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -244,6 +262,10 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(sectorSizeLabel))
|
||||
.addGap(40, 40, 40)
|
||||
.addComponent(hashValuesLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(hashValuesNoteLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(md5HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -258,7 +280,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addComponent(sha256HashLabel))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(errorLabel)
|
||||
.addContainerGap(23, Short.MAX_VALUE))
|
||||
.addGap(58, 58, 58))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@@ -286,6 +308,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setContentPath(path);
|
||||
}
|
||||
|
||||
@@ -295,6 +318,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton browseButton;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JLabel hashValuesLabel;
|
||||
private javax.swing.JLabel hashValuesNoteLabel;
|
||||
private javax.swing.JLabel md5HashLabel;
|
||||
private javax.swing.JTextField md5HashTextField;
|
||||
private javax.swing.JCheckBox noFatOrphansCheckbox;
|
||||
@@ -310,6 +335,25 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
private javax.swing.JLabel timeZoneLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Enable or disable all of the hash values components.
|
||||
*
|
||||
* @param enabled Enable components if true; otherwise disable.
|
||||
*/
|
||||
private void setHashValuesComponentsEnabled(boolean enabled) {
|
||||
hashValuesLabel.setEnabled(enabled);
|
||||
hashValuesNoteLabel.setEnabled(enabled);
|
||||
|
||||
md5HashLabel.setEnabled(enabled);
|
||||
md5HashTextField.setEnabled(enabled);
|
||||
|
||||
sha1HashLabel.setEnabled(enabled);
|
||||
sha1HashTextField.setEnabled(enabled);
|
||||
|
||||
sha256HashLabel.setEnabled(enabled);
|
||||
sha256HashTextField.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path of the user selected image.
|
||||
*
|
||||
@@ -453,6 +497,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
"ImageFilePanel.moduleErr.msg=A module caused an error listening to ImageFilePanel updates."
|
||||
+ " See log to determine which module. Some data could be incomplete.\n"})
|
||||
private void updateHelper() {
|
||||
setHashValuesComponentsEnabled(pathTextField.getText().toLowerCase().endsWith(".e01") == false);
|
||||
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user