Changeset 36174
- Timestamp:
- 2022-05-10T14:35:59+12:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/cdm/SearchIndexManager.java
r36164 r36174 69 69 this.nip_edit_index_key = "CDM.IndexManager.Edit_Index"; 70 70 this.nip_source_label_key = "CDM.IndexManager.Source"; 71 this.nip_source_tooltip_key = "CDM.IndexManager.Source_Tooltip"; 71 72 this.nip_add_index_button_key = "CDM.IndexManager.Add_Index"; 72 73 this.nip_add_index_tooltip_key = "CDM.IndexManager.Add_Index_Tooltip"; … … 307 308 private JButton select_all_button; 308 309 private JButton select_none_button; 309 310 //private JButton add_all_button; 310 311 311 312 private boolean mgpp_enabled = false; … … 332 333 } 333 334 }); 334 if (existing_index == null && mgpp_enabled) {335 button_pane.setLayout(new GridLayout(2,3,5,0));336 JPanel tmp = new JPanel();337 tmp.setComponentOrientation(Dictionary.getOrientation());338 button_pane.add(tmp);339 } else {335 // if (existing_index == null && mgpp_enabled) { 336 // button_pane.setLayout(new GridLayout(2,3,5,0)); 337 // JPanel tmp = new JPanel(); 338 // tmp.setComponentOrientation(Dictionary.getOrientation()); 339 // button_pane.add(tmp); 340 // } else { 340 341 button_pane.setLayout(new GridLayout(2,2,5,0)); 341 }342 //} 342 343 343 344 select_all_button = new GLIButton(Dictionary.get("CDM.IndexManager.Select_All"), Dictionary.get("CDM.IndexManager.Select_All_Tooltip")); … … 365 366 button_pane.add(select_none_button); 366 367 367 if (existing_index == null && mgpp_enabled) {368 add_all_button = new GLIButton(Dictionary.get("CDM.IndexManager.Add_All"), Dictionary.get("CDM.IndexManager.Add_All_Tooltip"));369 add_all_button.setEnabled(true);370 add_all_button.addActionListener(new AddAllIndexActionListener());371 button_pane.add(add_all_button);372 }368 // if (existing_index == null && mgpp_enabled) { 369 // add_all_button = new GLIButton(Dictionary.get("CDM.IndexManager.Add_All"), Dictionary.get("CDM.IndexManager.Add_All_Tooltip")); 370 // add_all_button.setEnabled(true); 371 // add_all_button.addActionListener(new AddAllIndexActionListener()); 372 // button_pane.add(add_all_button); 373 // } 373 374 374 375 button_pane.add(add_or_replace_button); … … 493 494 494 495 495 / ** add all sources as separate indexes (fields). */496 private class AddAllIndexActionListener497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 496 // /** add all sources as separate indexes (fields). */ 497 // private class AddAllIndexActionListener 498 // implements ActionListener { 499 500 // public void actionPerformed(ActionEvent event) { 501 // ArrayList all_sources = source_list.getAll(); 502 // all_sources.add(0, StaticStrings.TEXT_STR); 503 // ArrayList new_sources = new ArrayList(); 504 // for(int i = 0; i < all_sources.size(); i++) { 505 // Object source = all_sources.get(i); 506 507 // // Create new index 508 // new_sources.clear(); 509 // new_sources.add(source); 510 // Index index = new Index(new_sources); 511 // if(!index_model.contains(index)) { 512 // // Determine the metadatum value 513 // String name = source.toString(); 514 // if(name.startsWith(StaticStrings.EXTRACTED_NAMESPACE) && name.indexOf(StaticStrings.NS_SEP, StaticStrings.EXTRACTED_NAMESPACE.length()) == -1) { 515 // name = name.substring(StaticStrings.EXTRACTED_NAMESPACE.length()); 516 // } 517 // // Create new metadatum 518 // CollectionMeta metadatum = new CollectionMeta(StaticStrings.STOP_CHARACTER + index.getID()); 519 // metadatum.setValue(name); 520 // name = null; 521 // // Assign new index 522 // addIndex(index, metadatum); 523 // } 524 // source = null; 525 // index = null; 526 // } 527 // new_sources = null; 528 // new_index_prompt.dispose(); 528 529 529 530 }530 // } 531 // } 531 532 532 533 private class AllFieldsBoxListener
Note:
See TracChangeset
for help on using the changeset viewer.