Revision 46066 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java
DefaultSearchPanel.java | ||
---|---|---|
1202 | 1202 |
Thread task = new Thread(() -> { |
1203 | 1203 |
try { |
1204 | 1204 |
this.processing = true; |
1205 |
this.setEnabled(false);
|
|
1205 |
this.updateComponentState();
|
|
1206 | 1206 |
status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Copying_rows_to_clipboard")); |
1207 | 1207 |
SwingUtilities.invokeLater(() -> { |
1208 | 1208 |
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); |
... | ... | |
1241 | 1241 |
status.setRangeOfValues(0, selection.length); |
1242 | 1242 |
excelStr.append(LINE_BREAK); |
1243 | 1243 |
for (int i : selection) { |
1244 |
status.incrementCurrentValue(); |
|
1244 | 1245 |
if (status.isCancellationRequested()) { |
1245 | 1246 |
status.message(""); |
1246 | 1247 |
status.cancel(); |
... | ... | |
1277 | 1278 |
excelStr.append(CELL_BREAK); |
1278 | 1279 |
} |
1279 | 1280 |
} |
1280 |
status.setCurValue(i); |
|
1281 | 1281 |
excelStr.append(LINE_BREAK); |
1282 | 1282 |
} |
1283 | 1283 |
String toStr = excelStr.toString(); |
1284 | 1284 |
|
1285 |
status.terminate(); |
|
1286 | 1285 |
doPostCopyRows(status, toStr); |
1286 |
SwingUtilities.invokeLater(() -> { |
|
1287 |
status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Copy_ended")); |
|
1288 |
status.terminate(); |
|
1289 |
}); |
|
1287 | 1290 |
|
1288 | 1291 |
} catch (Exception ex) { |
1289 | 1292 |
LOGGER.warn("Not able to copy rows to the clipboard", ex); |
... | ... | |
1294 | 1297 |
SwingUtilities.invokeLater(() -> { |
1295 | 1298 |
this.setCursor(savedCursor); |
1296 | 1299 |
}); |
1297 |
status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Copy_ended")); |
|
1298 | 1300 |
this.updateComponentState(); |
1299 | 1301 |
} |
1300 | 1302 |
}, "SearchPanelCopyRows"); |
Also available in: Unified diff