Changeset 7511 for trunk/gli/src
- Timestamp:
- 2004-05-31T16:11:18+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java
r6848 r7511 200 200 // Ensure the position is within the current metadata 201 201 if (i >= current_metadata.size()) { 202 203 } 204 205 // Select the same row as before, except if it would select a different element 202 i = current_metadata.size() - 1; 203 } 204 205 // Select the same row as before, except if it would select a different element - in which case select the first element 206 206 ElementWrapper element = metadatum.getElement(); 207 207 if(i < 0) { 208 208 Gatherer.println("Could not find suitable row to select!"); 209 return; 210 } 211 Metadata newly_selected_metadatum = (Metadata) current_metadata.get(i); 212 if (!newly_selected_metadatum.getElement().equals(element)) { 213 // Try one row previous 214 i--; 215 if(i < 0) { 216 Gatherer.println("Could not find suitable row to select!"); 217 return; 218 } 219 220 newly_selected_metadatum = (Metadata) current_metadata.get(i); 209 i=0; // select the first one 210 //return; 211 } else { 212 Metadata newly_selected_metadatum = (Metadata) current_metadata.get(i); 221 213 if (!newly_selected_metadatum.getElement().equals(element)) { 222 Gatherer.println("Could not find suitable row to select!"); 223 return; 214 // Try one row previous 215 i--; 216 if(i < 0) { 217 Gatherer.println("Could not find suitable row to select!"); 218 i=0; 219 //return; 220 } else { 221 222 newly_selected_metadatum = (Metadata) current_metadata.get(i); 223 if (!newly_selected_metadatum.getElement().equals(element)) { 224 Gatherer.println("Could not find suitable row to select!"); 225 i=0; 226 //return; 227 } 228 } 224 229 } 225 230 } … … 399 404 ///ystem.err.println("Element: " + element); 400 405 401 // If we haven't seen this metadata element, and conditional on the fact that if it is extracted, we have seen at least one file, then add it now 402 //System.err.println("Element name = " + element); 403 //System.err.println("Element extracted = " + element.isExtracted()); 404 //System.err.println("have_encountered_files = " + have_encountered_file); 405 if (!known_elements.contains(element)) { // && (!element.isExtracted() || have_encountered_file)) { 406 // If we haven't seen this metadata element, and if it is not 407 // extracted, add it now 408 if (!known_elements.contains(element) && !element.isExtracted() ) { 406 409 Metadata metadatum = new Metadata(element); 407 410 metadatum.setCount(file_nodes.length);
Note:
See TracChangeset
for help on using the changeset viewer.