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


class  ChooserCallable

Public Member Functions

 JFileChooserFactory ()
 JFileChooserFactory (Class<?extends JFileChooser > cls)
JFileChooser getChooser ()

Static Private Member Functions

static String getCallerClassName ()

Private Attributes

JFileChooser chooser
final ExecutorService executor
final FutureTask< JFileChooser > futureFileChooser

Static Private Attributes

static final Logger logger = Logger.getLogger(JFileChooserFactory.class.getName())

Detailed Description

Factory class for initializing JFileChooser instances in a background thread.

It is a known issue that on Windows a JFileChooser can take an indeterminate amount of time to initialize. Therefore when a JFileChooser is initialized on the EDT there is the potential for the UI to appear hung while initialization is occurring.

Initializing a JFileChooser in a background thread should prevent the UI from hanging. Using this Factory class at component construction time should allow enough time for the JFileChooser to be initialized in the background before the UI user causes an event which will launch the JFileChooser. If the JFileChooser is not initialized prior to the event occurring, the EDT will be blocked, but the wait cursor will appear.

Definition at line 51 of file

Constructor & Destructor Documentation

org.sleuthkit.autopsy.guiutils.JFileChooserFactory.JFileChooserFactory ( )

Create a new instance of the factory. The constructor will kick off an executor to execute the initializing the JFileChooser task.

Definition at line 63 of file

org.sleuthkit.autopsy.guiutils.JFileChooserFactory.JFileChooserFactory ( Class<?extends JFileChooser >  cls)

Create a new instance of the factory using a class that extends JFileChooser. The class default constructor will be called to initialize the class.

The passed in Class must be public and its default constructor must be public.

clsClass type to initialize.

Definition at line 77 of file

References org.sleuthkit.autopsy.guiutils.JFileChooserFactory.getCallerClassName().

Member Function Documentation

static String org.sleuthkit.autopsy.guiutils.JFileChooserFactory.getCallerClassName ( )

Get the name of the class that called this one. From

The name of the class that requested the JFileChooser or null if not found.

Definition at line 101 of file

Referenced by org.sleuthkit.autopsy.guiutils.JFileChooserFactory.JFileChooserFactory().

JFileChooser org.sleuthkit.autopsy.guiutils.JFileChooserFactory.getChooser ( )

Member Data Documentation

JFileChooser org.sleuthkit.autopsy.guiutils.JFileChooserFactory.chooser
final ExecutorService org.sleuthkit.autopsy.guiutils.JFileChooserFactory.executor

Definition at line 57 of file

final FutureTask<JFileChooser> org.sleuthkit.autopsy.guiutils.JFileChooserFactory.futureFileChooser

Definition at line 55 of file

final Logger org.sleuthkit.autopsy.guiutils.JFileChooserFactory.logger = Logger.getLogger(JFileChooserFactory.class.getName())

Definition at line 53 of file

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

Copyright © 2012-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.