Changeset 32920 for main/trunk/gli/src/org
- Timestamp:
- 2019-03-21T16:48:24+13:00 (5 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/GathererProg.java
r32725 r32920 74 74 Gatherer.setGLIDirectoryPath(System.getProperty("user.dir") + File.separator); 75 75 76 76 // Create an instance of the Gatherer class, which will parse the args and prepare the rest of the GLI 77 Gatherer gatherer = new Gatherer(args); 78 79 // Display the GUI immediately 80 gatherer.openGUI(); 81 82 /* 77 83 // TESTING circumventing the old GUI event dispatch thread exceptions in GLI. Follows 78 84 // https://docs.oracle.com/javase/6/docs/api/javax/swing/package-summary.html#threading … … 81 87 // Schedule a job for the event-dispatching thread: 82 88 // creating and showing this application's GUI. 83 SwingUtilities.invokeLater(new Runnable() { 89 90 SwingUtilities.invokeLater(new Runnable() { 84 91 public void run() { 85 92 // These lines used to be done immediate after setGLIDirectoryPath() call above … … 93 100 } 94 101 }); 102 */ 95 103 } 96 104 } -
main/trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r32712 r32920 183 183 } 184 184 else if (esrc == menu_bar.file_delete) { 185 //new DeleteCollectionTask().start();186 SwingUtilities.invokeLater(new DeleteCollectionTask());185 new DeleteCollectionTask().start(); 186 //SwingUtilities.invokeLater(new DeleteCollectionTask()); 187 187 } 188 188 else if (esrc == menu_bar.file_cdimage) { … … 203 203 } 204 204 else if (esrc == menu_bar.file_new) { 205 //new NewCollectionTask().start();206 SwingUtilities.invokeLater(new NewCollectionTask());205 new NewCollectionTask().start(); 206 //SwingUtilities.invokeLater(new NewCollectionTask()); 207 207 } 208 208 else if (esrc == menu_bar.file_open) { 209 //new OpenCollectionTask().start(); // will cause an EDT access violation exception209 new OpenCollectionTask().start(); // will cause an EDT access violation exception 210 210 // since the GUI stuff of opening a collection is not done in a Swing thread 211 SwingUtilities.invokeLater(new OpenCollectionTask());211 //SwingUtilities.invokeLater(new OpenCollectionTask()); 212 212 } 213 213 else if (esrc == menu_bar.file_options) { … … 940 940 941 941 private class OpenCollectionTask 942 implements Runnable //extends Thread -> If this extends Thread, it will cause an EDT access 942 extends Thread 943 //implements Runnable //extends Thread -> If this extends Thread, it will cause an EDT access 943 944 // violation since the GUI stuff in run() is not done in the Swing Event Dispatch Thread/EDT. 944 945 { … … 988 989 989 990 private class NewCollectionTask 990 implements Runnable //extends Thread 991 extends Thread 992 //implements Runnable //extends Thread 991 993 { 992 994 public void run() … … 1020 1022 1021 1023 private class DeleteCollectionTask 1022 implements Runnable //extends Thread 1024 extends Thread 1025 //implements Runnable //extends Thread 1023 1026 { 1024 1027 public void run() … … 1089 1092 public void updateUI() 1090 1093 { 1091 SwingUtilities.invokeLater(new Runnable() {1092 public void run() {1094 //SwingUtilities.invokeLater(new Runnable() { 1095 // public void run() { 1093 1096 JPanel pane = (JPanel) getContentPane(); 1094 1097 pane.updateUI(); … … 1100 1103 workflowUpdate("Create", Configuration.get("workflow.create", false)); 1101 1104 workflowUpdate("Format", Configuration.get("workflow.format", false)); 1102 }1103 });1105 // } 1106 // }); 1104 1107 } 1105 1108
Note:
See TracChangeset
for help on using the changeset viewer.