Changeset 6842 for trunk/gli/src
- Timestamp:
- 2004-02-18T17:14:17+13:00 (20 years ago)
- 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 142 142 Gatherer.config.addDirectoryMapping(name, file); 143 143 // 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); 145 145 } 146 146 /** This method calls the builcol.pl scripts via a GShell so as to not lock up the processor. … … 461 461 // workspace_model = null; 462 462 // 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); 464 464 Gatherer.g_man.collectionChanged(ready()); 465 465 } … … 1177 1177 File file = Gatherer.config.removeDirectoryMapping(target.toString()); 1178 1178 // Update tree. 1179 Gatherer.g_man. collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);1179 Gatherer.g_man.gather_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 1180 1180 return file; 1181 1181 } … … 1196 1196 * @see org.greenstone.gatherer.Gatherer 1197 1197 * @see org.greenstone.gatherer.gui.GUIManager 1198 * @see org.greenstone.gatherer.gui.GConfigPane1199 1198 * @see org.greenstone.gatherer.collection.Collection 1200 1199 */ -
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r6318 r6842 319 319 320 320 // 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); 322 322 323 323 resultPrompt(true); -
trunk/gli/src/org/greenstone/gatherer/collection/Job.java
r6770 r6842 482 482 Gatherer.println("Current File: " + current_file_downloading); 483 483 //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(); 486 486 File new_file = new File(current_file_downloading); 487 487 File parent_file = new_file.getParentFile(); -
trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java
r6770 r6842 101 101 * @see org.greenstone.gatherer.collection.Collection 102 102 * @see org.greenstone.gatherer.gui.GUIManager 103 * @see org.greenstone.gatherer.gui.GConfigPane104 103 * @see org.greenstone.gatherer.msm.MetadataSetManager 105 104 * @see org.greenstone.gatherer.util.Utility … … 141 140 142 141 // Write out the collection configuration file. 143 Gatherer.g_man. config_pane.saveConfiguration();142 Gatherer.g_man.design_pane.saveConfiguration(); 144 143 // spd.setProgress(getValue(COLLECTION_CFG_SAVED)); 145 144 -
trunk/gli/src/org/greenstone/gatherer/gui/Filter.java
r6834 r6842 48 48 import org.greenstone.gatherer.gui.tree.DragTree; 49 49 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> 51 51 * <p>The regular expression typed uses '*' as a wildcard character (equivalent to '.*'), and does not use '.' to match any single character (use '?' instead).</p> 52 52 * @author John Thompson, Greenstone Digital Library, University of Waikato -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r6823 r6842 59 59 import org.greenstone.gatherer.gui.AboutDialog; 60 60 //import org.greenstone.gatherer.gui.BrowsingPane; 61 import org.greenstone.gatherer.gui. CollectionPane;61 import org.greenstone.gatherer.gui.GatherPane; 62 62 import org.greenstone.gatherer.gui.CreatePane; 63 63 import org.greenstone.gatherer.gui.Filter; 64 import org.greenstone.gatherer.gui. GConfigPane;64 import org.greenstone.gatherer.gui.DesignPane; 65 65 import org.greenstone.gatherer.gui.MenuBar; 66 import org.greenstone.gatherer.gui. MetaEditPane;66 import org.greenstone.gatherer.gui.EnrichPane; 67 67 import org.greenstone.gatherer.gui.MirrorPane; 68 68 import org.greenstone.gatherer.gui.OpenCollectionDialog; … … 88 88 /** The browsing pane behaves much like an internet browser, or at least will some day. */ 89 89 //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; 92 98 /** The create pane contains scripting options for importing and building collections into libraries. */ 93 99 public CreatePane create_pane = null; 100 /** The preview pane contains a preview of your build collection. */ 101 //public PreviewPane preview_pane = null; 94 102 95 103 public FileOpenActionListener foa_listener = new FileOpenActionListener(); 96 104 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;99 105 /** A reference to the currently instantiated help window, if any. */ 100 106 public HelpFrame help = null; … … 102 108 public MenuBar menu_bar = null; 103 109 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;110 110 /** Are certain panes currently locked? */ 111 111 private boolean locked = false; … … 189 189 // } 190 190 if(cont) { 191 tab_pane.setSelectedComponent( collection_pane);191 tab_pane.setSelectedComponent(gather_pane); 192 192 } 193 193 } … … 216 216 else if(esrc == menu_bar.file_open) { 217 217 if (showLoadCollectionBox()) { 218 tab_pane.setSelectedComponent( collection_pane);218 tab_pane.setSelectedComponent(gather_pane); 219 219 } 220 220 } 221 221 else if(esrc == menu_bar.file_options) { 222 222 // 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(); 224 224 // And spawn a new preferences. 225 225 new Preferences(); … … 292 292 // ************* 293 293 // else if(esrc == menu_bar.tools_size) { 294 // FileNode records[] = metaedit_pane.getSelectedNode();294 // FileNode records[] = enrich_pane.getSelectedNode(); 295 295 // if(records != null && records.length > 0) { 296 296 // ArrayList metadatum = Gatherer.c_man.getCollection().gdm.getMetadata(records[0].getFile()); … … 369 369 mirror_pane.afterDisplay(); 370 370 } 371 metaedit_pane.afterDisplay();371 enrich_pane.afterDisplay(); 372 372 } 373 373 /** 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. … … 379 379 } 380 380 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. 384 384 create_pane.collectionChanged(ready); // Used to indicate a new BuildOptions model should be loaded. 385 385 //preview_pane.collectionChanged(ready); // preview should know when teh coll has changed so it can reload the home page … … 468 468 } 469 469 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(); 472 472 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(); 479 479 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(); 486 486 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); 489 489 } 490 490 … … 510 510 // Select the collect pane if it is available 511 511 if(Gatherer.config.get("workflow.gather", false)) { 512 tab_pane.setSelectedComponent( collection_pane);512 tab_pane.setSelectedComponent(gather_pane); 513 513 } 514 514 // Otherwise find the first tab that is enabled and select that. … … 539 539 public void exit() { 540 540 // 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()) { 542 542 boolean cont = true; 543 543 if(Gatherer.c_man.ready() && !Gatherer.c_man.saved()) { … … 573 573 locked = lock; 574 574 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); 578 578 tab_pane.setEnabledAt(collection_pos, !lock); 579 579 tab_pane.setEnabledAt(metaedit_pos, !lock); … … 581 581 } 582 582 else { 583 int config_pos = tab_pane.indexOfComponent( config_pane);583 int config_pos = tab_pane.indexOfComponent(design_pane); 584 584 tab_pane.setEnabledAt(config_pos, !lock); 585 585 } … … 600 600 collection_name = null; 601 601 // 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); 607 607 } 608 608 if(create_pane != null) { 609 609 create_pane.modeChanged(mode); 610 610 } 611 if( metaedit_pane != null) {612 metaedit_pane.modeChanged(mode);611 if(enrich_pane != null) { 612 enrich_pane.modeChanged(mode); 613 613 } 614 614 } … … 616 616 public void refreshTrees(int refresh_reason) 617 617 { 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); 621 621 } 622 622 } … … 642 642 //} 643 643 //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) { 645 645 tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready()); 646 646 } … … 665 665 // If the rawname was mirror then rebuild workspace tree to remove caches. 666 666 if (rawname.equals("Mirror")) { 667 collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);667 gather_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 668 668 } 669 669 } … … 865 865 // Close collection. 866 866 // if(close_after) { 867 // tab_pane.setSelectedComponent( collection_pane);867 // tab_pane.setSelectedComponent(gather_pane); 868 868 // Gatherer.c_man.closeCollection(); 869 869 // } … … 884 884 create_pane.loseFocus(); 885 885 } 886 else if(previous_pane == config_pane) {887 config_pane.loseFocus();886 else if(previous_pane == design_pane) { 887 design_pane.loseFocus(); 888 888 } 889 889 } … … 894 894 menu_bar.tabSelected(tab_pane.getSelectedIndex()); 895 895 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(); 898 898 // "View assigned metadata" menu item is enabled for the "Gather" pane 899 899 menu_bar.metadata_view.setCanEnable(true); 900 900 } 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(); 903 903 // "View assigned metadata" menu item is enabled for the "Enrich" pane 904 904 menu_bar.metadata_view.setCanEnable(true); 905 905 } 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(); 908 908 } 909 909 else if(selected_index == tab_pane.indexOfComponent(create_pane)) { … … 914 914 } 915 915 //else if(tab_pane.getSelectedIndex() == tab_pane.indexOfComponent(preview_pane)) { 916 // config_pane.saveConfiguration();916 //design_pane.saveConfiguration(); 917 917 //preview_pane.gainFocus(); 918 918 //} … … 1012 1012 //browse_pos = tab_pane.indexOfComponent(browser_pane); 1013 1013 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); 1016 1016 export_pos = tab_pane.indexOfComponent(export_pane); 1017 1017 create_pos = tab_pane.indexOfComponent(create_pane); -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r6833 r6842 648 648 649 649 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 table650 Gatherer.g_man.enrich_pane.valueChanged((TreeSelectionEvent) null); // Refresh metadata table 651 651 652 652 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 415 415 // Sort the metadata and update the table 416 416 if (!killed) { 417 Gatherer.g_man. metaedit_pane.validateMetadataTable();417 Gatherer.g_man.enrich_pane.validateMetadataTable(); 418 418 Collections.sort(current_metadata, MSMUtils.METADATA_COMPARATOR); 419 419 fireTableDataChanged(); -
trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java
r6539 r6842 678 678 language_label.setPreferredSize(LABEL_SIZE); 679 679 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()); 681 681 language_box.setRenderer(new LanguageListCellRenderer()); 682 682 Dictionary.setTooltip(language_box, "MEM.Attribute_Language_Tooltip");
Note:
See TracChangeset
for help on using the changeset viewer.