mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
updates
This commit is contained in:
parent
3689e89937
commit
9101f481f8
@ -272,3 +272,4 @@ LocalFilesPanel.timeStampToIncludeLabel.text=Timestamps To Include:
|
||||
LocalFilesPanel.timeStampNoteLabel.text=NOTE: Time stamps may have changed when the files were copied to the current location.
|
||||
ImageFilePanel.passwordLabel.text=Bitlocker Password (optional):
|
||||
ImageFilePanel.passwordTextField.text=
|
||||
ImageFilePanel.loadingLabel.text=loading...
|
||||
|
@ -510,3 +510,4 @@ LocalFilesPanel.timeStampToIncludeLabel.text=Timestamps To Include:
|
||||
LocalFilesPanel.timeStampNoteLabel.text=NOTE: Time stamps may have changed when the files were copied to the current location.
|
||||
ImageFilePanel.passwordLabel.text=Bitlocker Password (optional):
|
||||
ImageFilePanel.passwordTextField.text=
|
||||
ImageFilePanel.loadingLabel.text=loading...
|
||||
|
@ -310,5 +310,30 @@
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="loadingLabel">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/working_spinner.gif"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.loadingLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[500, 60]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 20]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 60]"/>
|
||||
</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="11" gridWidth="3" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -64,7 +64,7 @@ public class ImageFilePanel extends JPanel {
|
||||
private final String contextName;
|
||||
private final List<FileFilter> fileChooserFilters;
|
||||
|
||||
private static int VALIDATE_TIMEOUT_MILLIS = 1500;
|
||||
private static int VALIDATE_TIMEOUT_MILLIS = 1200;
|
||||
static ScheduledThreadPoolExecutor delayedValidationService = new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat("ImageFilePanel delayed validation").build());
|
||||
|
||||
private Future<Void> validateAction = null;
|
||||
@ -91,6 +91,7 @@ public class ImageFilePanel extends JPanel {
|
||||
sectorSizeComboBox.setSelectedIndex(0);
|
||||
|
||||
errorLabel.setVisible(false);
|
||||
loadingLabel.setVisible(false);
|
||||
this.fileChooserFilters = fileChooserFilters;
|
||||
}
|
||||
|
||||
@ -198,6 +199,7 @@ public class ImageFilePanel extends JPanel {
|
||||
passwordLabel = new javax.swing.JLabel();
|
||||
passwordTextField = new javax.swing.JTextField();
|
||||
javax.swing.JPanel spacer = new javax.swing.JPanel();
|
||||
loadingLabel = new javax.swing.JLabel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 65));
|
||||
setPreferredSize(new java.awt.Dimension(403, 65));
|
||||
@ -425,6 +427,22 @@ public class ImageFilePanel extends JPanel {
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(spacer, gridBagConstraints);
|
||||
|
||||
loadingLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/working_spinner.gif"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(loadingLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.loadingLabel.text")); // NOI18N
|
||||
loadingLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
loadingLabel.setMaximumSize(new java.awt.Dimension(500, 60));
|
||||
loadingLabel.setMinimumSize(new java.awt.Dimension(200, 20));
|
||||
loadingLabel.setPreferredSize(new java.awt.Dimension(200, 60));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridwidth = 3;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
add(loadingLabel, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@NbBundle.Messages({"ImageFilePanel.000.confirmationMessage=The selected file"
|
||||
@ -474,6 +492,7 @@ public class ImageFilePanel extends JPanel {
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JLabel hashValuesLabel;
|
||||
private javax.swing.JLabel hashValuesNoteLabel;
|
||||
private javax.swing.JLabel loadingLabel;
|
||||
private javax.swing.JLabel md5HashLabel;
|
||||
private javax.swing.JTextField md5HashTextField;
|
||||
private javax.swing.JCheckBox noFatOrphansCheckbox;
|
||||
@ -593,10 +612,9 @@ public class ImageFilePanel extends JPanel {
|
||||
"ImageFilePanel_validatePanel_unknownError=<html><body><p>An unknown error occurred while attempting to validate the image</p></body></html>"
|
||||
})
|
||||
public boolean validatePanel() {
|
||||
errorLabel.setVisible(false);
|
||||
|
||||
String path = getContentPaths();
|
||||
if (!isImagePathValid()) {
|
||||
showError(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -635,16 +653,18 @@ public class ImageFilePanel extends JPanel {
|
||||
return false;
|
||||
}
|
||||
|
||||
showError(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show an error message if error message is non-empty. Otherwise, hide
|
||||
* error message.
|
||||
* error message. Either way, hide loading label.
|
||||
*
|
||||
* @param errorMessage The error message to show.
|
||||
* @param errorMessage The error message to show or null for no error.
|
||||
*/
|
||||
private void showError(String errorMessage) {
|
||||
loadingLabel.setVisible(false);
|
||||
if (StringUtils.isNotBlank(errorMessage)) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(errorMessage);
|
||||
@ -730,6 +750,11 @@ public class ImageFilePanel extends JPanel {
|
||||
if (ImageFilePanel.this.validateAction != null) {
|
||||
ImageFilePanel.this.validateAction.cancel(true);
|
||||
}
|
||||
|
||||
errorLabel.setVisible(false);
|
||||
if (!ImageFilePanel.this.loadingLabel.isVisible()) {
|
||||
ImageFilePanel.this.loadingLabel.setVisible(true);
|
||||
}
|
||||
|
||||
ImageFilePanel.this.validateAction = ImageFilePanel.this.delayedValidationService.schedule(
|
||||
() -> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user