Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.ImageFilePanel Class Reference

Inherits JPanel.

Classes

class  DelayedValidationDocListener
 

Public Member Functions

String getContentPaths ()
 
boolean getNoFatOrphans ()
 
int getSectorSize ()
 
String getTimeZone ()
 
boolean isValidationLoading ()
 
void readSettings ()
 
void reset ()
 
void select ()
 
void setContentPath (String s)
 
void storeSettings ()
 
boolean validatePanel ()
 

Static Public Member Functions

static synchronized ImageFilePanel createInstance (String context, List< FileFilter > fileChooserFilters)
 

Private Member Functions

 ImageFilePanel (String context, List< FileFilter > fileChooserFilters)
 
void browseButtonActionPerformed (java.awt.event.ActionEvent evt)
 
void createTimeZoneList ()
 
JFileChooser getChooser ()
 
JTextField getMd5TextFieldField ()
 
JTextField getPasswordTextField ()
 
JTextField getPathTextField ()
 
JTextField getSha1TextField ()
 
JTextField getSha256TextField ()
 
void initComponents ()
 
boolean isImagePathValid (String path)
 
boolean isValidNonE01 (String path)
 
void setHashValuesComponentsEnabled (boolean enabled)
 
void setUIEnabled (boolean enabled, boolean validNonE01)
 
void showError (String errorMessage)
 
void updateHelper ()
 

Private Attributes

javax.swing.JButton browseButton
 
final String contextName
 
javax.swing.JLabel errorLabel
 
JFileChooser fileChooser
 
final List< FileFilter > fileChooserFilters
 
final JFileChooserFactory fileChooserHelper = new JFileChooserFactory()
 
javax.swing.JLabel hashValuesLabel
 
javax.swing.JLabel hashValuesNoteLabel
 
javax.swing.JLabel loadingLabel
 
javax.swing.JLabel md5HashLabel
 
javax.swing.JTextField md5HashTextField
 
javax.swing.JCheckBox noFatOrphansCheckbox
 
javax.swing.JLabel passwordLabel
 
javax.swing.JTextField passwordTextField
 
javax.swing.JLabel pathLabel
 
javax.swing.JTextField pathTextField
 
javax.swing.JComboBox< String > sectorSizeComboBox
 
javax.swing.JLabel sectorSizeLabel
 
javax.swing.JLabel sha1HashLabel
 
javax.swing.JTextField sha1HashTextField
 
javax.swing.JLabel sha256HashLabel
 
javax.swing.JTextField sha256HashTextField
 
javax.swing.JComboBox< String > timeZoneComboBox
 
javax.swing.JLabel timeZoneLabel
 
Runnable validateAction = null
 
Future<?> validateFuture = null
 
final ReentrantLock validationLock = new ReentrantLock()
 
final ReentrantLock validationWaitingLock = new ReentrantLock()
 

Static Private Attributes

static final Logger logger = Logger.getLogger(AddImageTask.class.getName())
 
static final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"
 
static final String[] SECTOR_SIZE_CHOICES = {"Auto Detect", "512", "1024", "2048", "4096"}
 
static final long serialVersionUID = 1L
 
static int VALIDATE_TIMEOUT_MILLIS = 1000
 

Detailed Description

Panel for adding an image file such as .img, .E0x, .00x, etc. Allows the user to select a file as well as choose the timezone and whether to ignore orphan files in FAT32.

Definition at line 57 of file ImageFilePanel.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.ImageFilePanel.ImageFilePanel ( String  context,
List< FileFilter >  fileChooserFilters 
)
private

Creates new form ImageFilePanel

Parameters
contextA string context name used to read/store last used settings.
fileChooserFiltersA list of filters to be used with the FileChooser.

Definition at line 86 of file ImageFilePanel.java.

Member Function Documentation

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.browseButtonActionPerformed ( java.awt.event.ActionEvent  evt)
private

Automatically clear out the hash values if a new image was selected.

Definition at line 457 of file ImageFilePanel.java.

static synchronized ImageFilePanel org.sleuthkit.autopsy.casemodule.ImageFilePanel.createInstance ( String  context,
List< FileFilter >  fileChooserFilters 
)
static
void org.sleuthkit.autopsy.casemodule.ImageFilePanel.createTimeZoneList ( )
private

Creates the drop down list for the time zones and defaults the selection to the local machine time zone.

Definition at line 108 of file ImageFilePanel.java.

References org.sleuthkit.autopsy.coreutils.TimeZoneUtils.createTimeZoneList(), and org.sleuthkit.autopsy.coreutils.TimeZoneUtils.createTimeZoneString().

JFileChooser org.sleuthkit.autopsy.casemodule.ImageFilePanel.getChooser ( )
private
String org.sleuthkit.autopsy.casemodule.ImageFilePanel.getContentPaths ( )

Get the path of the user selected image.

Returns
the image path

Definition at line 543 of file ImageFilePanel.java.

Referenced by org.sleuthkit.autopsy.casemodule.ImageDSProcessor.readConfigSettings().

JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.getMd5TextFieldField ( )
private
boolean org.sleuthkit.autopsy.casemodule.ImageFilePanel.getNoFatOrphans ( )
JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.getPasswordTextField ( )
private
JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.getPathTextField ( )
private
int org.sleuthkit.autopsy.casemodule.ImageFilePanel.getSectorSize ( )

Get the sector size.

Returns
0 if autodetect; otherwise the value selected.

Definition at line 561 of file ImageFilePanel.java.

Referenced by org.sleuthkit.autopsy.casemodule.ImageDSProcessor.readConfigSettings().

JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.getSha1TextField ( )
private
JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.getSha256TextField ( )
private
String org.sleuthkit.autopsy.casemodule.ImageFilePanel.getTimeZone ( )
void org.sleuthkit.autopsy.casemodule.ImageFilePanel.initComponents ( )
private

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 regenerated by the Form Editor.

Definition at line 185 of file ImageFilePanel.java.

boolean org.sleuthkit.autopsy.casemodule.ImageFilePanel.isImagePathValid ( String  path)
private

Returns true if path is valid for processing.

Parameters
pathThe path.
Returns
True if valid for processing.

Definition at line 723 of file ImageFilePanel.java.

References org.sleuthkit.autopsy.coreutils.DriveUtils.isPartition(), and org.sleuthkit.autopsy.coreutils.DriveUtils.isPhysicalDrive().

boolean org.sleuthkit.autopsy.casemodule.ImageFilePanel.isValidationLoading ( )
Returns
True if the panel is on a delay for validating (i.e. typing a password for bitlocker).

Definition at line 804 of file ImageFilePanel.java.

Referenced by org.sleuthkit.autopsy.casemodule.ImageDSProcessor.isPanelValid().

boolean org.sleuthkit.autopsy.casemodule.ImageFilePanel.isValidNonE01 ( String  path)
private

Returns true if the path is a valid image that is not an E01.

Parameters
pathThe path.
Returns
True if valid image and not E01.

Definition at line 736 of file ImageFilePanel.java.

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.readSettings ( )
void org.sleuthkit.autopsy.casemodule.ImageFilePanel.reset ( )
void org.sleuthkit.autopsy.casemodule.ImageFilePanel.select ( )

Set the focus to the pathTextField.

Definition at line 778 of file ImageFilePanel.java.

Referenced by org.sleuthkit.autopsy.casemodule.ImageDSProcessor.getPanel().

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.setContentPath ( String  s)

Set the path of the image file.

Parameters
spath of the image file

Definition at line 552 of file ImageFilePanel.java.

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.setHashValuesComponentsEnabled ( boolean  enabled)
private

Enable or disable all of the hash values components.

Parameters
enabledEnable components if true; otherwise disable.

Definition at line 524 of file ImageFilePanel.java.

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.setUIEnabled ( boolean  enabled,
boolean  validNonE01 
)
private

Sets UI enabled state.

Parameters
enabledTrue

Definition at line 610 of file ImageFilePanel.java.

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.showError ( String  errorMessage)
private

Show an error message if error message is non-empty. Otherwise, hide error message. Either way, hide loading label.

Parameters
errorMessageThe error message to show or null for no error.

Definition at line 706 of file ImageFilePanel.java.

void org.sleuthkit.autopsy.casemodule.ImageFilePanel.storeSettings ( )
void org.sleuthkit.autopsy.casemodule.ImageFilePanel.updateHelper ( )
private

Update functions are called by the pathTextField which has this set as it's DocumentEventListener. Each update function fires a property change to be caught by the parent panel. Additionally, the hash values will be enabled or disabled depending on the pathTextField input.

Definition at line 764 of file ImageFilePanel.java.

References org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.

Referenced by org.sleuthkit.autopsy.casemodule.ImageFilePanel.DelayedValidationDocListener.ValidationRunnable.run().

boolean org.sleuthkit.autopsy.casemodule.ImageFilePanel.validatePanel ( )

Member Data Documentation

javax.swing.JButton org.sleuthkit.autopsy.casemodule.ImageFilePanel.browseButton
private

Definition at line 497 of file ImageFilePanel.java.

final String org.sleuthkit.autopsy.casemodule.ImageFilePanel.contextName
private

Definition at line 66 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.errorLabel
private

Definition at line 498 of file ImageFilePanel.java.

JFileChooser org.sleuthkit.autopsy.casemodule.ImageFilePanel.fileChooser
private

Definition at line 65 of file ImageFilePanel.java.

final List<FileFilter> org.sleuthkit.autopsy.casemodule.ImageFilePanel.fileChooserFilters
private

Definition at line 67 of file ImageFilePanel.java.

final JFileChooserFactory org.sleuthkit.autopsy.casemodule.ImageFilePanel.fileChooserHelper = new JFileChooserFactory()
private

Definition at line 64 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.hashValuesLabel
private

Definition at line 499 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.hashValuesNoteLabel
private

Definition at line 500 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.loadingLabel
private

Definition at line 501 of file ImageFilePanel.java.

final Logger org.sleuthkit.autopsy.casemodule.ImageFilePanel.logger = Logger.getLogger(AddImageTask.class.getName())
staticprivate

Definition at line 59 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.md5HashLabel
private

Definition at line 502 of file ImageFilePanel.java.

javax.swing.JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.md5HashTextField
private

Definition at line 503 of file ImageFilePanel.java.

javax.swing.JCheckBox org.sleuthkit.autopsy.casemodule.ImageFilePanel.noFatOrphansCheckbox
private

Definition at line 504 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.passwordLabel
private

Definition at line 505 of file ImageFilePanel.java.

javax.swing.JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.passwordTextField
private

Definition at line 506 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.pathLabel
private

Definition at line 507 of file ImageFilePanel.java.

javax.swing.JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.pathTextField
private

Definition at line 508 of file ImageFilePanel.java.

final String org.sleuthkit.autopsy.casemodule.ImageFilePanel.PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"
staticprivate

Definition at line 62 of file ImageFilePanel.java.

final String [] org.sleuthkit.autopsy.casemodule.ImageFilePanel.SECTOR_SIZE_CHOICES = {"Auto Detect", "512", "1024", "2048", "4096"}
staticprivate

Definition at line 63 of file ImageFilePanel.java.

javax.swing.JComboBox<String> org.sleuthkit.autopsy.casemodule.ImageFilePanel.sectorSizeComboBox
private

Definition at line 509 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.sectorSizeLabel
private

Definition at line 510 of file ImageFilePanel.java.

final long org.sleuthkit.autopsy.casemodule.ImageFilePanel.serialVersionUID = 1L
staticprivate

Definition at line 61 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.sha1HashLabel
private

Definition at line 511 of file ImageFilePanel.java.

javax.swing.JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.sha1HashTextField
private

Definition at line 512 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.sha256HashLabel
private

Definition at line 513 of file ImageFilePanel.java.

javax.swing.JTextField org.sleuthkit.autopsy.casemodule.ImageFilePanel.sha256HashTextField
private

Definition at line 514 of file ImageFilePanel.java.

javax.swing.JComboBox<String> org.sleuthkit.autopsy.casemodule.ImageFilePanel.timeZoneComboBox
private

Definition at line 515 of file ImageFilePanel.java.

javax.swing.JLabel org.sleuthkit.autopsy.casemodule.ImageFilePanel.timeZoneLabel
private

Definition at line 516 of file ImageFilePanel.java.

int org.sleuthkit.autopsy.casemodule.ImageFilePanel.VALIDATE_TIMEOUT_MILLIS = 1000
staticprivate

Definition at line 69 of file ImageFilePanel.java.

Runnable org.sleuthkit.autopsy.casemodule.ImageFilePanel.validateAction = null
private

Definition at line 75 of file ImageFilePanel.java.

Future<?> org.sleuthkit.autopsy.casemodule.ImageFilePanel.validateFuture = null
private

Definition at line 76 of file ImageFilePanel.java.

final ReentrantLock org.sleuthkit.autopsy.casemodule.ImageFilePanel.validationLock = new ReentrantLock()
private

Definition at line 73 of file ImageFilePanel.java.

final ReentrantLock org.sleuthkit.autopsy.casemodule.ImageFilePanel.validationWaitingLock = new ReentrantLock()
private

Definition at line 72 of file ImageFilePanel.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2024 Sleuth Kit Labs. Generated on: Mon Mar 17 2025
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.