mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-02 01:05:55 +00:00
Moved the call to generate the report to a thread
This commit is contained in:
@@ -37,6 +37,7 @@ import java.util.TimeZone;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.RetainLocation;
|
||||
@@ -370,8 +371,15 @@ public final class GeolocationTopComponent extends TopComponent {
|
||||
String reportBaseDir = createReportDirectory();
|
||||
|
||||
progressPanel.setLabels(REPORT_KML, reportBaseDir);
|
||||
|
||||
KMLReport.getDefault().generateReport(reportBaseDir, progressPanel, MapWaypoint.getDataModelWaypoints(visiblePoints));
|
||||
|
||||
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
KMLReport.getDefault().generateReport(reportBaseDir, progressPanel, MapWaypoint.getDataModelWaypoints(visiblePoints));
|
||||
return null;
|
||||
}
|
||||
};
|
||||
worker.execute();
|
||||
JOptionPane.showConfirmDialog(this, progressPanel, Bundle.GeolocationTC_report_progress_title(), JOptionPane.CLOSED_OPTION, JOptionPane.PLAIN_MESSAGE);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Unable to create KML report", ex);
|
||||
|
||||
Reference in New Issue
Block a user