Exporter exporter = exporterRegistry.createExporter(fileName);
statusBar.setStatusText(Labels.getLabel("state.exporting"));
// TODO: expose appending feature in the GUI
ExportProcessor exportProcessor = new ExportProcessor(exporter, new File(fileName), false);
// in case of isSelection we need to create our filter
ScanningResultFilter filter = null;
if (isSelection) {
filter = new ScanningResultFilter() {
public boolean apply(int index, ScanningResult result) {
return resultTable.isSelected(index);
}
};
}
exportProcessor.process(resultTable.getScanningResults(), filter);
statusBar.setStatusText(null);
}