Class MediaImporter.MediaImporterWithFileChooserDialogThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
MediaImporter
A class that implements Runnable
so that it can be invoked by EventQueue.invokeAndWait()
.
This is needed, for example, to call from a main() method, since the file chooser and logger dialogs and progress bar methods used MUST be invoked on the AWT Event Dispatch Thread.
-
Constructor Summary
ConstructorsConstructorDescriptionMediaImporterWithFileChooserDialogThread
(Class mediaImporterClass, String mediaDirectoryPath, String loggerTitleMessage, int loggerWidth, int loggerHeight, boolean exitApplicationOnLoggerClose, Component parent, JProgressBar progressBar) Pop up a file chooser dialog that allows the user to specify the location of the DICOMDIR file, or the parent folder (for example, the drive or volume) in which the DICOMDIR file is located, and then import the referenced files. -
Method Summary
-
Constructor Details
-
MediaImporterWithFileChooserDialogThread
public MediaImporterWithFileChooserDialogThread(Class mediaImporterClass, String mediaDirectoryPath, String loggerTitleMessage, int loggerWidth, int loggerHeight, boolean exitApplicationOnLoggerClose, Component parent, JProgressBar progressBar) Pop up a file chooser dialog that allows the user to specify the location of the DICOMDIR file, or the parent folder (for example, the drive or volume) in which the DICOMDIR file is located, and then import the referenced files.
Will be positioned relative to the parent component (for example, centered over the component) if specified, else placed in a look-and-feel-dependent position such as the center of the screen if null.
Will also pop up a logger dialog box, which describes the progress.
Will update a progress bar, if one is supplied.
Uses the specified sub-class of
MediaImporter
, which will have itsdoSomethingWithDicomFileOnMedia()
method overridden to do something useful.- Parameters:
mediaImporterClass
- the class ofMediaImporter
to use, which needs to support the constructorMediaImporter(String,MessageLogger,JProgressBar)
mediaDirectoryPath
- where to begin looking for the DICOMDIR and DICOM filesloggerTitleMessage
- for the title bar of the dialog boxloggerWidth
- initial width of the resizeable dialog boxloggerHeight
- initial height of the resizeable dialog boxexitApplicationOnLoggerClose
- if true, when the logger dialog box is closed (X-d out), will exit the application with success statusparent
- the parent component of the dialog; can benull
progressBar
- where to update progress as files are read (may benull
for no progress bar)
-
-
Method Details