Changeset 6842


Ignore:
Timestamp:
2004-02-18T17:14:17+13:00 (20 years ago)
Author:
mdewsnip
Message:

Variable names changes needed because of the name change of the Gather, Enrich and Design pane java files.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r6770 r6842  
    142142    Gatherer.config.addDirectoryMapping(name, file);
    143143    // Now update the tree
    144     Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
     144    Gatherer.g_man.gather_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    145145    }
    146146    /** This method calls the builcol.pl scripts via a GShell so as to not lock up the processor.
     
    461461        // workspace_model = null;
    462462        // set the view to Gather pane
    463         Gatherer.g_man.setSelectedView(Gatherer.g_man.collection_pane);
     463        Gatherer.g_man.setSelectedView(Gatherer.g_man.gather_pane);
    464464        Gatherer.g_man.collectionChanged(ready());
    465465    }
     
    11771177    File file = Gatherer.config.removeDirectoryMapping(target.toString());
    11781178    // Update tree.
    1179     Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
     1179    Gatherer.g_man.gather_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    11801180    return file;
    11811181    }
     
    11961196     * @see org.greenstone.gatherer.Gatherer
    11971197     * @see org.greenstone.gatherer.gui.GUIManager
    1198      * @see org.greenstone.gatherer.gui.GConfigPane
    11991198     * @see org.greenstone.gatherer.collection.Collection
    12001199     */
  • trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java

    r6318 r6842  
    319319
    320320        // Refresh the collects shown in the workspace tree
    321         Gatherer.g_man.collection_pane.refreshWorkspaceTree(DragTree.LIBRARY_CONTENTS_CHANGED);
     321        Gatherer.g_man.gather_pane.refreshWorkspaceTree(DragTree.LIBRARY_CONTENTS_CHANGED);
    322322
    323323        resultPrompt(true);
  • trunk/gli/src/org/greenstone/gatherer/collection/Job.java

    r6770 r6842  
    482482    Gatherer.println("Current File: " + current_file_downloading);
    483483    //WorkspaceTreeModel.refreshWebCacheMappings();
    484     if(Gatherer.g_man.collection_pane.workspace_tree != null) {
    485         FileSystemModel tree_model = (FileSystemModel) Gatherer.g_man.collection_pane.workspace_tree.getModel();
     484    if(Gatherer.g_man.gather_pane.workspace_tree != null) {
     485        FileSystemModel tree_model = (FileSystemModel) Gatherer.g_man.gather_pane.workspace_tree.getModel();
    486486        File new_file = new File(current_file_downloading);
    487487        File parent_file = new_file.getParentFile();
  • trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java

    r6770 r6842  
    101101     * @see org.greenstone.gatherer.collection.Collection
    102102     * @see org.greenstone.gatherer.gui.GUIManager
    103      * @see org.greenstone.gatherer.gui.GConfigPane
    104103     * @see org.greenstone.gatherer.msm.MetadataSetManager
    105104     * @see org.greenstone.gatherer.util.Utility
     
    141140
    142141        // Write out the collection configuration file.
    143         Gatherer.g_man.config_pane.saveConfiguration();
     142        Gatherer.g_man.design_pane.saveConfiguration();
    144143        // spd.setProgress(getValue(COLLECTION_CFG_SAVED));
    145144
  • trunk/gli/src/org/greenstone/gatherer/gui/Filter.java

    r6834 r6842  
    4848import org.greenstone.gatherer.gui.tree.DragTree;
    4949
    50 /** <p>This object allows the user to set a filter on one of the workspace trees, specifying a preset type, or a regular expression that a files must match to be in the tree. Note that all directories are included. This class includes the controls for editing the filter. The trick is that several instances of the Filter class can share the same internal data (termed a 'run' of filters), so that the filter set on the CollectionPane and the MetaEditPane are virtually the same.</p>
     50/** <p>This object allows the user to set a filter on one of the workspace trees, specifying a preset type, or a regular expression that a files must match to be in the tree. Note that all directories are included. This class includes the controls for editing the filter. The trick is that several instances of the Filter class can share the same internal data (termed a 'run' of filters), so that the filter set on the GatherPane and the EnrichPane are virtually the same.</p>
    5151 * <p>The regular expression typed uses '*' as a wildcard character (equivalent to '.*'), and does not use '.' to match any single character (use '?' instead).</p>
    5252 * @author John Thompson, Greenstone Digital Library, University of Waikato
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r6823 r6842  
    5959import org.greenstone.gatherer.gui.AboutDialog;
    6060//import org.greenstone.gatherer.gui.BrowsingPane;
    61 import org.greenstone.gatherer.gui.CollectionPane;
     61import org.greenstone.gatherer.gui.GatherPane;
    6262import org.greenstone.gatherer.gui.CreatePane;
    6363import org.greenstone.gatherer.gui.Filter;
    64 import org.greenstone.gatherer.gui.GConfigPane;
     64import org.greenstone.gatherer.gui.DesignPane;
    6565import org.greenstone.gatherer.gui.MenuBar;
    66 import org.greenstone.gatherer.gui.MetaEditPane;
     66import org.greenstone.gatherer.gui.EnrichPane;
    6767import org.greenstone.gatherer.gui.MirrorPane;
    6868import org.greenstone.gatherer.gui.OpenCollectionDialog;
     
    8888    /** The browsing pane behaves much like an internet browser, or at least will some day. */
    8989    //public BrowsingPane browser_pane = null;
    90     /** The collection pane is more like a file manager where you drag files from one tree to another. */
    91     public CollectionPane collection_pane = null;
     90    /** The mirror pane contains controls for mirroring internet sites. */
     91    public MirrorPane mirror_pane = null;
     92    /** The gather pane is more like a file manager where you drag files from one tree to another. */
     93    public GatherPane gather_pane = null;
     94    /** The enrich pane is used to assign, edit and remove metadata from files within the collection. */
     95    public EnrichPane enrich_pane = null;
     96    /** The design pane allows you to edit the design of the library in terms of the collection configuration file. */
     97    public DesignPane design_pane = null;
    9298    /** The create pane contains scripting options for importing and building collections into libraries. */
    9399    public CreatePane create_pane = null;
     100    /** The preview pane contains a preview of your build collection. */
     101    //public PreviewPane preview_pane = null;
    94102
    95103    public FileOpenActionListener foa_listener = new FileOpenActionListener();
    96104
    97     /** The configuration pane allows you to edit the design of the library in terms of the collection configuration file. */
    98     public GConfigPane config_pane = null;
    99105    /** A reference to the currently instantiated help window, if any. */
    100106    public HelpFrame help = null;
     
    102108    public MenuBar menu_bar = null;
    103109    public MetaAuditFrame meta_audit;
    104     /** The metaedit pane is used to assign, edit and remove metadata from files within the collection. */
    105     public MetaEditPane metaedit_pane = null;
    106     /** The mirror pane contains controls for mirroring internet sites. */
    107     public MirrorPane mirror_pane = null;
    108     /** The preview pane contains a preview of your build collection. */
    109     //public PreviewPane preview_pane = null;
    110110    /** Are certain panes currently locked? */
    111111    private boolean locked = false;
     
    189189        // }
    190190        if(cont) {
    191         tab_pane.setSelectedComponent(collection_pane);
     191        tab_pane.setSelectedComponent(gather_pane);
    192192        }
    193193    }
     
    216216    else if(esrc == menu_bar.file_open) {
    217217        if (showLoadCollectionBox()) {
    218         tab_pane.setSelectedComponent(collection_pane);
     218        tab_pane.setSelectedComponent(gather_pane);
    219219        }
    220220    }
    221221    else if(esrc == menu_bar.file_options) {
    222222         // Just incase the user has edited the GeneralSettings of a collection without losing focus afterwards. Well I'm forever losing foc... ooh shiney.
    223          config_pane.loseFocus();
     223         design_pane.loseFocus();
    224224         // And spawn a new preferences.
    225225        new Preferences();
     
    292292    // *************
    293293//      else if(esrc == menu_bar.tools_size) {
    294 //          FileNode records[] = metaedit_pane.getSelectedNode();
     294//          FileNode records[] = enrich_pane.getSelectedNode();
    295295//          if(records != null && records.length > 0) {
    296296//          ArrayList metadatum = Gatherer.c_man.getCollection().gdm.getMetadata(records[0].getFile());
     
    369369        mirror_pane.afterDisplay();
    370370    }
    371     metaedit_pane.afterDisplay();
     371    enrich_pane.afterDisplay();
    372372    }
    373373    /** Once a collection has been made available to Gatherer, either by its creation or by it being reloaded, we need to inform all the visual components to update necessary data components (such as tree models), enable certain controls that depend on a collection being accessible, and refresh themselves.
     
    379379    }
    380380    menu_bar.collectionChanged(ready); // Inform the menu bar that the collections changed.
    381     collection_pane.collectionChanged(ready); // Used to update the collection workspace.
    382     metaedit_pane.collectionChanged(ready); // Very important that metaedit pane shows current collection and is listening to latest msm.
    383     config_pane.collectionChanged(ready); // Also important config pane is listening to latest msm.
     381    gather_pane.collectionChanged(ready); // Used to update the collection workspace.
     382    enrich_pane.collectionChanged(ready); // Very important that metaedit pane shows current collection and is listening to latest msm.
     383    design_pane.collectionChanged(ready); // Also important config pane is listening to latest msm.
    384384    create_pane.collectionChanged(ready); // Used to indicate a new BuildOptions model should be loaded.
    385385    //preview_pane.collectionChanged(ready); // preview should know when teh coll has changed so it can reload the home page
     
    468468        }
    469469
    470         collection_pane = new CollectionPane(workspace_tree_sync, collection_tree_sync);
    471         collection_pane.display();
     470        gather_pane = new GatherPane(workspace_tree_sync, collection_tree_sync);
     471        gather_pane.display();
    472472        if(Gatherer.config.get("workflow.gather", true)) {
    473         tab_pane.addTab("GUI.Gather", Utility.getImage("collection.gif"), collection_pane);
    474         tab_pane.setEnabledAt(tab_pane.indexOfComponent(collection_pane), Gatherer.config.get("workflow.gather", false));
    475         }
    476 
    477         metaedit_pane = new MetaEditPane(collection_tree_sync);
    478         metaedit_pane.display();
     473        tab_pane.addTab("GUI.Gather", Utility.getImage("collection.gif"), gather_pane);
     474        tab_pane.setEnabledAt(tab_pane.indexOfComponent(gather_pane), Gatherer.config.get("workflow.gather", false));
     475        }
     476
     477        enrich_pane = new EnrichPane(collection_tree_sync);
     478        enrich_pane.display();
    479479        if(Gatherer.config.get("workflow.enrich", true)) {
    480         tab_pane.addTab("GUI.Enrich", Utility.getImage("metaedit.gif"), metaedit_pane);
    481         tab_pane.setEnabledAt(tab_pane.indexOfComponent(metaedit_pane), false);
    482         }
    483 
    484         config_pane = new GConfigPane();
    485         config_pane.display();
     480        tab_pane.addTab("GUI.Enrich", Utility.getImage("metaedit.gif"), enrich_pane);
     481        tab_pane.setEnabledAt(tab_pane.indexOfComponent(enrich_pane), false);
     482        }
     483
     484        design_pane = new DesignPane();
     485        design_pane.display();
    486486        if(Gatherer.config.get("workflow.design", true)) {
    487         tab_pane.addTab("GUI.Design", Utility.getImage("build.gif"), config_pane);
    488         tab_pane.setEnabledAt(tab_pane.indexOfComponent(config_pane), false);
     487        tab_pane.addTab("GUI.Design", Utility.getImage("build.gif"), design_pane);
     488        tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false);
    489489        }
    490490
     
    510510        // Select the collect pane if it is available
    511511        if(Gatherer.config.get("workflow.gather", false)) {
    512         tab_pane.setSelectedComponent(collection_pane);
     512        tab_pane.setSelectedComponent(gather_pane);
    513513        }
    514514        // Otherwise find the first tab that is enabled and select that.
     
    539539    public void exit() {
    540540    // Tell everyone who cares that they are losing focus
    541     if(!Gatherer.c_man.ready() || config_pane.canSave()) {
     541    if(!Gatherer.c_man.ready() || design_pane.canSave()) {
    542542        boolean cont = true;
    543543        if(Gatherer.c_man.ready() && !Gatherer.c_man.saved()) {
     
    573573    locked = lock;
    574574    if(import_stage) {
    575         int collection_pos = tab_pane.indexOfComponent(collection_pane);
    576         int metaedit_pos = tab_pane.indexOfComponent(metaedit_pane);
    577         int config_pos = tab_pane.indexOfComponent(config_pane);
     575        int collection_pos = tab_pane.indexOfComponent(gather_pane);
     576        int metaedit_pos = tab_pane.indexOfComponent(enrich_pane);
     577        int config_pos = tab_pane.indexOfComponent(design_pane);
    578578        tab_pane.setEnabledAt(collection_pos, !lock);
    579579        tab_pane.setEnabledAt(metaedit_pos, !lock);
     
    581581    }
    582582    else {
    583         int config_pos = tab_pane.indexOfComponent(config_pane);
     583        int config_pos = tab_pane.indexOfComponent(design_pane);
    584584        tab_pane.setEnabledAt(config_pos, !lock);
    585585    }
     
    600600    collection_name = null;
    601601    // Now pass on the message to anyone who cares
    602     if(collection_pane != null) {
    603         collection_pane.modeChanged(mode);
    604     }
    605     if(config_pane != null) {
    606         config_pane.modeChanged(mode);
     602    if(gather_pane != null) {
     603        gather_pane.modeChanged(mode);
     604    }
     605    if(design_pane != null) {
     606        design_pane.modeChanged(mode);
    607607    }
    608608    if(create_pane != null) {
    609609        create_pane.modeChanged(mode);
    610610    }
    611     if(metaedit_pane != null) {
    612         metaedit_pane.modeChanged(mode);
     611    if(enrich_pane != null) {
     612        enrich_pane.modeChanged(mode);
    613613    }
    614614    }
     
    616616    public void refreshTrees(int refresh_reason)
    617617    {
    618     if (collection_pane != null) {
    619         collection_pane.refreshWorkspaceTree(refresh_reason);
    620         collection_pane.refreshCollectionTree(refresh_reason);
     618    if (gather_pane != null) {
     619        gather_pane.refreshWorkspaceTree(refresh_reason);
     620        gather_pane.refreshCollectionTree(refresh_reason);
    621621    }
    622622    }
     
    642642        //}
    643643        //else
    644         if(component == metaedit_pane || component == config_pane || component == export_pane || component == create_pane) {
     644        if(component == enrich_pane || component == design_pane || component == export_pane || component == create_pane) {
    645645        tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready());
    646646        }
     
    665665    // If the rawname was mirror then rebuild workspace tree to remove caches.
    666666    if (rawname.equals("Mirror")) {
    667         collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
     667        gather_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    668668    }
    669669    }
     
    865865    // Close collection.
    866866    // if(close_after) {
    867     //  tab_pane.setSelectedComponent(collection_pane);
     867    //  tab_pane.setSelectedComponent(gather_pane);
    868868    //   Gatherer.c_man.closeCollection();
    869869    //  }
     
    884884        create_pane.loseFocus();
    885885        }
    886         else if(previous_pane == config_pane) {
    887            config_pane.loseFocus();
     886        else if(previous_pane == design_pane) {
     887           design_pane.loseFocus();
    888888        }
    889889    }
     
    894894    menu_bar.tabSelected(tab_pane.getSelectedIndex());
    895895    int selected_index = tab_pane.getSelectedIndex();
    896     if( selected_index == tab_pane.indexOfComponent(collection_pane)) {
    897         collection_pane.gainFocus();
     896    if( selected_index == tab_pane.indexOfComponent(gather_pane)) {
     897        gather_pane.gainFocus();
    898898        // "View assigned metadata" menu item is enabled for the "Gather" pane
    899899        menu_bar.metadata_view.setCanEnable(true);
    900900    }
    901     else if(selected_index == tab_pane.indexOfComponent(metaedit_pane)) {
    902         metaedit_pane.gainFocus();
     901    else if(selected_index == tab_pane.indexOfComponent(enrich_pane)) {
     902        enrich_pane.gainFocus();
    903903        // "View assigned metadata" menu item is enabled for the "Enrich" pane
    904904        menu_bar.metadata_view.setCanEnable(true);
    905905    }
    906     else if(selected_index == tab_pane.indexOfComponent(config_pane)) {
    907         config_pane.gainFocus();
     906    else if(selected_index == tab_pane.indexOfComponent(design_pane)) {
     907        design_pane.gainFocus();
    908908    }
    909909    else if(selected_index == tab_pane.indexOfComponent(create_pane)) {
     
    914914    }
    915915    //else if(tab_pane.getSelectedIndex() == tab_pane.indexOfComponent(preview_pane)) {
    916     //config_pane.saveConfiguration();
     916    //design_pane.saveConfiguration();
    917917    //preview_pane.gainFocus();
    918918    //}
     
    10121012        //browse_pos = tab_pane.indexOfComponent(browser_pane);
    10131013        mirror_pos = tab_pane.indexOfComponent(mirror_pane);
    1014         metaedit_pos = tab_pane.indexOfComponent(metaedit_pane);
    1015         config_pos = tab_pane.indexOfComponent(config_pane);
     1014        metaedit_pos = tab_pane.indexOfComponent(enrich_pane);
     1015        config_pos = tab_pane.indexOfComponent(design_pane);
    10161016        export_pos = tab_pane.indexOfComponent(export_pane);
    10171017        create_pos = tab_pane.indexOfComponent(create_pane);
  • trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r6833 r6842  
    648648
    649649        Gatherer.config.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected());
    650         Gatherer.g_man.metaedit_pane.valueChanged((TreeSelectionEvent) null); // Refresh metadata table
     650        Gatherer.g_man.enrich_pane.valueChanged((TreeSelectionEvent) null); // Refresh metadata table
    651651
    652652        Gatherer.config.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry)language_combobox.getSelectedItem()).getLocale());
  • trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java

    r6177 r6842  
    415415        // Sort the metadata and update the table
    416416        if (!killed) {
    417         Gatherer.g_man.metaedit_pane.validateMetadataTable();
     417        Gatherer.g_man.enrich_pane.validateMetadataTable();
    418418        Collections.sort(current_metadata, MSMUtils.METADATA_COMPARATOR);
    419419        fireTableDataChanged();
  • trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java

    r6539 r6842  
    678678        language_label.setPreferredSize(LABEL_SIZE);
    679679        Dictionary.setText(language_label, "MEM.Language");
    680         language_box = new JComboBox(Gatherer.g_man.config_pane.getLanguageCodes().toArray());
     680        language_box = new JComboBox(Gatherer.g_man.design_pane.getLanguageCodes().toArray());
    681681        language_box.setRenderer(new LanguageListCellRenderer());
    682682        Dictionary.setTooltip(language_box, "MEM.Attribute_Language_Tooltip");
Note: See TracChangeset for help on using the changeset viewer.