updates the statistics fields and thumbnail displayed in dialog.
@param e Event object describing the file that has been indexed.
*/
public void fileIndexed(ExtVolIndexerEvent e) {
final PhotoInfo p = e.getPhoto();
final ExtVolIndexer indexer = (ExtVolIndexer) e.getSource();
SwingUtilities.invokeLater( new Runnable() {
public void run() {
int fileCount = indexer.getIndexedFileCount();
indexedFilesLabel.setText( "" + fileCount );
int photoCount = indexer.getNewPhotoCount();
newPhotosLabel.setText( "" + photoCount );
int instanceCount = indexer.getNewInstanceCount();
newInstancesLabel.setText( "" + instanceCount );
int folderCount = indexer.getNewFolderCount();
newFoldersLabel.setText( "" + folderCount );
if ( p != null ) {
thumbView.setPhoto( p );
}
progressBar.setValue( indexer.getPercentComplete() );
long timeDiff = System.currentTimeMillis() - indexer.getStartTime().getTime();
timeElapsedLabel.setText( getTimeString( timeDiff ) );
}
DecimalFormat fmt = new DecimalFormat( "00" );