- Timestamp:
- 2018-12-18T19:23:21+13:00 (5 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r31638 r32712 60 60 import org.greenstone.gatherer.gui.LockFileDialog; 61 61 import org.greenstone.gatherer.gui.ModalProgressPopup; 62 import org.greenstone.gatherer.gui.TestingPreparation; 62 63 import org.greenstone.gatherer.gui.WarningDialog; 63 64 import org.greenstone.gatherer.metadata.DocXMLFileManager; … … 551 552 // Create the collection on a separate thread so the progress bar updates correctly 552 553 (new CreateCollectionTask(description, email, name, title, base_collection_directory, metadata_sets, create_collection_progress_popup)).start(); 554 //SwingUtilities.invokeLater(new CreateCollectionTask(description, email, name, title, base_collection_directory, metadata_sets, create_collection_progress_popup)); 553 555 } 554 556 … … 1285 1287 // Load the collection on a separate thread so the progress bar updates correctly 1286 1288 (new LoadCollectionTask(collection_file_path, load_collection_progress_popup)).start(); 1289 //SwingUtilities.invokeLater(new LoadCollectionTask(collection_file_path, load_collection_progress_popup)); 1287 1290 } 1288 1291 … … 1394 1397 if (lock_file.exists()) { 1395 1398 LockFileDialog dialog = new LockFileDialog(Gatherer.g_man, collection_name, lock_file); 1399 TestingPreparation.setNamesRecursively(dialog); 1396 1400 int choice = dialog.getChoice(); 1397 1401 dialog.dispose(); -
main/trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r32699 r32712 183 183 } 184 184 else if (esrc == menu_bar.file_delete) { 185 new DeleteCollectionTask().start(); 185 //new DeleteCollectionTask().start(); 186 SwingUtilities.invokeLater(new DeleteCollectionTask()); 186 187 } 187 188 else if (esrc == menu_bar.file_cdimage) { … … 193 194 else if (esrc == menu_bar.file_exportas) { 194 195 ExportAsPrompt eap = new ExportAsPrompt(); 196 TestingPreparation.setNamesRecursively(eap); 195 197 eap.display(); 196 198 eap.destroy(); … … 201 203 } 202 204 else if (esrc == menu_bar.file_new) { 203 new NewCollectionTask().start(); 205 //new NewCollectionTask().start(); 206 SwingUtilities.invokeLater(new NewCollectionTask()); 204 207 } 205 208 else if (esrc == menu_bar.file_open) { … … 985 988 986 989 private class NewCollectionTask 987 extends Thread990 implements Runnable //extends Thread 988 991 { 989 992 public void run() 990 993 { 991 994 // Create the collection details prompt from new collection prompt 992 NewCollectionDetailsPrompt ncd_prompt = new NewCollectionDetailsPrompt(); 995 NewCollectionDetailsPrompt ncd_prompt = new NewCollectionDetailsPrompt(); 996 //TestingPreparation.setNamesRecursively(ncd_prompt); 997 // 1. names have to be set in NewCollectionDetailsPrompt, as it makes itself visible 998 // and for testing we have to have run setName() on its components before the dialog goes visible 999 // 2. For whatever reason, the NewCollectionDetailsPrompt dialog's own name is set 1000 // to "col" and it's not possible to change it at any point before or after 1001 // creating the dialog, and whether from inside or outside the dialog's own class 993 1002 994 1003 // Create the new collection (if not cancelled) in a new thread. … … 1011 1020 1012 1021 private class DeleteCollectionTask 1013 extends Thread1022 implements Runnable //extends Thread 1014 1023 { 1015 1024 public void run() … … 1017 1026 // The rest is handled by the DeleteCollectionPrompt 1018 1027 DeleteCollectionPrompt dc_prompt = new DeleteCollectionPrompt(); 1028 TestingPreparation.setNamesRecursively(dc_prompt); 1019 1029 if (dc_prompt.display()) { 1020 1030 //closeCurrentCollection(); … … 1079 1089 public void updateUI() 1080 1090 { 1081 JPanel pane = (JPanel) getContentPane(); 1082 pane.updateUI(); 1083 // Also update all of the tabs according to workflow. 1084 workflowUpdate("Download", Configuration.get("workflow.download", false)); 1085 workflowUpdate("Gather", Configuration.get("workflow.gather", false)); 1086 workflowUpdate("Enrich", Configuration.get("workflow.enrich", false)); 1087 workflowUpdate("Design", Configuration.get("workflow.design", false)); 1088 workflowUpdate("Create", Configuration.get("workflow.create", false)); 1089 workflowUpdate("Format", Configuration.get("workflow.format", false)); 1091 SwingUtilities.invokeLater(new Runnable() { 1092 public void run() { 1093 JPanel pane = (JPanel) getContentPane(); 1094 pane.updateUI(); 1095 // Also update all of the tabs according to workflow. 1096 workflowUpdate("Download", Configuration.get("workflow.download", false)); 1097 workflowUpdate("Gather", Configuration.get("workflow.gather", false)); 1098 workflowUpdate("Enrich", Configuration.get("workflow.enrich", false)); 1099 workflowUpdate("Design", Configuration.get("workflow.design", false)); 1100 workflowUpdate("Create", Configuration.get("workflow.create", false)); 1101 workflowUpdate("Format", Configuration.get("workflow.format", false)); 1102 } 1103 }); 1090 1104 } 1091 1105 -
main/trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r25789 r32712 97 97 */ 98 98 public NewCollectionDetailsPrompt() { 99 super(Gatherer.g_man, true); 99 super(Gatherer.g_man, true); 100 100 this.cancelled = true; 101 101 this.setComponentOrientation(Dictionary.getOrientation()); … … 254 254 Dimension screen_size = Configuration.screen_size; 255 255 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 256 257 TestingPreparation.setNamesRecursively(this); 258 256 259 setVisible(true); 257 260 } -
main/trunk/gli/src/org/greenstone/gatherer/gui/SimpleResultDialog.java
r18370 r32712 68 68 69 69 setUpGUI(label, results); 70 TestingPreparation.setNamesRecursively(this); 70 71 } 71 72 -
main/trunk/gli/src/org/greenstone/gatherer/gui/TestingPreparation.java
r32706 r32712 6 6 7 7 public class TestingPreparation { 8 public static boolean TEST_MODE = true; // TODO: set to true for debugging. Reset to false when committing to svn8 public static boolean TEST_MODE = false; // TODO: set to true for debugging. Reset to false when committing to svn 9 9 public static boolean DEBUGGING_TEST_MODE = true; 10 10
Note:
See TracChangeset
for help on using the changeset viewer.