Changeset 8356
- Timestamp:
- 2004-10-18T12:15:07+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r8355 r8356 54 54 import org.greenstone.gatherer.Gatherer; 55 55 import org.greenstone.gatherer.collection.Collection; 56 import org.greenstone.gatherer.collection.CollectionManager;57 56 import org.greenstone.gatherer.collection.DeleteCollectionPrompt; 58 57 import org.greenstone.gatherer.collection.ExportCollectionPrompt; … … 64 63 import org.greenstone.gatherer.gui.tree.WorkspaceTree; 65 64 import org.greenstone.gatherer.help.HelpFrame; 66 import org.greenstone.gatherer.metadata.MetadataSet;67 import org.greenstone.gatherer.metadata.MetadataSetManager;68 import org.greenstone.gatherer.shell.GShell;69 65 import org.greenstone.gatherer.util.StaticStrings; 70 66 import org.greenstone.gatherer.util.TreeSynchronizer; … … 109 105 /** A threaded tab changer to try and avoid NPE on exit. */ 110 106 private TabUpdater tab_updater = null; 111 /** The thread group this manager, and hence its child graphical rendering threads, belong to. In a vain attempts to make the Dictionary work across threads.112 * @see org.greenstone.gatherer.Dictionary113 */114 // private ThreadGroup thread_group = null;115 107 /** Ensures that expansion events between like collection trees are synchronized. */ 116 108 private TreeSynchronizer collection_tree_sync = null; … … 140 132 // Make the Tool tip hang around for a rediculous amount of time. 141 133 ToolTipManager.sharedInstance().setDismissDelay(10000); 142 // Get a reference to the main thread group. Create a new thread, which defaults into the same thread group, then get its thread group. Easy. 143 // Thread bob = new Thread(); 144 // thread_group = bob.getThreadGroup(); 134 145 135 // Set up some other UI stuff. (fonts handled in Gatherer.main()) 146 136 UIManager.put("FileChooser.lookInLabelText", Dictionary.get("SaveCollectionBox.Look_In")); … … 720 710 } 721 711 722 /** When called this method causes the Meta AuditBox class in CollectionManagerto display a nice dialog box which contains all the metadata assigned in the collection.712 /** When called this method causes the MetadataAuditTable to display a nice dialog box which contains all the metadata assigned in the collection. 723 713 */ 724 714 public void showMetaAuditBox() { … … 799 789 * @return A <i>boolean</i> which is <i>true</i> if the collection was saved successfully, <i>false</i> otherwise. 800 790 */ 801 private boolean showSaveCollectionBox(boolean close_after, boolean exit_after) { 802 //SaveCollectionBox save_collection_box = new SaveCollectionBox(); 803 //Rectangle bounds = save_collection_box.getBounds(); 804 //int result = save_collection_box.getUserOption(Gatherer.c_man.getCollection().getName()); 805 //switch(result) { 806 //case SaveCollectionBox.SAVE_YES: 791 private boolean showSaveCollectionBox(boolean close_after, boolean exit_after) 792 { 807 793 Gatherer.c_man.setClosingThread(true); 808 // System.err.println("Here 2.");809 794 Gatherer.c_man.saveCollection(close_after, exit_after); 810 // System.err.println("Here 3."); 795 811 796 // Wait until it is closed. 812 797 try { 813 798 synchronized(this) { 814 while (Gatherer.c_man.reallyReady()) {799 while (Gatherer.c_man.reallyReady()) { 815 800 wait(10); 816 801 } … … 820 805 DebugStream.printStackTrace(exception); 821 806 } 822 807 823 808 Gatherer.c_man.setClosingThread(false); 824 825 //content_pane.paintImmediately(bounds);826 809 return true; 827 //case SaveCollectionBox.SAVE_NO: 828 // Close collection. 829 // if(close_after) { 830 // tab_pane.setSelectedComponent(gather_pane); 831 // Gatherer.c_man.closeCollection(); 832 // } 833 // if(exit_after) { 834 // Gatherer.self.exit(); 835 // } 836 // return true; 837 //default: 838 // return false; 839 //} 840 } 810 } 811 841 812 /** Any implementation of ChangeListener must include this method so we can be informed when the state of one of the registered objects changes. In this case we are listening to view changes within the tabbed pane. 842 813 * @param event A ChangeEvent containing information about the event that fired this call. … … 918 889 } 919 890 920 /** Called to determine if we should wait for a thread to finish before continuing. We wait for threads if they are named: GSHELL_BUILD, GSHELL_IMPORT, or GSHELL_NEW.921 * @return <i>true</i> if we should wait for a thread, <i>false</i> if it is safe to continue.922 */923 // private boolean waitForThread() {924 // Thread active[] = new Thread[thread_group.activeCount()];925 // int size = thread_group.enumerate(active);926 // for(int i = 0; i < size; i++) {927 // if(active[i].getName().equals(GShell.GSHELL_BUILD) ||928 // active[i].getName().equals(GShell.GSHELL_IMPORT) ||929 // active[i].getName().equals(GShell.GSHELL_NEW)) {930 // return true;931 // }932 // }933 // return false;934 // }935 936 891 937 892 /**Overridden from JFrame so we can exit safely when window is closed (or destroyed). … … 1033 988 } 1034 989 } 1035 1036
Note:
See TracChangeset
for help on using the changeset viewer.