progress.setValue(progress.getValue()+1);
decode_pdf.repaint();
/** common extraction code */
PdfGroupingAlgorithms currentGrouping;
/** create a grouping object to apply grouping to data */
try {
if (page == commonValues.getCurrentPage())
currentGrouping = decode_pdf.getGroupingObject();
else {
decode_pdf.decodePageInBackground(page);
currentGrouping = decode_pdf.getBackgroundGroupingObject();
}
// tell JPedal we want teasers
currentGrouping.generateTeasers();
//allow us to add options
currentGrouping.setIncludeHTML(true);
// set size
x1 = pageSize.getCropBoxX(page);
x2 = pageSize.getCropBoxWidth(page);
y1 = pageSize.getCropBoxY(page);
y2 = pageSize.getCropBoxHeight(page);
final SearchListener listener = new DefaultSearchListener();
SortedMap highlightsWithTeasers = currentGrouping.findMultipleTermsInRectangleWithMatchingTeasers(x1, y1, x2, y2, pageSize.getRotation(page), page, searchTerms, searchTypeParameters, listener);
//changed by MArk
if (Thread.interrupted()) {
continue;
//throw new InterruptedException();