- Timestamp:
- 2003-06-09T12:59:32+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java
r4444 r4517 313 313 for(int i = 0; i < getRowCount(); i++) { 314 314 if(getMetadataAtRow(i).equals(data)) { 315 ///ystem.err.println("Found matching metadata at row " + i + " (of " + getRowCount() + " rows)"); 316 ///ystem.err.println("Table shows " + table.getRowCount() + " rows!"); 317 bounds = table.getCellRect(i, 0, true); 318 table.scrollRectToVisible(bounds); 319 table.setRowSelectionInterval(i, i); 315 // System.err.println("Found matching metadata at row " + i + " (of " + getRowCount() + " rows)"); 316 // bounds = table.getCellRect(i, 0, true); 317 // table.scrollRectToVisible(bounds); 318 SelectionTask task = new SelectionTask(i); 319 SwingUtilities.invokeLater(task); 320 break; 320 321 } 321 322 } … … 326 327 } 327 328 return bounds; 329 } 330 331 private class SelectionTask 332 extends Thread { 333 private int selected_row; 334 SelectionTask(int selected_row) { 335 this.selected_row = selected_row; 336 } 337 public void run() { 338 Rectangle bounds = table.getCellRect(selected_row, 0, true); 339 table.scrollRectToVisible(bounds); 340 table.setRowSelectionInterval(selected_row, selected_row); 341 System.err.println("Done setRowSelectionInterval..."); 342 } 328 343 } 329 344
Note:
See TracChangeset
for help on using the changeset viewer.