* (overridden)
*
* @see java.lang.Runnable#run()
*/
public void run() {
StatisticsCollector collector = new StatisticsCollector();
final ListingProgressDialog lpd = new ListingProgressDialog();
// Center dialog.
lpd.setLocationRelativeTo(null);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
lpd.setVisible(true);
}
});
ListingProcessor processor = new ListingProcessor(collector, files);
processor.setListingProgressListener(lpd);
try {
processor.start().join();
} catch (InterruptedException e) {
e.printStackTrace();
}
lpd.dispose();
if (!lpd.abort()) {
JDialog dialog = new JDialog(dialogParent, LangageManager
.getProperty("statistic.statistic"));
JTabbedPane tab = new JTabbedPane();
SummaryPanel panel = new SummaryPanel();
panel.getValidFileCountLabel().setText(
collector.getStatistic().getValidFileCount() + "");
panel.getInvalidFileCountLabel().setText(
collector.getStatistic().getInvalidFileCount() + "");
panel.getTotalMusicTimeLabel().setText(
collector.getStatistic().getTotalDuration());
panel.getTotalFileSize().setText(
collector.getStatistic().getTotalFileSize());
tab.addTab(LangageManager
.getProperty("statistic.summary"), panel);
tab.addTab(LangageManager
.getProperty("statistic.codecs"), CategoryPanelCreator.createFor(collector
.getStatistic(), Statistic.MAP_CODEC, LangageManager
.getProperty("statistic.categorydescription.codec")));
tab.addTab(LangageManager
.getProperty("statistic.bitrate"), CategoryPanelCreator
.createBitratePanel(collector.getStatistic()));
tab.addTab(LangageManager
.getProperty("statistic.sampling"), CategoryPanelCreator.createFor(collector
.getStatistic(), Statistic.MAP_SAMPLING, LangageManager
.getProperty("statistic.categorydescription.sampling")));
dialog.getContentPane().add(tab);
dialog.pack();
// Center dialog.