Changeset 8356


Ignore:
Timestamp:
2004-10-18T12:15:07+13:00 (20 years ago)
Author:
mdewsnip
Message:

Removed some unused stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r8355 r8356  
    5454import org.greenstone.gatherer.Gatherer;
    5555import org.greenstone.gatherer.collection.Collection;
    56 import org.greenstone.gatherer.collection.CollectionManager;
    5756import org.greenstone.gatherer.collection.DeleteCollectionPrompt;
    5857import org.greenstone.gatherer.collection.ExportCollectionPrompt;
     
    6463import org.greenstone.gatherer.gui.tree.WorkspaceTree;
    6564import 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;
    6965import org.greenstone.gatherer.util.StaticStrings;
    7066import org.greenstone.gatherer.util.TreeSynchronizer;
     
    109105    /** A threaded tab changer to try and avoid NPE on exit. */
    110106    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.Dictionary
    113      */
    114     // private ThreadGroup thread_group = null;
    115107    /** Ensures that expansion events between like collection trees are synchronized. */
    116108    private TreeSynchronizer collection_tree_sync = null;
     
    140132    // Make the Tool tip hang around for a rediculous amount of time.
    141133    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
    145135    // Set up some other UI stuff. (fonts handled in Gatherer.main())
    146136    UIManager.put("FileChooser.lookInLabelText", Dictionary.get("SaveCollectionBox.Look_In"));
     
    720710    }
    721711
    722     /** When called this method causes the MetaAuditBox class in CollectionManager to 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.
    723713     */
    724714    public void showMetaAuditBox() {
     
    799789     * @return A <i>boolean</i> which is <i>true</i> if the collection was saved successfully, <i>false</i> otherwise.
    800790     */
    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    {
    807793    Gatherer.c_man.setClosingThread(true);
    808     // System.err.println("Here 2.");
    809794    Gatherer.c_man.saveCollection(close_after, exit_after);
    810     // System.err.println("Here 3.");
     795
    811796    // Wait until it is closed.
    812797    try {
    813798        synchronized(this) {
    814             while(Gatherer.c_man.reallyReady()) {
     799            while (Gatherer.c_man.reallyReady()) {
    815800            wait(10);
    816801            }
     
    820805        DebugStream.printStackTrace(exception);
    821806    }
    822    
     807
    823808    Gatherer.c_man.setClosingThread(false);
    824    
    825     //content_pane.paintImmediately(bounds);
    826809    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
    841812    /** 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.
    842813     * @param event A ChangeEvent containing information about the event that fired this call.
     
    918889    }
    919890
    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 
    936891
    937892    /**Overridden from JFrame so we can exit safely when window is closed (or destroyed).
     
    1033988    }
    1034989}
    1035 
    1036 
Note: See TracChangeset for help on using the changeset viewer.