Changeset 8231
- Timestamp:
- 2004-10-07T16:44:32+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 76 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Configuration.java
r8230 r8231 1 1 /** 2 2 *######################################################################### 3 * 3 * Configuration 4 4 * A component of the Gatherer application, part of the Greenstone digital 5 5 * library suite from the New Zealand Digital Library Project at the … … 132 132 static private String wget_version_str = StaticStrings.NO_WGET_STR; 133 133 134 public URL exec_address = null;134 static public URL exec_address = null; 135 135 136 136 /** Constructor. -
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r8196 r8231 589 589 } 590 590 WarningDialog dialog = new WarningDialog(message_name, "general.exec_address" ); 591 dialog.setValueField(new URLField( Gatherer.config.getColor("coloring.editable_foreground", false), Gatherer.config.getColor("coloring.editable_background", false), Gatherer.config.getColor("coloring.error_foreground", false), Gatherer.config.getColor("coloring.error_background", false)));591 dialog.setValueField(new URLField(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false), Configuration.getColor("coloring.error_foreground", false), Configuration.getColor("coloring.error_background", false))); 592 592 dialog.display(); 593 593 dialog.dispose(); 594 594 dialog = null; 595 595 596 String library_path_string = Gatherer.config.getString("general.exec_address", true);596 String library_path_string = Configuration.getString("general.exec_address", true); 597 597 if (!library_path_string.equals("")) { 598 598 try { 599 Gatherer.config.exec_address = new URL(library_path_string);599 Configuration.exec_address = new URL(library_path_string); 600 600 } 601 601 catch (MalformedURLException error) { … … 673 673 static public void setProxy() { 674 674 try {// Can throw several exceptions 675 if( Gatherer.config.get("general.use_proxy", true)) {675 if(Configuration.get("general.use_proxy", true)) { 676 676 System.setProperty("http.proxyType", "4"); 677 System.setProperty("http.proxyHost", Gatherer.config.getString("general.proxy_host", true));678 System.setProperty("http.proxyPort", Gatherer.config.getString("general.proxy_port", true));677 System.setProperty("http.proxyHost", Configuration.getString("general.proxy_host", true)); 678 System.setProperty("http.proxyPort", Configuration.getString("general.proxy_port", true)); 679 679 System.setProperty("http.proxySet", "true"); 680 680 } else { -
trunk/gli/src/org/greenstone/gatherer/WGet.java
r7658 r8231 261 261 Gatherer.println("About to create a new job"); 262 262 263 DownloadJob new_job = new DownloadJob( Gatherer.config.get("mirroring.debug", false), no_parents, other_hosts, page_requisites, Gatherer.config.get("mirroring.quiet", false), url, depth, destination, Gatherer.config.proxy_pass, Gatherer.config.proxy_user, this, simple);263 DownloadJob new_job = new DownloadJob(Configuration.get("mirroring.debug", false), no_parents, other_hosts, page_requisites, Configuration.get("mirroring.quiet", false), url, depth, destination, Configuration.proxy_pass, Configuration.proxy_user, this, simple); 264 264 265 265 // Tell it to run as soon as possible -
trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java
r8020 r8231 156 156 157 157 // Display on screen. 158 Dimension screen_size = Gatherer.config.screen_size;158 Dimension screen_size = Configuration.screen_size; 159 159 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 160 160 screen_size = null; … … 215 215 inner_pane.setBackground(color); 216 216 JLabel header_label = new JLabel("<html><strong>" + name + "</strong></html>"); 217 header_label.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));217 header_label.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 218 218 header_label.setHorizontalAlignment(JLabel.CENTER); 219 219 header_label.setOpaque(true); … … 235 235 ArrayList arguments = data.getArguments(true, false); 236 236 int total_height = 250; 237 int mode = Gatherer.config.getMode();237 int mode = Configuration.getMode(); 238 238 for(int i = 0; i < arguments.size(); i++) { 239 239 Argument argument = (Argument) arguments.get(i); … … 246 246 // now add in the custom args bit 247 247 coloured = !coloured; 248 Color color = (coloured ? Gatherer.config.getColor("coloring.collection_heading_background", false) : Gatherer.config.getColor("coloring.collection_tree_background", false));248 Color color = (coloured ? Configuration.getColor("coloring.collection_heading_background", false) : Configuration.getColor("coloring.collection_tree_background", false)); 249 249 addHeader(Dictionary.get("CDM.ArgumentConfiguration.Custom_Header"), color); 250 250 custom_pane.setBackground(color); … … 264 264 private Argument argument = null; 265 265 266 private Color colour_one = Gatherer.config.getColor("coloring.collection_heading_background", false);267 private Color colour_two = Gatherer.config.getColor("coloring.collection_tree_background", false);266 private Color colour_one = Configuration.getColor("coloring.collection_heading_background", false); 267 private Color colour_two = Configuration.getColor("coloring.collection_tree_background", false); 268 268 /** One of a possible two buttons available for adding to this control. */ 269 269 private JButton one = null; … … 449 449 450 450 // Editable for advanced modes (allows things like dc.Title,ex.Title) 451 if ( Gatherer.config.getMode() > Configuration.ASSISTANT_MODE) {451 if (Configuration.getMode() > Configuration.ASSISTANT_MODE) { 452 452 ((JComboBox) value).setEditable(true); 453 453 } -
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r8015 r8231 36 36 import javax.swing.event.*; 37 37 import org.apache.xerces.parsers.*; 38 import org.greenstone.gatherer.Configuration; 38 39 import org.greenstone.gatherer.Dictionary; 39 40 import org.greenstone.gatherer.Gatherer; … … 327 328 if(Utility.isWindows()) { 328 329 args = new String[6]; 329 if( Gatherer.config.perl_path != null) {330 args[0] = Gatherer.config.perl_path;330 if(Configuration.perl_path != null) { 331 args[0] = Configuration.perl_path; 331 332 } 332 333 else { 333 334 args[0] = "Perl.exe"; 334 335 } 335 args[1] = Gatherer.config.gsdl_path + "bin" + File.separator + "script" + File.separator + "classinfo.pl";336 args[1] = Configuration.gsdl_path + "bin" + File.separator + "script" + File.separator + "classinfo.pl"; 336 337 args[2] = "-xml"; 337 338 args[3] = "-language"; … … 386 387 if (Gatherer.isGsdlRemote) { 387 388 388 String lang = Gatherer.config.getLanguage();389 String lang = Configuration.getLanguage(); 389 390 390 391 String launch = Gatherer.cgiBase + "launch"; … … 410 411 411 412 // Retrieve the gsdl home directory... 412 String directory = Gatherer.config.gsdl_path;413 String directory = Configuration.gsdl_path; 413 414 directory = directory + "perllib" + File.separator + "classify" + File.separator; 414 415 415 String current_lang = Gatherer.config.getLanguage();416 String current_lang = Configuration.getLanguage(); 416 417 File files[] = (new File(directory)).listFiles(); 417 418 if(files != null) { … … 465 466 } 466 467 467 String current_lang = Gatherer.config.getLanguage();468 String current_lang = Configuration.getLanguage(); 468 469 if (num_classifiers>0) { 469 470 // Create a progress indicator. … … 659 660 ClassifierComboboxListener ccl = new ClassifierComboboxListener(); 660 661 classifier = new GComboBox(getAvailable()); 661 classifier.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.editable_background", false));662 classifier.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));662 classifier.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false)); 663 classifier.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 663 664 classifier.setEditable(true); 664 classifier.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));665 classifier.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));665 classifier.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 666 classifier.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 666 667 if(classifier.getItemCount() > 0) { 667 668 classifier.setSelectedIndex(0); -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r8056 r8231 32 32 import java.util.*; 33 33 import javax.swing.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Gatherer; 35 36 import org.greenstone.gatherer.cdm.CommandTokenizer; … … 1091 1092 String name = (String) acquired_collectionmeta_names.get(y); 1092 1093 String value = name.substring(1); 1093 Gatherer.println("G2.39 CollectMeta missing. Adding: " + name + " [l=" + Gatherer.config.getLanguage() + "] \"" + value + "\"");1094 Gatherer.println("G2.39 CollectMeta missing. Adding: " + name + " [l=" + Configuration.getLanguage() + "] \"" + value + "\""); 1094 1095 Element element = document.createElement(COLLECTIONMETADATA_ELEMENT); 1095 1096 element.setAttribute(NAME_ATTRIBUTE, name); 1096 element.setAttribute(LANGUAGE_ATTRIBUTE, Gatherer.config.getLanguage());1097 element.setAttribute(LANGUAGE_ATTRIBUTE, Configuration.getLanguage()); 1097 1098 element.setAttribute(ASSIGNED_ATTRIBUTE, TRUE_STR); 1098 1099 XMLTools.setValue(element, value); … … 1367 1368 String value_str = tokenizer.nextToken(); 1368 1369 if(name_str != null && value_str != null) { 1369 String language_str = Gatherer.config.getLanguage();1370 String language_str = Configuration.getLanguage(); 1370 1371 // Check if the value string is actually a language string 1371 1372 if(value_str.startsWith(LBRACKET_CHARACTER) && value_str.endsWith(RBRACKET_CHARACTER)) { -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r8055 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Gatherer; 35 36 import org.greenstone.gatherer.cdm.ClassifierManager; … … 215 216 boolean formats_changed = format_manager.formatsChanged(); 216 217 217 if(formats_changed && Gatherer.c_man.built() && Gatherer.config.exec_file != null) {218 if(formats_changed && Gatherer.c_man.built() && Configuration.exec_file != null) { 218 219 // Release the collection 219 220 Gatherer.self.configServer(GSDLSiteConfig.RELEASE_COMMAND + col_name); -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMeta.java
r8015 r8231 65 65 element = CollectionDesignManager.collect_config.document.createElement(StaticStrings.COLLECTIONMETADATA_ELEMENT); 66 66 element.setAttribute(StaticStrings.NAME_ATTRIBUTE, name); 67 element.setAttribute(StaticStrings.LANGUAGE_ATTRIBUTE, Gatherer.config.getLanguage());67 element.setAttribute(StaticStrings.LANGUAGE_ATTRIBUTE, Configuration.getLanguage()); 68 68 element.setAttribute(StaticStrings.ASSIGNED_ATTRIBUTE, StaticStrings.FALSE_STR); 69 69 } -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMetaManager.java
r6539 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Gatherer; 35 36 import org.greenstone.gatherer.cdm.CollectionDesignManager; … … 124 125 for(int i = 0; i < size; i++) { 125 126 CollectionMeta metadatum = (CollectionMeta) getElementAt(i); 126 if(metadatum.getName().equals(name) && metadatum.getLanguage().equals( Gatherer.config.getLanguage())) {127 if(metadatum.getName().equals(name) && metadatum.getLanguage().equals(Configuration.getLanguage())) { 127 128 Gatherer.println("Found '" + metadatum + "'"); 128 129 return metadatum; -
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r8002 r8231 37 37 import javax.swing.*; 38 38 import javax.swing.event.*; 39 import org.greenstone.gatherer.Configuration; 39 40 import org.greenstone.gatherer.Dictionary; 40 41 import org.greenstone.gatherer.Gatherer; … … 274 275 275 276 instructions_textarea = new JTextArea(); 276 instructions_textarea.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));277 instructions_textarea.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 277 278 instructions_textarea.setEditable(false); 278 279 instructions_textarea.setLineWrap(true); … … 323 324 324 325 editor_textarea = new JTextArea(); 325 editor_textarea.setBackground( Gatherer.config.getColor("coloring.editable_background", false));326 editor_textarea.setBackground(Configuration.getColor("coloring.editable_background", false)); 326 327 editor_textarea.setCaretPosition(0); 327 328 editor_textarea.setLineWrap(true); -
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r7365 r8231 213 213 Dictionary.registerText(creator_label, "CDM.General.Email.Creator"); 214 214 215 creator_emailfield = new EmailField( Gatherer.config.getColor("coloring.error_background", false));215 creator_emailfield = new EmailField(Configuration.getColor("coloring.error_background", false)); 216 216 Dictionary.registerTooltip(creator_emailfield, "CDM.General.Email.Creator_Tooltip"); 217 217 … … 219 219 Dictionary.registerText(maintainer_label, "CDM.General.Email.Maintainer"); 220 220 221 maintainer_emailfield = new EmailField( Gatherer.config.getColor("coloring.error_background", false));221 maintainer_emailfield = new EmailField(Configuration.getColor("coloring.error_background", false)); 222 222 Dictionary.registerTooltip(maintainer_emailfield, "CDM.General.Email.Maintainer_Tooltip"); 223 223 … … 230 230 JTextField short_name_textfield = new JTextField(Gatherer.c_man.getCollection().getName()); 231 231 short_name_textfield.setEditable(false); 232 short_name_textfield.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));232 short_name_textfield.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 233 233 JPanel icon_panel = new JPanel(); 234 234 icon_label = new JLabel(); … … 259 259 Dictionary.registerText(description_label, "CDM.General.Collection_Extra"); 260 260 description_textarea = new JTextArea(); 261 description_textarea.setBackground( Gatherer.config.getColor("coloring.editable_background", false));261 description_textarea.setBackground(Configuration.getColor("coloring.editable_background", false)); 262 262 Dictionary.registerTooltip(description_textarea, "CDM.General.Collection_Extra_Tooltip"); 263 263 // Connection … … 423 423 creator_collectionmeta.setValue(creator_email_str); 424 424 // If the email is currently empty, store this email 425 if( Gatherer.config.getEmail() == null) {426 Gatherer.config.setEmail(creator_email_str); // Store the email address in the configuration425 if(Configuration.getEmail() == null) { 426 Configuration.setEmail(creator_email_str); // Store the email address in the configuration 427 427 } 428 428 collection_extra_collectionmeta.setValue(description_textarea.getText()); … … 579 579 public DesignTree() { 580 580 super(); 581 resetModel( Gatherer.config.getMode());581 resetModel(Configuration.getMode()); 582 582 expandRow(0); 583 583 setRootVisible(false); -
trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java
r8002 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Dictionary; 35 36 import org.greenstone.gatherer.Gatherer; … … 958 959 index_combobox = new GComboBox(); 959 960 index_combobox.setPreferredSize(FIELD_SIZE); 960 index_combobox.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.editable_background", false));961 index_combobox.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));961 index_combobox.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false)); 962 index_combobox.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 962 963 index_combobox.setEditable(true); 963 index_combobox.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));964 index_combobox.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));964 index_combobox.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 965 index_combobox.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 965 966 Dictionary.registerTooltip(index_combobox, "CDM.IndexManager.MGPP.Index_Tooltip"); 966 967 … … 1090 1091 level_combobox = new GComboBox(Index.LEVEL); 1091 1092 level_combobox.setPreferredSize(FIELD_SIZE); 1092 level_combobox.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.editable_background", false));1093 level_combobox.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1093 level_combobox.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false)); 1094 level_combobox.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1094 1095 level_combobox.setEditable(true); 1095 level_combobox.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));1096 level_combobox.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1096 level_combobox.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 1097 level_combobox.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1097 1098 Dictionary.registerTooltip(level_combobox, "CDM.IndexManager.Level_Tooltip"); 1098 1099 -
trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java
r8002 r8231 38 38 import javax.swing.*; 39 39 import javax.swing.event.*; 40 import org.greenstone.gatherer.Configuration; 40 41 import org.greenstone.gatherer.Dictionary; 41 42 import org.greenstone.gatherer.Gatherer; … … 293 294 } 294 295 default_language_field.setPreferredSize(COMPONENT_SIZE); 295 default_language_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));296 default_language_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 296 297 default_language_field.setEditable(false); 297 298 JPanel control_panel = new JPanel(); … … 302 303 selector_combobox = new JComboBox(getLanguageCodes().toArray()); 303 304 selector_combobox.setPreferredSize(COMPONENT_SIZE); 304 selector_combobox.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));305 selector_combobox.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 305 306 selector_combobox.setRenderer(new LanguageListCellRenderer()); 306 307 Dictionary.registerTooltip(selector_combobox, "CDM.LanguageManager.Selector_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java
r8055 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Dictionary; 35 36 import org.greenstone.gatherer.Gatherer; … … 208 209 header_pane = new JPanel(); 209 210 instructions = new JTextArea(); 210 instructions.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));211 instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 211 212 instructions.setEditable(false); 212 213 instructions.setLineWrap(true); -
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r8152 r8231 380 380 if(Utility.isWindows()) { 381 381 args = new String[6]; 382 if( Gatherer.config.perl_path != null) {383 args[0] = Gatherer.config.perl_path;382 if(Configuration.perl_path != null) { 383 args[0] = Configuration.perl_path; 384 384 } 385 385 else { 386 386 args[0] = "Perl.exe"; 387 387 } 388 args[1] = Gatherer.config.gsdl_path + "bin" + File.separator + "script" + File.separator + "pluginfo.pl";388 args[1] = Configuration.gsdl_path + "bin" + File.separator + "script" + File.separator + "pluginfo.pl"; 389 389 args[2] = "-xml"; 390 390 args[3] = "-language"; … … 436 436 if (Gatherer.isGsdlRemote) { 437 437 438 String lang = Gatherer.config.getLanguage();438 String lang = Configuration.getLanguage(); 439 439 440 440 String launch = Gatherer.cgiBase + "launch"; … … 459 459 else { 460 460 // Retrieve the gsdl home directory... 461 String directory = Gatherer.config.gsdl_path;461 String directory = Configuration.gsdl_path; 462 462 directory = directory + "perllib" + File.separator + "plugins" + File.separator; 463 463 loadPlugIns(new File(directory)); … … 503 503 boolean is_mac = Utility.isMac(); 504 504 505 String current_lang = Gatherer.config.getLanguage();505 String current_lang = Configuration.getLanguage(); 506 506 if (num_plugins>0) { 507 507 // Create a progress indicator. … … 532 532 boolean is_windows = Utility.isWindows(); 533 533 boolean is_mac = Utility.isMac(); 534 String current_lang = Gatherer.config.getLanguage();534 String current_lang = Configuration.getLanguage(); 535 535 if(files != null) { 536 536 // Create a progress indicator. … … 729 729 730 730 instructions = new JTextArea(); 731 instructions.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));731 instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 732 732 instructions.setEditable(false); 733 733 instructions.setLineWrap(true); … … 752 752 PlugInComboboxListener picl = new PlugInComboboxListener(); 753 753 plugin = new GComboBox(getAvailable()); 754 plugin.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.editable_background", false));755 plugin.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));754 plugin.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false)); 755 plugin.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 756 756 plugin.setEditable(true); 757 plugin.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));758 plugin.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));757 plugin.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 758 plugin.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 759 759 picl.itemStateChanged(new ItemEvent(plugin, 0, null, ItemEvent.SELECTED)); 760 760 … … 818 818 plugin_list_pane.add(plugin_list_label, BorderLayout.NORTH); 819 819 plugin_list_pane.add(new JScrollPane(plugin_list), BorderLayout.CENTER); 820 modeChanged( Gatherer.config.getMode()); // Whether the movement buttons are visible is mode dependant820 modeChanged(Configuration.getMode()); // Whether the movement buttons are visible is mode dependant 821 821 822 822 plugin_label.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); -
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r8002 r8231 36 36 import javax.swing.*; 37 37 import javax.swing.event.*; 38 import org.greenstone.gatherer.Configuration; 38 39 import org.greenstone.gatherer.Dictionary; 39 40 import org.greenstone.gatherer.Gatherer; … … 210 211 search_type_combobox = new GComboBox(SEARCH_TYPES); 211 212 search_type_combobox.setPreferredSize(Utility.LABEL_SIZE); 212 search_type_combobox.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.editable_background", false));213 search_type_combobox.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));213 search_type_combobox.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false)); 214 search_type_combobox.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 214 215 search_type_combobox.setEditable(true); 215 216 search_type_combobox.setSelectedIndex(0); 216 search_type_combobox.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));217 search_type_combobox.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));217 search_type_combobox.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 218 search_type_combobox.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 218 219 Dictionary.registerTooltip(search_type_combobox, "CDM.SearchTypeManager.SearchType_Selection_Tooltip"); 219 220 -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java
r8002 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Dictionary; 35 36 import org.greenstone.gatherer.Gatherer; … … 246 247 } 247 248 default_value_field.setPreferredSize(Utility.LABEL_SIZE); 248 default_value_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));249 default_value_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 249 250 default_value_field.setEditable(false); 250 251 -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r8015 r8231 218 218 JPanel button_pane_1 = new JPanel(); 219 219 include_button = new JRadioButton(); 220 include_button.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));220 include_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 221 221 include_button.setMnemonic(KeyEvent.VK_I); 222 222 include_button.setOpaque(false); 223 223 Dictionary.registerText(include_button, "CDM.SubcollectionManager.Include"); 224 224 exclude_button = new JRadioButton(); 225 exclude_button.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));225 exclude_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 226 226 exclude_button.setMnemonic(KeyEvent.VK_X); 227 227 exclude_button.setOpaque(false); … … 268 268 JPanel message_pane = new JPanel(); 269 269 String args[] = new String[3]; 270 args[0] = Gatherer.config.getModeAsString();270 args[0] = Configuration.getModeAsString(); 271 271 args[1] = Dictionary.get("Preferences.Mode.Systems"); 272 272 args[2] = Dictionary.get("Preferences.Mode.Expert"); … … 347 347 border_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5)); 348 348 border_pane.setLayout(card_layout); 349 if( Gatherer.config.getMode() > Configuration.LIBRARIAN_MODE) {349 if(Configuration.getMode() > Configuration.LIBRARIAN_MODE) { 350 350 border_pane.add(tabbed_pane, ENABLED_CONTROLS); 351 351 border_pane.add(message_pane, DISABLED_CONTROLS); -
trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java
r8002 r8231 32 32 import javax.swing.*; 33 33 import javax.swing.event.*; 34 import org.greenstone.gatherer.Configuration; 34 35 import org.greenstone.gatherer.Dictionary; 35 36 import org.greenstone.gatherer.Gatherer; … … 126 127 127 128 JTextArea instructions = new JTextArea(); 128 instructions.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));129 instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 129 130 instructions.setCaretPosition(0); 130 131 instructions.setEditable(false); … … 193 194 File gsdl_collection_directory; 194 195 if (Gatherer.GS3) { 195 gsdl_collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));196 gsdl_collection_directory = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 196 197 } else { 197 gsdl_collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));198 gsdl_collection_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 198 199 } 199 200 current_coll_name = Gatherer.c_man.getCollection().getName(); -
trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java
r7157 r8231 33 33 import javax.swing.event.*; 34 34 import javax.swing.table.*; 35 import org.greenstone.gatherer.Configuration; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 220 221 fragment_table = new JTable(fragment_table_model); 221 222 fragment_table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); 222 fragment_table.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));223 fragment_table.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 223 224 fragment_table.setColumnSelectionAllowed(false); 224 225 fragment_table.setDefaultRenderer(Object.class, new FragmentTableRenderer()); … … 226 227 227 228 JScrollPane table_scroll = new JScrollPane(fragment_table); 228 table_scroll.getViewport().setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));229 table_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 229 230 table_scroll.setOpaque(true); 230 231 … … 245 246 Dictionary.registerText(default_label, "CDM.TranslationManager.Default_Text"); 246 247 default_area = new JTextArea(); 247 default_area.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));248 default_area.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 248 249 default_area.setEditable(false); 249 250 default_area.setLineWrap(true); … … 254 255 Dictionary.registerText(translation_label, "CDM.TranslationManager.Translation"); 255 256 translation_area = new JTextArea(); 256 translation_area.setBackground( Gatherer.config.getColor("coloring.disabled", false));257 translation_area.setBackground(Configuration.getColor("coloring.disabled", false)); 257 258 translation_area.setEnabled(false); 258 259 translation_area.setLineWrap(true); … … 466 467 // Update and enable the text area 467 468 translation_area.setEnabled(true); 468 translation_area.setBackground( Gatherer.config.getColor("coloring.editable_background", false));469 translation_area.setBackground(Configuration.getColor("coloring.editable_background", false)); 469 470 } 470 471 else { … … 476 477 translation_area.setText(""); 477 478 translation_area.setEnabled(false); 478 translation_area.setBackground( Gatherer.config.getColor("coloring.disabled", false));479 translation_area.setBackground(Configuration.getColor("coloring.disabled", false)); 479 480 } 480 481 } … … 654 655 JComponent component = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); 655 656 if(isSelected) { 656 component.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", false));657 component.setBackground(Configuration.getColor("coloring.workspace_heading_background", false)); 657 658 } 658 659 else { 659 component.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));660 component.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 660 661 } 661 662 return component; … … 683 684 // Ready the text area 684 685 translation_area.setEnabled(true); 685 translation_area.setBackground( Gatherer.config.getColor("coloring.editable_background", false));686 translation_area.setBackground(Configuration.getColor("coloring.editable_background", false)); 686 687 ignore_event = false; 687 688 } -
trunk/gli/src/org/greenstone/gatherer/collection/BuildOptions.java
r8015 r8231 6 6 import java.util.*; 7 7 import org.apache.xerces.parsers.DOMParser; 8 import org.greenstone.gatherer.Configuration; 8 9 import org.greenstone.gatherer.Gatherer; 9 10 import org.greenstone.gatherer.cdm.Argument; … … 45 46 public BuildOptions(Element build_values_element, Element import_values_element) { 46 47 // first check the saved arguments language 47 String interface_lang = Gatherer.config.getLanguage();48 String args_lang = Gatherer.config.getArgumentsLanguage();48 String interface_lang = Configuration.getLanguage(); 49 String args_lang = Configuration.getArgumentsLanguage(); 49 50 if (interface_lang.equals(args_lang)) { 50 51 // Try to retrieve the arguments for import and build. 51 build_arguments_element = Gatherer.config.getArguments("buildcol.pl");52 import_arguments_element = Gatherer.config.getArguments("import.pl");52 build_arguments_element = Configuration.getArguments("buildcol.pl"); 53 import_arguments_element = Configuration.getArguments("import.pl"); 53 54 } 54 55 // If that fails try to reconstruct the arguments … … 73 74 // By now we should definately have the arguments. However the reason we are here is because they are not stored in the config.xml file, to make sure they are stored now. 74 75 if (used_defaults) { 75 Gatherer.config.setArgumentsLanguage("en");76 Configuration.setArgumentsLanguage("en"); 76 77 } else { 77 Gatherer.config.setArgumentsLanguage(interface_lang);78 } 79 Gatherer.config.setArguments(build_arguments_element);80 Gatherer.config.setArguments(import_arguments_element);78 Configuration.setArgumentsLanguage(interface_lang); 79 } 80 Configuration.setArguments(build_arguments_element); 81 Configuration.setArguments(import_arguments_element); 81 82 } 82 83 else { … … 397 398 if(Utility.isWindows()) { 398 399 args = new String[6]; 399 args[0] = Gatherer.config.perl_path;400 args[0] = Configuration.perl_path; 400 401 args[1] = "-S"; 401 args[2] = Gatherer.config.getScriptPath() + filename;402 args[2] = Configuration.getScriptPath() + filename; 402 403 args[3] = "-xml"; 403 404 args[4] = "-language"; … … 406 407 else { 407 408 args = new String[4]; 408 args[0] = Gatherer.config.getScriptPath() + filename;409 args[0] = Configuration.getScriptPath() + filename; 409 410 args[1] = "-xml"; 410 411 args[2] = "-language"; -
trunk/gli/src/org/greenstone/gatherer/collection/Collection.java
r8015 r8231 41 41 import javax.swing.*; 42 42 import javax.swing.tree.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Gatherer; 44 45 import org.greenstone.gatherer.cdm.CollectionDesignManager; … … 105 106 } 106 107 // Point the Configuration class at our gatherer config arguments. 107 Gatherer.config.setCollectionConfiguration(document);108 Configuration.setCollectionConfiguration(document); 108 109 // Finally create all of the child managers that are directly dependant on a collection 109 110 build_options = new BuildOptions(getBuildValues(), getImportValues()); … … 119 120 gdm.destroy(); 120 121 msm.destroy(); 121 Gatherer.config.setCollectionConfiguration(null);122 Configuration.setCollectionConfiguration(null); 122 123 cdm = null; 123 124 document = null; -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r8214 r8231 44 44 import javax.swing.filechooser.FileSystemView; 45 45 import javax.swing.tree.*; 46 import org.greenstone.gatherer.Configuration; 46 47 import org.greenstone.gatherer.Dictionary; 47 48 import org.greenstone.gatherer.Gatherer; … … 133 134 public void addDirectoryMapping(String name, File file) { 134 135 // Update the information stored in the Gatherer config 135 Gatherer.config.addDirectoryMapping(name, file);136 Configuration.addDirectoryMapping(name, file); 136 137 // Now update the tree 137 138 Gatherer.g_man.refreshWorkspaceTree(WorkspaceTree.FOLDER_SHORTCUTS_CHANGED); … … 150 151 Gatherer.println("CollectionManager.buildCollection()"); 151 152 building = true; 152 String lang = Gatherer.config.getLanguage();153 String lang = Configuration.getLanguage(); 153 154 String collect_dir = getCollectDirectory(); 154 155 … … 156 157 if((Utility.isWindows()) && (!Gatherer.isGsdlRemote)) { 157 158 args = new String[8]; 158 args[0] = Gatherer.config.perl_path;159 args[0] = Configuration.perl_path; 159 160 args[1] = "-S"; 160 args[2] = Gatherer.config.getScriptPath() + "buildcol.pl";161 args[2] = Configuration.getScriptPath() + "buildcol.pl"; 161 162 args[3] = "-gli"; 162 163 args[4] = "-language"; … … 167 168 else { 168 169 args = new String[6]; 169 args[0] = Gatherer.config.getScriptPath() + "buildcol.pl";170 args[0] = Configuration.getScriptPath() + "buildcol.pl"; 170 171 args[1] = "-gli"; 171 172 args[2] = "-language"; … … 219 220 String collection_dir; 220 221 if (Gatherer.GS3) { 221 collection_dir = Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName());222 collection_dir = Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName()); 222 223 } else { 223 collection_dir = Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName());224 collection_dir = Utility.getCollectionDir(Configuration.gsdl_path, collection.getName()); 224 225 225 226 } … … 233 234 collection_model = null; 234 235 // workspace_model = null; 235 Gatherer.config.setCollectionConfiguration(null);236 Configuration.setCollectionConfiguration(null); 236 237 if (Gatherer.g_man != null) { 237 238 Gatherer.g_man.collectionChanged(false); … … 255 256 if((Utility.isWindows()) && (!Gatherer.isGsdlRemote)) { 256 257 command = new String[6]; 257 command[0] = Gatherer.config.perl_path;258 command[0] = Configuration.perl_path; 258 259 command[1] = "-S"; 259 command[2] = Gatherer.config.getGS3ScriptPath() + "convert_coll_from_gs2.pl";260 command[2] = Configuration.getGS3ScriptPath() + "convert_coll_from_gs2.pl"; 260 261 command[3] = "-collectdir"; 261 262 command[4] = collect_dir; … … 263 264 } else { 264 265 command = new String[4]; 265 command[0] = Gatherer.config.getGS3ScriptPath() + "convert_coll_from_gs2.pl";266 command[0] = Configuration.getGS3ScriptPath() + "convert_coll_from_gs2.pl"; 266 267 command[1] = "-collectdir"; 267 268 command[2] = collect_dir; … … 341 342 String a_dir; 342 343 if (Gatherer.GS3) { 343 a_dir = Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, name);344 a_dir = Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, name); 344 345 } else { 345 a_dir = Utility.getCollectionDir( Gatherer.config.gsdl_path, name);346 a_dir = Utility.getCollectionDir(Configuration.gsdl_path, name); 346 347 } 347 348 File config_file = new File(Utility.getConfigFile(a_dir)); … … 599 600 public String getCollectionArchive() { 600 601 if (Gatherer.GS3) { 601 return Utility.getArchiveDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));602 return Utility.getArchiveDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 602 603 } else { 603 return Utility.getArchiveDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));604 return Utility.getArchiveDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 604 605 } 605 606 } … … 613 614 public String getCollectionBuild() { 614 615 if (Gatherer.GS3) { 615 return Utility.getBuildDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));616 return Utility.getBuildDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 616 617 } else { 617 return Utility.getBuildDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));618 return Utility.getBuildDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 618 619 } 619 620 } … … 627 628 public String getCollectionConfig() { 628 629 if (Gatherer.GS3) { 629 return Utility.getConfigFile(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));630 return Utility.getConfigFile(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 630 631 } else { 631 return Utility.getConfigFile(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));632 return Utility.getConfigFile(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 632 633 } 633 634 } … … 642 643 public String getCollectionDirectory() { 643 644 if (Gatherer.GS3) { 644 return Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName());645 return Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName()); 645 646 } else { 646 return Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName());647 return Utility.getCollectionDir(Configuration.gsdl_path, collection.getName()); 647 648 } 648 649 } … … 657 658 public String getCollectionEtc() { 658 659 if (Gatherer.GS3) { 659 return Utility.getEtcDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));660 return Utility.getEtcDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 660 661 } else { 661 return Utility.getEtcDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));662 return Utility.getEtcDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 662 663 } 663 664 } … … 671 672 public String getCollectionFilename() { 672 673 if (Gatherer.GS3) { 673 return Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()) + collection.getName() + ".col";674 return Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName()) + collection.getName() + ".col"; 674 675 } else { 675 return Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()) + collection.getName() + ".col";676 return Utility.getCollectionDir(Configuration.gsdl_path, collection.getName()) + collection.getName() + ".col"; 676 677 } 677 678 } … … 685 686 public String getCollectionImages() { 686 687 if (Gatherer.GS3) { 687 return Utility.getImagesDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));688 return Utility.getImagesDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 688 689 } else { 689 return Utility.getImagesDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));690 return Utility.getImagesDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 690 691 } 691 692 } … … 699 700 public String getCollectionImport() { 700 701 if (Gatherer.GS3) { 701 return Utility.getImportDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));702 return Utility.getImportDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 702 703 } else { 703 return Utility.getImportDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));704 return Utility.getImportDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 704 705 } 705 706 } … … 713 714 public String getCollectionIndex() { 714 715 if (Gatherer.GS3) { 715 return Utility.getIndexDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));716 return Utility.getIndexDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 716 717 } else { 717 return Utility.getIndexDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));718 return Utility.getIndexDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 718 719 } 719 720 } … … 727 728 public String getCollectionLog() { 728 729 if (Gatherer.GS3) { 729 return Utility.getLogDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));730 return Utility.getLogDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 730 731 } else { 731 return Utility.getLogDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));732 return Utility.getLogDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 732 733 } 733 734 } … … 741 742 public String getCollectionMetadata() { 742 743 if (Gatherer.GS3) { 743 return Utility.getMetadataDir(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getName()));744 return Utility.getMetadataDir(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getName())); 744 745 } else { 745 return Utility.getMetadataDir(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getName()));746 return Utility.getMetadataDir(Utility.getCollectionDir(Configuration.gsdl_path, collection.getName())); 746 747 } 747 748 } … … 784 785 { 785 786 // Return any predefined special directories 786 HashMap mappings = Gatherer.config.getDirectoryMappings();787 HashMap mappings = Configuration.getDirectoryMappings(); 787 788 FileNode[] mapping_nodes = new FileNode[mappings.size()]; 788 789 Iterator mappings_iterator = mappings.keySet().iterator(); … … 845 846 846 847 String args[]; 847 String lang = Gatherer.config.getLanguage();848 String lang = Configuration.getLanguage(); 848 849 if((Utility.isWindows()) && (!Gatherer.isGsdlRemote)) { 849 850 args = new String[8]; 850 args[0] = Gatherer.config.perl_path;851 args[0] = Configuration.perl_path; 851 852 args[1] = "-S"; 852 args[2] = Gatherer.config.getScriptPath() + "import.pl";853 args[2] = Configuration.getScriptPath() + "import.pl"; 853 854 args[3] = "-gli"; 854 855 args[4] = "-language"; … … 859 860 else { 860 861 args = new String[6]; 861 args[0] = Gatherer.config.getScriptPath() + "import.pl";862 args[0] = Configuration.getScriptPath() + "import.pl"; 862 863 args[1] = "-gli"; 863 864 args[2] = "-language"; … … 1055 1056 if(description == null || title == null) { 1056 1057 command = new String[8]; 1057 command[0] = Gatherer.config.perl_path;1058 command[0] = Configuration.perl_path; 1058 1059 command[1] = "-S"; 1059 command[2] = Gatherer.config.getScriptPath() + "mkcol.pl";1060 command[2] = Configuration.getScriptPath() + "mkcol.pl"; 1060 1061 command[3] = "-collectdir"; 1061 1062 command[4] = collect_dir; … … 1067 1068 else if(email == null) { 1068 1069 command = new String[12]; 1069 command[0] = Gatherer.config.perl_path;1070 command[0] = Configuration.perl_path; 1070 1071 command[1] = "-S"; 1071 command[2] = Gatherer.config.getScriptPath() + "mkcol.pl";1072 command[2] = Configuration.getScriptPath() + "mkcol.pl"; 1072 1073 command[3] = "-collectdir"; 1073 1074 command[4] = collect_dir; … … 1082 1083 else { 1083 1084 command = new String[14]; 1084 command[0] = Gatherer.config.perl_path;1085 command[0] = Configuration.perl_path; 1085 1086 command[1] = "-S"; 1086 command[2] = Gatherer.config.getScriptPath() + "mkcol.pl";1087 command[2] = Configuration.getScriptPath() + "mkcol.pl"; 1087 1088 command[3] = "-collectdir"; 1088 1089 command[4] = collect_dir; … … 1186 1187 if(installCollection()) { 1187 1188 // If we have a local library running (that we know about) then we ask it to add our newly create collection 1188 if ( Gatherer.config.exec_file != null) {1189 if (Configuration.exec_file != null) { 1189 1190 Gatherer.self.configServer(GSDLSiteConfig.ADD_COMMAND + collection.getName()); 1190 1191 // This is very important -- it ensures that the above command has finished … … 1193 1194 else if (Gatherer.GS3) { 1194 1195 convertToGS3Collection(); 1195 Gatherer.self.configGS3Server( Gatherer.config.site_name, ServletConfiguration.ADD_COMMAND + collection.getName());1196 Gatherer.self.configGS3Server(Configuration.site_name, ServletConfiguration.ADD_COMMAND + collection.getName()); 1196 1197 } 1197 1198 … … 1276 1277 public File removeDirectoryMapping(FileNode target) { 1277 1278 // Remove from config, remembering file 1278 File file = Gatherer.config.removeDirectoryMapping(target.toString());1279 File file = Configuration.removeDirectoryMapping(target.toString()); 1279 1280 // Update tree. 1280 1281 Gatherer.g_man.refreshWorkspaceTree(WorkspaceTree.FOLDER_SHORTCUTS_CHANGED); … … 1333 1334 /* private void updatePrivateWorkspace(DefaultTreeModel model) { 1334 1335 // Add Private workspace if a collection has been loaded. 1335 if(ready() && ! Gatherer.config.get("workflow.mirror", true)) {1336 if(ready() && !Configuration.get("workflow.mirror", true)) { 1336 1337 FileNode root = (FileNode)model.getRoot(); 1337 1338 // Remove old private workspace … … 1409 1410 String collect_dir; 1410 1411 if (Gatherer.GS3) { 1411 collect_dir = Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name);1412 collect_dir = Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name); 1412 1413 } else { 1413 collect_dir = Utility.getCollectDir( Gatherer.config.gsdl_path);1414 collect_dir = Utility.getCollectDir(Configuration.gsdl_path); 1414 1415 } 1415 1416 … … 1431 1432 try { 1432 1433 // We have to ensure that the local library has released this collection so we can delete the index directory 1433 if (!Gatherer.GS3 && Gatherer.config.exec_file != null) {1434 if (!Gatherer.GS3 && Configuration.exec_file != null) { 1434 1435 Gatherer.self.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getName()); 1435 1436 -
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r7740 r8231 43 43 import javax.swing.*; 44 44 import javax.swing.event.*; 45 import org.greenstone.gatherer.Configuration; 45 46 import org.greenstone.gatherer.Dictionary; 46 47 import org.greenstone.gatherer.Gatherer; … … 104 105 details = new JTextArea(); 105 106 details.setEditable(false); 106 details.setFont( Gatherer.config.getFont("general.tooltip_font", false));107 details.setFont(Configuration.getFont("general.tooltip_font", false)); 107 108 Dictionary.setText(details, "DeleteCollectionPrompt.No_Collection"); 108 109 details_label = new JLabel(); … … 188 189 189 190 // Center and display. 190 Dimension screen_size = Gatherer.config.screen_size;191 Dimension screen_size = Configuration.screen_size; 191 192 this.setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 192 193 this.setVisible(true); // blocks until the dialog is killed … … 220 221 File collect_directory; 221 222 if (Gatherer.GS3) { 222 collect_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));223 collect_directory = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 223 224 } else { 224 collect_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));225 collect_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 225 226 } 226 227 if(collect_directory.exists()) { … … 309 310 310 311 // first of all we must release it from the local library 311 if ( Gatherer.config.exec_file != null) {312 if (Configuration.exec_file != null) { 312 313 ///ystem.err.println("Local Library Found!"); 313 314 Gatherer.self.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getShortName()); … … 356 357 File delete_me; 357 358 if (Gatherer.GS3) { 358 delete_me = new File(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, collection.getShortName()));359 delete_me = new File(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, collection.getShortName())); 359 360 } else { 360 delete_me = new File(Utility.getCollectionDir( Gatherer.config.gsdl_path, collection.getShortName()));361 delete_me = new File(Utility.getCollectionDir(Configuration.gsdl_path, collection.getShortName())); 361 362 } 362 363 if (Utility.delete(delete_me)) { -
trunk/gli/src/org/greenstone/gatherer/collection/DownloadJob.java
r7699 r8231 42 42 import java.util.*; 43 43 import javax.swing.tree.*; 44 import org.greenstone.gatherer.Configuration; 44 45 import org.greenstone.gatherer.Dictionary; 45 46 import org.greenstone.gatherer.Gatherer; … … 206 207 207 208 // want to always download newer files, convert non-relative links to relative, always use directories, and only try twice to get a file before giving up 208 String command = Gatherer.config.getWGetPath() + " -N -k -x -t 2 "; // + " -nc -c ";209 String command = Configuration.getWGetPath() + " -N -k -x -t 2 "; // + " -nc -c "; 209 210 210 211 if (no_parents) { … … 225 226 String proxy_url = ""; 226 227 // Determine if we have to use a proxy. 227 if( Gatherer.config.get("general.use_proxy", true)) {228 String proxy_host = Gatherer.config.getString("general.proxy_host", true);229 String proxy_port = Gatherer.config.getString("general.proxy_port", true);228 if(Configuration.get("general.use_proxy", true)) { 229 String proxy_host = Configuration.getString("general.proxy_host", true); 230 String proxy_port = Configuration.getString("general.proxy_port", true); 230 231 // Find out whether the user has already authenticated themselves 231 232 String user_pass = null; -
trunk/gli/src/org/greenstone/gatherer/collection/ExportCollectionPrompt.java
r7326 r8231 45 45 import org.greenstone.gatherer.checklist.CheckList; 46 46 import org.greenstone.gatherer.checklist.Entry; 47 import org.greenstone.gatherer.Configuration; 47 48 import org.greenstone.gatherer.Dictionary; 48 49 import org.greenstone.gatherer.Gatherer; … … 120 121 details_textarea = new JTextArea(); 121 122 details_textarea.setEditable(false); 122 details_textarea.setFont( Gatherer.config.getFont("general.tooltip_font", false));123 details_textarea.setFont(Configuration.getFont("general.tooltip_font", false)); 123 124 Dictionary.setText(details_textarea, "DeleteCollectionPrompt.No_Collection"); 124 125 details_label = new JLabel(); … … 232 233 233 234 // Center and display. 234 Dimension screen_size = Gatherer.config.screen_size;235 Dimension screen_size = Configuration.screen_size; 235 236 this.setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 236 237 this.setVisible(true); // blocks until the dialog is killed … … 268 269 if(Utility.isWindows()) { 269 270 args = new String[num_args+2]; 270 args[0] = Gatherer.config.perl_path;271 args[0] = Configuration.perl_path; 271 272 args[1] = "-S"; 272 273 next_arg = 2; … … 275 276 } 276 277 277 args[next_arg] = Gatherer.config.getScriptPath() + "exportcol.pl";278 args[next_arg] = Configuration.getScriptPath() + "exportcol.pl"; 278 279 next_arg++; 279 280 args[next_arg] = "-gli"; next_arg++; 280 281 args[next_arg] = "-language"; next_arg++; 281 args[next_arg] = Gatherer.config.getLanguage(); next_arg++;282 args[next_arg] = Configuration.getLanguage(); next_arg++; 282 283 283 284 if (has_title) { … … 317 318 318 319 args[0] = coll_names.toString(); 319 args[1] = Gatherer.config.gsdl_path+"tmp"+File.separator;320 args[1] = Configuration.gsdl_path+"tmp"+File.separator; 320 321 if(cd_title.equals("")) { 321 322 args[1] += "exported_collections"; … … 347 348 File collect_directory; 348 349 if (Gatherer.GS3) { 349 collect_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));350 collect_directory = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 350 351 } else { 351 collect_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));352 collect_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 352 353 } 353 354 if(collect_directory.exists()) { -
trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java
r8043 r8231 40 40 import java.util.*; 41 41 import javax.swing.*; 42 import org.greenstone.gatherer.Configuration; 42 43 import org.greenstone.gatherer.Gatherer; 43 44 import org.greenstone.gatherer.collection.Collection; … … 164 165 File copied_dir; 165 166 if (Gatherer.GS3) { 166 copied_dir = new File(Utility.getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, name));167 copied_dir = new File(Utility.getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, name)); 167 168 } else { 168 copied_dir = new File(Utility.getCollectionDir( Gatherer.config.gsdl_path, name));169 copied_dir = new File(Utility.getCollectionDir(Configuration.gsdl_path, name)); 169 170 } 170 171 files.add(collection_file.getParentFile()); -
trunk/gli/src/org/greenstone/gatherer/file/FileAssociationManager.java
r8015 r8231 29 29 import java.io.*; 30 30 import javax.swing.table.*; 31 import org.greenstone.gatherer.Configuration; 31 32 import org.greenstone.gatherer.Dictionary; 32 33 import org.greenstone.gatherer.Gatherer; … … 51 52 public FileAssociationManager() { 52 53 // Retrieve the associations_element from the config 53 associations_element = Gatherer.config.getFileAssociations();54 associations_element = Configuration.getFileAssociations(); 54 55 // Initialize the associations. This involves looking through all current associations searching for those with a command of "". 55 56 if(associations_element != null) { … … 92 93 Gatherer.println("Get browser command: " + url); 93 94 // First off we try to retrieve one from the configuration 94 String command = Gatherer.config.getPreviewCommand();95 String command = Configuration.getPreviewCommand(); 95 96 // If that worked, substitute in the url and return 96 97 if(command != null && command.length() > 0) { … … 131 132 // Store the result if any 132 133 if(command != null && !command.equals("")) { 133 Gatherer.config.setPreviewCommand(command);134 Configuration.setPreviewCommand(command); 134 135 command = command.replaceAll(FILENAME_ARG, url); 135 136 Gatherer.println("Result = " + command); -
trunk/gli/src/org/greenstone/gatherer/file/FileNode.java
r7641 r8231 7 7 import javax.swing.filechooser.*; 8 8 import javax.swing.tree.*; 9 import org.greenstone.gatherer.Configuration; 9 10 import org.greenstone.gatherer.Dictionary; 10 11 import org.greenstone.gatherer.Gatherer; … … 272 273 // the Greenstone collections folder for GS3 - this contains a 273 274 // folder for each site 274 File start = new File(Utility.getSitesDir( Gatherer.config.gsdl3_path));275 File start = new File(Utility.getSitesDir(Configuration.gsdl3_path)); 275 276 File sites[] = start.listFiles(); 276 277 ArrayTools.sort(sites); … … 297 298 File start; 298 299 if (gs3_site) { 299 start = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, title));300 start = new File(Utility.getCollectDir(Configuration.gsdl3_path, title)); 300 301 } else { 301 start = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));302 start = new File(Utility.getCollectDir(Configuration.gsdl_path)); 302 303 } 303 304 File cols[] = start.listFiles(); -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r8041 r8231 90 90 Dictionary.setText(file_status, "FileActions.Selected", args); 91 91 progress = new LongProgressBar(); 92 progress.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));93 progress.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));92 progress.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 93 progress.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 94 94 progress.setString(Dictionary.get("FileActions.No_Activity")); 95 95 progress.setStringPainted(true); … … 234 234 235 235 // The number one thing to check is whether we are in a cyclic loop. The easiest way is just to check how deep we are 236 int max_folder_depth = Gatherer.config.getInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC);236 int max_folder_depth = Configuration.getInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC); 237 237 boolean continue_over_depth = false; 238 238 if(FileManager.countFolderDepth(source_file) > max_folder_depth) { … … 248 248 case 2: // Continue and increase depth 249 249 continue_over_depth = true; 250 Gatherer.config.setInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC, (max_folder_depth + 1));250 Configuration.setInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC, (max_folder_depth + 1)); 251 251 break; 252 252 } -
trunk/gli/src/org/greenstone/gatherer/file/RecycleBin.java
r8045 r8231 46 46 import javax.swing.*; 47 47 import javax.swing.tree.*; 48 import org.greenstone.gatherer.Configuration; 48 49 import org.greenstone.gatherer.Gatherer; 49 50 import org.greenstone.gatherer.file.FileNode; … … 77 78 this.drop_target = new DropTarget(this, drag_action, this, true); 78 79 79 setBackground( Gatherer.config.getColor("coloring.button_background", true));80 setForeground( Gatherer.config.getColor("coloring.button_foreground", true));80 setBackground(Configuration.getColor("coloring.button_background", true)); 81 setForeground(Configuration.getColor("coloring.button_foreground", true)); 81 82 setOpaque(true); 82 83 … … 93 94 public void dragEnter(DropTargetDragEvent event) { 94 95 group.grabFocus(this); 95 setBackground( Gatherer.config.getColor("coloring.button_selected_background", true));96 setForeground( Gatherer.config.getColor("coloring.button_selected_foreground", true));96 setBackground(Configuration.getColor("coloring.button_selected_background", true)); 97 setForeground(Configuration.getColor("coloring.button_selected_foreground", true)); 97 98 } 98 99 99 100 /** Any implementation of DropTargetListener must include this method so we can be notified when the drag focus leaves this component. We need to indicate that we have lost focus. */ 100 101 public void dragExit(DropTargetEvent event) { 101 setBackground( Gatherer.config.getColor("coloring.button_background", true));102 setForeground( Gatherer.config.getColor("coloring.button_foreground", true));102 setBackground(Configuration.getColor("coloring.button_background", true)); 103 setForeground(Configuration.getColor("coloring.button_foreground", true)); 103 104 } 104 105 … … 125 126 ignore = true; 126 127 group.grabFocus(this); 127 setBackground( Gatherer.config.getColor("coloring.button_background", true));128 setForeground( Gatherer.config.getColor("coloring.button_foreground", true));128 setBackground(Configuration.getColor("coloring.button_background", true)); 129 setForeground(Configuration.getColor("coloring.button_foreground", true)); 129 130 Transferable transferable = event.getTransferable(); 130 131 try { -
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r7521 r8231 292 292 } 293 293 // If we are in simple mode, we have to rebuild the simple arguments list 294 if( Gatherer.config.getMode() < THRESHOLD) {294 if(Configuration.getMode() < THRESHOLD) { 295 295 souter_panel.remove(sargument_configuration_scroll); 296 296 souter_panel.remove(sinner_panel); … … 305 305 306 306 // now do the preview stuff 307 if (!Gatherer.c_man.built() || Gatherer.config.exec_address == null) {307 if (!Gatherer.c_man.built() || Configuration.exec_address == null) { 308 308 preview_button.setEnabled(false); 309 309 simple_preview_button.setEnabled(false); … … 326 326 public void display() { 327 327 328 int current_mode = Gatherer.config.getMode();328 int current_mode = Configuration.getMode(); 329 329 330 330 // Build control_pane … … 438 438 */ 439 439 public void gainFocus() { 440 if( Gatherer.config.getMode() < THRESHOLD) {440 if(Configuration.getMode() < THRESHOLD) { 441 441 card_layout.show(main_pane, SIMPLE); 442 442 } … … 479 479 public void modeChanged(int mode) { 480 480 // If we are below the complexity threshold ensure the simple controls are being shown 481 if( Gatherer.config.getMode() < THRESHOLD) {481 if(Configuration.getMode() < THRESHOLD) { 482 482 // Update the arguments 483 483 souter_panel.remove(sargument_configuration_scroll); … … 544 544 build_monitor.reset(); 545 545 import_monitor.reset(); 546 if( Gatherer.config.getMode() >= THRESHOLD) {546 if(Configuration.getMode() >= THRESHOLD) { 547 547 control_pane.add(button_pane, BorderLayout.SOUTH); 548 548 card_layout.show(main_pane, CONTROL); … … 568 568 } 569 569 options_pane.resetFileEntry(); 570 if( Gatherer.config.getMode() >= THRESHOLD) {570 if(Configuration.getMode() >= THRESHOLD) { 571 571 control_pane.add(button_pane, BorderLayout.SOUTH); 572 572 card_layout.show(main_pane, CONTROL); … … 578 578 // set up the home page for the current collection 579 579 Collection current_collection = Gatherer.c_man.getCollection(); 580 String site = Gatherer.config.site_name; // for GS3 colls580 String site = Configuration.site_name; // for GS3 colls 581 581 String extra_args = ""; 582 582 SearchTypeManager st_man = current_collection.cdm.searchtype_manager; … … 598 598 // Remember to add unique timestamp 599 599 if (Gatherer.GS3) { 600 homepage = Gatherer.config.exec_address.toString() + Gatherer.config.getServletPath()+ "?a=p&sa=about&c=" + current_collection.getName()+"&l="+Gatherer.config.getLanguage(); //+extra_args + StaticStrings.TIMESTAMP_ARGUMENT + System.currentTimeMillis();600 homepage = Configuration.exec_address.toString() + Configuration.getServletPath()+ "?a=p&sa=about&c=" + current_collection.getName()+"&l="+Configuration.getLanguage(); //+extra_args + StaticStrings.TIMESTAMP_ARGUMENT + System.currentTimeMillis(); 601 601 } else { 602 homepage = Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + current_collection.getName()+"&l="+Gatherer.config.getLanguage()+extra_args + StaticStrings.TIMESTAMP_ARGUMENT + System.currentTimeMillis();602 homepage = Configuration.exec_address.toString() + "?a=p&p=about&c=" + current_collection.getName()+"&l="+Configuration.getLanguage()+extra_args + StaticStrings.TIMESTAMP_ARGUMENT + System.currentTimeMillis(); 603 603 } 604 604 } … … 620 620 621 621 // Remember that for lower thresholds the above doesn't work, so try this instead 622 if( Gatherer.config.getMode() < THRESHOLD) {622 if(Configuration.getMode() < THRESHOLD) { 623 623 options_pane.update(sargument_configuration_panel); 624 624 } … … 638 638 // Change the view. 639 639 processing = true; 640 if( Gatherer.config.getMode() >= THRESHOLD) {640 if(Configuration.getMode() >= THRESHOLD) { 641 641 progress_pane.add(button_pane, BorderLayout.SOUTH); 642 642 card_layout.show(main_pane, PROGRESS); … … 674 674 processing = false; 675 675 document.setSpecialCharacter(OptionsPane.CANCELLED); 676 if( Gatherer.config.getMode() >= THRESHOLD) {676 if(Configuration.getMode() >= THRESHOLD) { 677 677 control_pane.add(button_pane, BorderLayout.SOUTH); 678 678 card_layout.show(main_pane, CONTROL); -
trunk/gli/src/org/greenstone/gatherer/gui/EditorDialog.java
r7246 r8231 40 40 import java.awt.event.*; 41 41 import javax.swing.*; 42 import org.greenstone.gatherer.Configuration; 42 43 import org.greenstone.gatherer.Dictionary; 43 44 import org.greenstone.gatherer.Gatherer; … … 134 135 content_pane.add(button_pane, BorderLayout.SOUTH); 135 136 136 Dimension screen_size = Gatherer.config.screen_size;137 Dimension screen_size = Configuration.screen_size; 137 138 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 138 139 setVisible(true); -
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r8004 r8231 324 324 Dictionary.registerText(collection_label, "Collection.Collection"); 325 325 // Update label coloring. 326 collection_label.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));327 collection_label.setForeground( Gatherer.config.getColor("coloring.collection_heading_foreground", false));326 collection_label.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 327 collection_label.setForeground(Configuration.getColor("coloring.collection_heading_foreground", false)); 328 328 collection_tree.setModel(collection_model); 329 329 // Update tree coloring. 330 collection_tree.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));331 collection_tree.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));330 collection_tree.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 331 collection_tree.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 332 332 // Register our msm dependant components (or correctly their models) with msm. 333 333 if (model != null) { … … 400 400 401 401 filter = Gatherer.g_man.getFilter(collection_tree); 402 filter.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));403 filter.setEditable( Gatherer.config.getMode() > Configuration.LIBRARIAN_MODE);402 filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 403 filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); 404 404 Dictionary.registerTooltip(filter.getComboBox(), "Collection.Filter_Tooltip"); 405 405 … … 433 433 434 434 table_label = new JTextField(); 435 table_label.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));435 table_label.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 436 436 table_label.setEditable(false); 437 437 Dictionary.registerText(table_label, "MetaEdit.No_File"); … … 494 494 495 495 JScrollPane table_scroll = new JScrollPane(table); 496 table_scroll.getViewport().setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));496 table_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 497 497 table_scroll.setOpaque(true); 498 498 … … 1202 1202 super(); 1203 1203 1204 setFont( Gatherer.config.getFont("general.font", false));1204 setFont(Configuration.getFont("general.font", false)); 1205 1205 setPreferredSize(new Dimension(width, height)); 1206 1206 … … 1213 1213 JPanel value_field_pane = new JPanel(); 1214 1214 value = new JTextField(); 1215 value.setBackground( Gatherer.config.getColor("coloring.editable_background", false));1216 value.setForeground( Gatherer.config.getColor("coloring.editable_foreground", false));1215 value.setBackground(Configuration.getColor("coloring.editable_background", false)); 1216 value.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 1217 1217 value.setPreferredSize(new Dimension(413, 24)); 1218 1218 value.getDocument().addDocumentListener(new DocumentListenerImpl()); -
trunk/gli/src/org/greenstone/gatherer/gui/ExternalCollectionPrompt.java
r7999 r8231 43 43 import javax.swing.*; 44 44 import javax.swing.event.*; 45 import org.greenstone.gatherer.Configuration; 45 46 import org.greenstone.gatherer.Dictionary; 46 47 import org.greenstone.gatherer.Gatherer; … … 89 90 90 91 /* new_mds_button = new JRadioButton(); 91 new_mds_button.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));92 new_mds_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 92 93 //new_mds_button.setMnemonic(KeyEvent.VK_I); 93 94 new_mds_button.setOpaque(false); 94 95 Dictionary.registerText(new_mds_button, "ExternalCollectionPrompt.NewMDS"); 95 96 existing_mds_button = new JRadioButton(); 96 existing_mds_button.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));97 existing_mds_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 97 98 //existing_mds_button.setMnemonic(KeyEvent.VK_X); 98 99 existing_mds_button.setOpaque(false); … … 143 144 144 145 // Show 145 Dimension screen_size = Gatherer.config.screen_size;146 Dimension screen_size = Configuration.screen_size; 146 147 setLocation((screen_size.width - size.width) / 2, (screen_size.height - size.height) / 2); 147 148 setVisible(true); -
trunk/gli/src/org/greenstone/gatherer/gui/FileAssociationDialog.java
r8019 r8231 45 45 import javax.swing.filechooser.*; 46 46 import javax.swing.table.*; 47 import org.greenstone.gatherer.Configuration; 47 48 import org.greenstone.gatherer.Dictionary; 48 49 import org.greenstone.gatherer.Gatherer; … … 92 93 93 94 JPanel content_pane = (JPanel) getContentPane(); 94 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));95 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 95 96 96 97 JTextArea instructions_area = new JTextArea(); -
trunk/gli/src/org/greenstone/gatherer/gui/GComboBox.java
r8169 r8231 41 41 import javax.swing.*; 42 42 import javax.swing.plaf.basic.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Gatherer; 44 45 … … 154 155 155 156 // Initialization 156 this.background = Gatherer.config.getColor("coloring.collection_tree_background", false);157 this.foreground = Gatherer.config.getColor("coloring.collection_tree_foreground", false);158 this.editable_background = Gatherer.config.getColor("coloring.editable_background", false);159 this.editable_foreground = Gatherer.config.getColor("coloring.editable_foreground", false);160 this.selection_background = Gatherer.config.getColor("coloring.collection_selection_background", false);161 this.selection_foreground = Gatherer.config.getColor("coloring.collection_selection_foreground", false);157 this.background = Configuration.getColor("coloring.collection_tree_background", false); 158 this.foreground = Configuration.getColor("coloring.collection_tree_foreground", false); 159 this.editable_background = Configuration.getColor("coloring.editable_background", false); 160 this.editable_foreground = Configuration.getColor("coloring.editable_foreground", false); 161 this.selection_background = Configuration.getColor("coloring.collection_selection_background", false); 162 this.selection_foreground = Configuration.getColor("coloring.collection_selection_foreground", false); 162 163 if (isEditable()) { 163 164 this.setBackground(editable_background); … … 350 351 351 352 public void setButtonBackground() { 352 arrowButton.setBackground( Gatherer.config.getColor("coloring.button_background", false));353 arrowButton.setBackground(Configuration.getColor("coloring.button_background", false)); 353 354 } 354 355 } -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r8038 r8231 331 331 */ 332 332 public void collectionChanged(final boolean ready) { 333 if( Gatherer.config.get("workflow.mirror", true)) {333 if(Configuration.get("workflow.mirror", true)) { 334 334 mirror_pane.collectionChanged(ready); 335 335 } … … 413 413 tab_pane = new JTabbedPane(); 414 414 tab_pane.addChangeListener(this); 415 tab_pane.setFont( Gatherer.config.getFont("general.font", false));416 417 if( Gatherer.config.get(StaticStrings.WORKFLOW_MIRROR, true)) {415 tab_pane.setFont(Configuration.getFont("general.font", false)); 416 417 if(Configuration.get(StaticStrings.WORKFLOW_MIRROR, true)) { 418 418 mirror_pane = new MirrorPane(); 419 419 tab_pane.addTab("GUI.Mirror", Utility.getImage("mirroring.gif"), mirror_pane); 420 tab_pane.setEnabledAt(tab_pane.indexOfComponent(mirror_pane), Gatherer.config.get(StaticStrings.WORKFLOW_MIRROR, false));420 tab_pane.setEnabledAt(tab_pane.indexOfComponent(mirror_pane), Configuration.get(StaticStrings.WORKFLOW_MIRROR, false)); 421 421 } 422 422 423 423 gather_pane = new GatherPane(workspace_tree_sync, collection_tree_sync); 424 424 gather_pane.display(); 425 if( Gatherer.config.get("workflow.gather", true)) {425 if(Configuration.get("workflow.gather", true)) { 426 426 tab_pane.addTab("GUI.Gather", Utility.getImage("collection.gif"), gather_pane); 427 tab_pane.setEnabledAt(tab_pane.indexOfComponent(gather_pane), Gatherer.config.get("workflow.gather", false));427 tab_pane.setEnabledAt(tab_pane.indexOfComponent(gather_pane), Configuration.get("workflow.gather", false)); 428 428 } 429 429 430 430 enrich_pane = new EnrichPane(collection_tree_sync); 431 431 enrich_pane.display(); 432 if( Gatherer.config.get("workflow.enrich", true)) {432 if(Configuration.get("workflow.enrich", true)) { 433 433 tab_pane.addTab("GUI.Enrich", Utility.getImage("metaedit.gif"), enrich_pane); 434 434 tab_pane.setEnabledAt(tab_pane.indexOfComponent(enrich_pane), false); … … 437 437 design_pane = new DesignPane(); 438 438 design_pane.display(); 439 if( Gatherer.config.get("workflow.design", true)) {439 if(Configuration.get("workflow.design", true)) { 440 440 tab_pane.addTab("GUI.Design", Utility.getImage("build.gif"), design_pane); 441 441 tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false); 442 442 } 443 443 444 if( Gatherer.config.get("workflow.export", true)) {444 if(Configuration.get("workflow.export", true)) { 445 445 tab_pane.addTab("GUI.Export", Utility.getImage("export.gif"), export_pane); 446 446 tab_pane.setEnabledAt(tab_pane.indexOfComponent(export_pane), false); … … 449 449 create_pane = new CreatePane(); 450 450 create_pane.display(); 451 if( Gatherer.config.get("workflow.create", true)) {451 if(Configuration.get("workflow.create", true)) { 452 452 tab_pane.addTab("GUI.Create", Utility.getImage("build session.gif"), create_pane); 453 453 tab_pane.setEnabledAt(tab_pane.indexOfComponent(create_pane), false); … … 455 455 456 456 // Select the collect pane if it is available 457 if( Gatherer.config.get("workflow.gather", false)) {457 if(Configuration.get("workflow.gather", false)) { 458 458 tab_pane.setSelectedComponent(gather_pane); 459 459 } … … 649 649 // Describe the current user mode 650 650 title_buffer.append(StaticStrings.MODE_STR); 651 title_buffer.append( Gatherer.config.getModeAsString());651 title_buffer.append(Configuration.getModeAsString()); 652 652 title_buffer.append(StaticStrings.SPACE_CHARACTER); 653 653 title_buffer.append(StaticStrings.SPACE_CHARACTER); … … 690 690 File file; 691 691 if (Gatherer.GS3) { 692 if ( Gatherer.config.gsdl3_path != null) {693 file = new File(Utility.getSitesDir( Gatherer.config.gsdl3_path));692 if (Configuration.gsdl3_path != null) { 693 file = new File(Utility.getSitesDir(Configuration.gsdl3_path)); 694 694 } else { 695 695 file = new File(Utility.BASE_DIR); … … 698 698 } else { 699 699 700 if( Gatherer.config.gsdl_path != null) {701 file = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));700 if(Configuration.gsdl_path != null) { 701 file = new File(Utility.getCollectDir(Configuration.gsdl_path)); 702 702 } 703 703 else { … … 796 796 ///ystem.err.println("Running CreationTask..."); 797 797 if(ncm_prompt == null) { 798 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), Gatherer.config.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), ncd_prompt.getBase(), null);798 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), Configuration.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), ncd_prompt.getBase(), null); 799 799 } 800 800 else { 801 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), Gatherer.config.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), null, ncm_prompt.getSets());801 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), Configuration.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), null, ncm_prompt.getSets()); 802 802 } 803 803 // Now that the collection specific settings are loaded we can set the 'view extracted metadata' property 804 804 // do we want to have this in here??? 805 // Gatherer.config.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, true);805 //Configuration.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, true); 806 806 ncd_prompt.dispose(); 807 807 ncd_prompt = null; … … 1026 1026 if (mirror_pos != -1) { 1027 1027 if (ready) { 1028 tab_pane.setEnabledAt(mirror_pos, Gatherer.config.get("workflow.mirror", false));1028 tab_pane.setEnabledAt(mirror_pos, Configuration.get("workflow.mirror", false)); 1029 1029 } 1030 1030 else { 1031 tab_pane.setEnabledAt(mirror_pos, Gatherer.config.get("workflow.mirror", true));1031 tab_pane.setEnabledAt(mirror_pos, Configuration.get("workflow.mirror", true)); 1032 1032 } 1033 1033 } 1034 1034 if (enrich_pos != -1) { 1035 tab_pane.setEnabledAt(enrich_pos, ready && Gatherer.config.get("workflow.enrich", false));1035 tab_pane.setEnabledAt(enrich_pos, ready && Configuration.get("workflow.enrich", false)); 1036 1036 } 1037 1037 if (design_pos != -1) { 1038 tab_pane.setEnabledAt(design_pos, ready && Gatherer.config.get("workflow.design", false) && Gatherer.config.getMode() > Configuration.ASSISTANT_MODE);1038 tab_pane.setEnabledAt(design_pos, ready && Configuration.get("workflow.design", false) && Configuration.getMode() > Configuration.ASSISTANT_MODE); 1039 1039 } 1040 1040 if (create_pos != -1) { 1041 tab_pane.setEnabledAt(create_pos, ready && Gatherer.config.get("workflow.create", false));1041 tab_pane.setEnabledAt(create_pos, ready && Configuration.get("workflow.create", false)); 1042 1042 } 1043 1043 if (export_pos != -1) { 1044 tab_pane.setEnabledAt(export_pos, ready && Gatherer.config.get("workflow.export", false));1044 tab_pane.setEnabledAt(export_pos, ready && Configuration.get("workflow.export", false)); 1045 1045 } 1046 1046 } -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r8041 r8231 226 226 collection_tree.setModel(collection); 227 227 collection_tree.repaint(); 228 collection_filter.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));228 collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 229 229 } 230 230 else { … … 238 238 collection_tree.setEnabled(ready); 239 239 collection_filter.setEnabled(ready); 240 collection_filter.setEditable( Gatherer.config.getMode() > Configuration.LIBRARIAN_MODE);240 collection_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); 241 241 Dictionary.registerTooltip(collection_filter.getComboBox(), "Collection.Filter_Tooltip"); 242 242 243 243 // Change the label at the top of collection tree. 244 setEnabled(collection_label, ready, Gatherer.config.getColor("coloring.collection_heading_foreground", false), Gatherer.config.getColor("coloring.collection_heading_background", false));244 setEnabled(collection_label, ready, Configuration.getColor("coloring.collection_heading_foreground", false), Configuration.getColor("coloring.collection_heading_background", false)); 245 245 // Ensure that this tree view of the collection record set is synchronized with any others. 246 246 collection_tree_sync.add(collection_tree); … … 269 269 workspace_label = new JLabel(); 270 270 workspace_label.setOpaque(true); 271 workspace_label.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", false));272 workspace_label.setForeground( Gatherer.config.getColor("coloring.workspace_heading_foreground", false));271 workspace_label.setBackground(Configuration.getColor("coloring.workspace_heading_background", false)); 272 workspace_label.setForeground(Configuration.getColor("coloring.workspace_heading_foreground", false)); 273 273 Dictionary.registerText(workspace_label, "Collection.Workspace"); 274 274 … … 282 282 workspace_tree.addTreeSelectionListener(file_queue); 283 283 workspace_tree.putClientProperty("JTree.lineStyle", "Angled"); 284 workspace_tree.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_background", false));285 workspace_tree.setTextNonSelectionColor( Gatherer.config.getColor("coloring.workspace_tree_foreground", false));286 workspace_tree.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.workspace_selection_background", false));287 workspace_tree.setTextSelectionColor( Gatherer.config.getColor("coloring.workspace_selection_foreground", false));284 workspace_tree.setBackgroundNonSelectionColor(Configuration.getColor("coloring.workspace_tree_background", false)); 285 workspace_tree.setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false)); 286 workspace_tree.setBackgroundSelectionColor(Configuration.getColor("coloring.workspace_selection_background", false)); 287 workspace_tree.setTextSelectionColor(Configuration.getColor("coloring.workspace_selection_foreground", false)); 288 288 workspace_tree.setRootVisible(false); 289 289 … … 291 291 292 292 workspace_filter = Gatherer.g_man.getFilter(workspace_tree); 293 workspace_filter.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", false));294 workspace_filter.setEditable( Gatherer.config.getMode() > Configuration.LIBRARIAN_MODE);293 workspace_filter.setBackground(Configuration.getColor("coloring.workspace_heading_background", false)); 294 workspace_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); 295 295 Dictionary.registerTooltip(workspace_filter.getComboBox(), "Collection.Filter_Tooltip"); 296 296 … … 324 324 collection_tree.addTreeExpansionListener(Gatherer.g_man.foa_listener); 325 325 collection_tree.putClientProperty("JTree.lineStyle", "Angled"); 326 collection_tree.setBackgroundNonSelectionColor( Gatherer.config.getColor("coloring.collection_tree_background", false));327 collection_tree.setTextNonSelectionColor( Gatherer.config.getColor("coloring.collection_tree_foreground", false));328 collection_tree.setBackgroundSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));329 collection_tree.setTextSelectionColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));326 collection_tree.setBackgroundNonSelectionColor(Configuration.getColor("coloring.collection_tree_background", false)); 327 collection_tree.setTextNonSelectionColor(Configuration.getColor("coloring.collection_tree_foreground", false)); 328 collection_tree.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 329 collection_tree.setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 330 330 collection_tree.setRootVisible(false); 331 331 //collection_tree.setRootVisible(true); … … 335 335 collection_filter = Gatherer.g_man.getFilter(collection_tree); 336 336 if(collection != null) { 337 collection_filter.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));337 collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 338 338 } 339 339 else { … … 877 877 content_pane.add(button_pane, BorderLayout.SOUTH); 878 878 // Display 879 Dimension screen_size = Gatherer.config.screen_size;879 Dimension screen_size = Configuration.screen_size; 880 880 setLocation((screen_size.width - DIALOG_SIZE.width) / 2, (screen_size.height - DIALOG_SIZE.height) / 2); 881 881 show(); -
trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java
r8015 r8231 41 41 import java.io.*; 42 42 import javax.swing.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Dictionary; 44 45 import org.greenstone.gatherer.Gatherer; … … 100 101 JTextField name_field = new JTextField(name); 101 102 name_field.setEditable(false); 102 name_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));103 name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 103 104 104 105 JPanel person_pane = new JPanel(); … … 108 109 JTextField person_field = new JTextField(getValue("User")); 109 110 person_field.setEditable(false); 110 person_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));111 person_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 111 112 112 113 JPanel machine_pane = new JPanel(); … … 116 117 JTextField machine_field = new JTextField(getValue("Machine")); 117 118 machine_field.setEditable(false); 118 machine_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));119 machine_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 119 120 120 121 JPanel created_pane = new JPanel(); … … 124 125 JTextField created_field = new JTextField(getValue("Date")); 125 126 created_field.setEditable(false); 126 created_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));127 created_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 127 128 128 129 JLabel central_label = new JLabel(); -
trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java
r8039 r8231 41 41 import javax.swing.*; 42 42 import javax.swing.event.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Dictionary; 44 45 import org.greenstone.gatherer.Gatherer; … … 255 256 help.add(help_general); 256 257 help.add(new JSeparator()); 257 if ( Gatherer.config.get("workflow.browse", true)) {258 if (Configuration.get("workflow.browse", true)) { 258 259 help.add(help_browse); 259 260 } 260 if ( Gatherer.config.get("workflow.mirror", true)) {261 if (Configuration.get("workflow.mirror", true)) { 261 262 help.add(help_mirror); 262 263 } 263 if ( Gatherer.config.get("workflow.gather", true)) {264 if (Configuration.get("workflow.gather", true)) { 264 265 help.add(help_collect); 265 266 } 266 if ( Gatherer.config.get("workflow.enrich", true)) {267 if (Configuration.get("workflow.enrich", true)) { 267 268 help.add(help_metaedit); 268 269 } 269 if ( Gatherer.config.get("workflow.design", true)) {270 if (Configuration.get("workflow.design", true)) { 270 271 help.add(help_design); 271 272 } 272 if ( Gatherer.config.get("workflow.export", true)) {273 if (Configuration.get("workflow.export", true)) { 273 274 help.add(help_export); 274 275 } 275 if ( Gatherer.config.get("workflow.create", true)) {276 if (Configuration.get("workflow.create", true)) { 276 277 help.add(help_build); 277 278 } 278 if ( Gatherer.config.get("workflow.preview", true)) {279 if (Configuration.get("workflow.preview", true)) { 279 280 help.add(help_preview); 280 281 } -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPrompt.java
r7155 r8231 31 31 import java.io.File; 32 32 import javax.swing.*; 33 import org.greenstone.gatherer.Configuration; 33 34 import org.greenstone.gatherer.Dictionary; 34 35 import org.greenstone.gatherer.Gatherer; … … 105 106 JTextField filename_field = new JTextField(Utility.trimCenter(file.getAbsolutePath(), 120)); 106 107 filename_field.setEditable(false); 107 filename_field.setFont( Gatherer.config.getFont("general.tooltip_font", false));108 filename_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));108 filename_field.setFont(Configuration.getFont("general.tooltip_font", false)); 109 filename_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 109 110 110 111 JLabel element_label = new JLabel(); … … 112 113 JTextField element_field = new JTextField(element); 113 114 element_field.setEditable(false); 114 element_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));115 element_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 115 116 116 117 JLabel current_value_label = new JLabel(); … … 118 119 JTextField current_value_field = new JTextField(current_value); 119 120 current_value_field.setEditable(false); 120 current_value_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));121 current_value_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 121 122 122 123 JLabel new_value_label = new JLabel(); … … 124 125 JTextField new_value_field = new JTextField(new_value); // , (type == ADD_PROMPT || type == UPDATE_PROMPT)); 125 126 new_value_field.setEditable(false); 126 new_value_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));127 new_value_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 127 128 128 129 JPanel buttons_pane = new JPanel(); -
trunk/gli/src/org/greenstone/gatherer/gui/MetadataElementListCellRenderer.java
r8132 r8231 4 4 import java.awt.*; 5 5 import javax.swing.*; 6 import org.greenstone.gatherer.Configuration; 6 7 import org.greenstone.gatherer.Gatherer; 7 8 import org.greenstone.gatherer.metadata.MetadataElement; … … 32 33 MetadataElement metadata_element = (MetadataElement) value; 33 34 34 String interface_language_code = Gatherer.config.getLanguage();35 String interface_language_code = Configuration.getLanguage(); 35 36 String metadata_element_display = ""; 36 37 -
trunk/gli/src/org/greenstone/gatherer/gui/MetadataImportMappingPrompt.java
r8216 r8231 6 6 import java.util.*; 7 7 import javax.swing.*; 8 import org.greenstone.gatherer.Configuration; 8 9 import org.greenstone.gatherer.Dictionary; 9 10 import org.greenstone.gatherer.Gatherer; … … 106 107 107 108 // Display 108 Dimension screen_size = Gatherer.config.screen_size;109 Dimension screen_size = Configuration.screen_size; 109 110 dialog.setLocation((screen_size.width - DIALOG_SIZE.width) / 2, (screen_size.height - DIALOG_SIZE.height) / 2); 110 111 on_screen = dialog; … … 161 162 { 162 163 MetadataSet metadata_set = (MetadataSet) value; 163 String interface_language_code = Gatherer.config.getLanguage();164 String interface_language_code = Configuration.getLanguage(); 164 165 String metadata_set_name = MetadataTools.getMetadataSetAttribute(metadata_set, "Name", interface_language_code, "en"); 165 166 setText(metadata_set_name); -
trunk/gli/src/org/greenstone/gatherer/gui/MetadataValueTableCellRenderer.java
r8132 r8231 6 6 import javax.swing.*; 7 7 import javax.swing.table.DefaultTableCellRenderer; 8 import org.greenstone.gatherer.Configuration; 8 9 import org.greenstone.gatherer.Gatherer; 9 10 import org.greenstone.gatherer.metadata.MetadataElement; … … 60 61 // Background 61 62 if (isSelected) { 62 renderer.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", true));63 renderer.setBackground(Configuration.getColor("coloring.workspace_heading_background", true)); 63 64 } 64 65 else { 65 66 if (column <= 1) { 66 renderer.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", true));67 renderer.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 67 68 } 68 69 else { 69 renderer.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", true));70 renderer.setBackground(Configuration.getColor("coloring.collection_tree_background", true)); 70 71 } 71 72 } … … 78 79 // We set a tooltip over the element column containing the definition of the element 79 80 if (value instanceof MetadataElement) { 80 String interface_language_code = Gatherer.config.getLanguage();81 String interface_language_code = Configuration.getLanguage(); 81 82 String metadata_element_definition = MetadataTools.getMetadataElementAttribute((MetadataElement) value, "definition", interface_language_code, "en"); 82 83 if (metadata_element_definition != null) { -
trunk/gli/src/org/greenstone/gatherer/gui/MirrorPane.java
r7740 r8231 90 90 list_scroll = getter.getDownloadJobList(); 91 91 92 current_mode = Gatherer.config.getMode();92 current_mode = Configuration.getMode(); 93 93 // String user_dir = System.getProperty("user.dir"); // **** 94 94 // System.err.println("**** user dir = "+user_dir); … … 210 210 } 211 211 // Lets see what warning message we should display, if any. 212 String wget_version_str = Gatherer.config.getWGetVersion();212 String wget_version_str = Configuration.getWGetVersion(); 213 213 if(wget_version_str.equals(StaticStrings.NO_WGET_STR)) { 214 214 // If there was no WGet available then downloading is disabled entirely -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r7740 r8231 34 34 import javax.swing.event.*; 35 35 import javax.swing.text.*; 36 import org.greenstone.gatherer.Configuration; 36 37 import org.greenstone.gatherer.Dictionary; 37 38 import org.greenstone.gatherer.Gatherer; … … 53 54 File collection_directory; 54 55 if (Gatherer.GS3) { 55 collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));56 collection_directory = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 56 57 } else { 57 collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));58 collection_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 58 59 } 59 60 File children[] = collection_directory.listFiles(); … … 104 105 // need to modify this to base a coll on any collection from any site 105 106 if (Gatherer.GS3) { 106 File sites_dir = new File(Utility.getSitesDir( Gatherer.config.gsdl3_path));107 File sites_dir = new File(Utility.getSitesDir(Configuration.gsdl3_path)); 107 108 File [] sites = sites_dir.listFiles(); 108 109 for (int i=0; i<sites.length; i++) { 109 File collect_dir = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, sites[i].getName()));110 File collect_dir = new File(Utility.getCollectDir(Configuration.gsdl3_path, sites[i].getName())); 110 111 if (collect_dir.exists()) { 111 112 addCollectionsToModel(base_collection_model, collect_dir, sites[i].getName()); … … 113 114 } 114 115 } else { 115 File gsdl_collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));116 File gsdl_collection_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 116 117 addCollectionsToModel(base_collection_model, gsdl_collection_directory, null); 117 118 } … … 142 143 Dictionary.setText(description_label, "NewCollectionPrompt.Collection_Description"); 143 144 description = new JTextArea(); 144 description.setBackground( Gatherer.config.getColor("coloring.editable_background", false));145 description.setForeground( Gatherer.config.getColor("coloring.editable_foreground", false));145 description.setBackground(Configuration.getColor("coloring.editable_background", false)); 146 description.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 146 147 description.setRows(5); 147 148 Dictionary.setTooltip(description, "CDM.General.Collection_Extra_Tooltip"); … … 205 206 content_pane.add(bottom_pane, BorderLayout.SOUTH); 206 207 // Final dialog setup & positioning. 207 Dimension screen_size = Gatherer.config.screen_size;208 Dimension screen_size = Configuration.screen_size; 208 209 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 209 210 setVisible(true); … … 271 272 File collection_directory; 272 273 if (Gatherer.GS3) { 273 collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));274 collection_directory = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 274 275 } else { 275 collection_directory = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));276 collection_directory = new File(Utility.getCollectDir(Configuration.gsdl_path)); 276 277 } 277 278 … … 334 335 } 335 336 public void keyPressed(KeyEvent event) { 336 component1.setForeground( Gatherer.config.getColor("coloring.editable_foreground", false));337 component1.setBackground( Gatherer.config.getColor("coloring.editable_background", false));337 component1.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 338 component1.setBackground(Configuration.getColor("coloring.editable_background", false)); 338 339 if(component2 != null) { 339 component2.setForeground( Gatherer.config.getColor("coloring.editable_foreground", false));340 component2.setBackground( Gatherer.config.getColor("coloring.editable_background", false));340 component2.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 341 component2.setBackground(Configuration.getColor("coloring.editable_background", false)); 341 342 } 342 343 } -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionMetadataPrompt.java
r6318 r8231 33 33 import javax.swing.*; 34 34 import javax.swing.event.*; 35 import org.greenstone.gatherer.Configuration; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 105 106 Dictionary.setText(elements_list_label, "NewCollectionPrompt.Metadata_Elements"); 106 107 elements_list = new JList(); 107 elements_list.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));108 elements_list.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));109 elements_list.setSelectionBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));110 elements_list.setSelectionForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));108 elements_list.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 109 elements_list.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 110 elements_list.setSelectionBackground(Configuration.getColor("coloring.collection_tree_background", false)); 111 elements_list.setSelectionForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 111 112 112 113 JPanel button_pane = new JPanel(); … … 153 154 154 155 // Show 155 Dimension screen_size = Gatherer.config.screen_size;156 Dimension screen_size = Configuration.screen_size; 156 157 setLocation((screen_size.width - size.width) / 2, (screen_size.height - size.height) / 2); 157 158 setVisible(true); -
trunk/gli/src/org/greenstone/gatherer/gui/NewFolderPrompt.java
r7151 r8231 41 41 import java.io.*; 42 42 import javax.swing.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Dictionary; 44 45 import org.greenstone.gatherer.Gatherer; … … 82 83 Dictionary.setText(destination_label, "NewFolderPrompt.Destination_Name"); 83 84 JTextField destination_textfield = new JTextField(node.getFile().getName()); 84 destination_textfield.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));85 destination_textfield.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 85 86 destination_textfield.setEditable(false); 86 87 -
trunk/gli/src/org/greenstone/gatherer/gui/NewMetaSetPrompt.java
r7998 r8231 43 43 import javax.swing.event.*; 44 44 import javax.swing.text.*; 45 import org.greenstone.gatherer.Configuration; 45 46 import org.greenstone.gatherer.Dictionary; 46 47 import org.greenstone.gatherer.Gatherer; … … 70 71 // Creation 71 72 JPanel content_pane = (JPanel) getContentPane(); 72 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));73 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 73 74 JPanel center_pane = new JPanel(); 74 75 center_pane.setOpaque(false); … … 81 82 Dictionary.setText(name_label, "MEM.Name"); 82 83 name_field = new JTextField(); 83 name_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));84 name_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));85 name_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));86 name_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));84 name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 85 name_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 86 name_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 87 name_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 87 88 Dictionary.setTooltip(name_field, "MEM.Set_Name_Tooltip"); 88 89 … … 94 95 Dictionary.setText(namespace_label, "MEM.Namespace"); 95 96 namespace_field = new JTextField(); 96 namespace_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));97 namespace_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));98 namespace_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));99 namespace_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));97 namespace_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 98 namespace_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 99 namespace_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 100 namespace_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 100 101 Dictionary.setTooltip(namespace_field, "MEM.Set_Namespace_Tooltip"); 101 102 … … 143 144 content_pane.add(button_pane, BorderLayout.SOUTH); 144 145 145 setLocation(( Gatherer.config.screen_size.width - ADD_SET_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_SET_SIZE.height) / 2);146 setLocation((Configuration.screen_size.width - ADD_SET_SIZE.width) / 2, (Configuration.screen_size.height - ADD_SET_SIZE.height) / 2); 146 147 setVisible(true); 147 148 } -
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r8018 r8231 124 124 } 125 125 ArrayList build_arguments = new ArrayList(); 126 int current_mode = Gatherer.config.getMode();126 int current_mode = Configuration.getMode(); 127 127 int total_build_argument_count = build_options.getBuildArgumentCount(); 128 128 for(int i = 0; i < total_build_argument_count; i++) { … … 142 142 pane = new JPanel(); 143 143 pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 144 pane.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));144 pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 145 145 int argument_count = build_arguments.size(); 146 146 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number or lines in the grid layout … … 184 184 } 185 185 ArrayList import_arguments = new ArrayList(); 186 int current_mode = Gatherer.config.getMode();186 int current_mode = Configuration.getMode(); 187 187 int total_import_argument_count = build_options.getImportArgumentCount(); 188 188 for(int i = 0; i < total_import_argument_count; i++) { … … 202 202 pane = new JPanel(); 203 203 pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 204 pane.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));204 pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 205 205 int argument_count = import_arguments.size(); 206 206 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number or lines in the grid layout … … 392 392 String tooltip = Utility.formatHTMLWidth("<html>" + argument.getDescription() + "</html>", 60); 393 393 // Because of the dynamic order of component creation/connection/layout, we can't really follow that pattern here. 394 setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));394 setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 395 395 setBorder(BorderFactory.createEmptyBorder(2,0,2,0)); 396 396 setLayout(new BorderLayout()); -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r8212 r8231 190 190 program_label.setPreferredSize(LABEL_SIZE); 191 191 Dictionary.registerText(program_label, "Preferences.Connection.ProgramCommand"); 192 program_field = new JTextField( Gatherer.config.getPreviewCommand());192 program_field = new JTextField(Configuration.getPreviewCommand()); 193 193 program_field.setCaretPosition(0); 194 194 Dictionary.registerTooltip(program_field, "Preferences.Connection.ProgramCommand_Tooltip"); … … 198 198 library_path_label = new JLabel(); 199 199 library_path_label.setPreferredSize(LABEL_SIZE); 200 library_path_field = new JTextField( Gatherer.config.getString("general.exec_address", true));200 library_path_field = new JTextField(Configuration.getString("general.exec_address", true)); 201 201 library_path_field.setCaretPosition(0); 202 202 if (Gatherer.GS3) { … … 228 228 servlet_combobox = new JComboBox(); 229 229 // try to locate and select the current site 230 String this_site = Gatherer.config.site_name;230 String this_site = Configuration.site_name; 231 231 for(int b = 0; b < site_combobox.getItemCount(); b++) { 232 232 String entry = (String) site_combobox.getItemAt(b); … … 252 252 servlet_combobox.setEnabled(true); 253 253 // try to locate and select the current servlet 254 String this_servlet = Gatherer.config.getServletPath();254 String this_servlet = Configuration.getServletPath(); 255 255 for(int b = 0; b < servlet_combobox.getItemCount(); b++) { 256 256 String entry = (String) servlet_combobox.getItemAt(b); … … 264 264 } 265 265 266 boolean currently_enabled = Gatherer.config.get("general.use_proxy", true);266 boolean currently_enabled = Configuration.get("general.use_proxy", true); 267 267 // Creation 268 268 JPanel connection_pane = new JPanel(); … … 277 277 proxy_host_label.setPreferredSize(LABEL_SIZE); 278 278 Dictionary.registerText(proxy_host_label, "Preferences.Connection.Proxy_Host"); 279 proxy_host_field = new JTextField( Gatherer.config.getString("general.proxy_host", true));279 proxy_host_field = new JTextField(Configuration.getString("general.proxy_host", true)); 280 280 proxy_host_field.setEnabled(currently_enabled); 281 281 Dictionary.registerTooltip(proxy_host_field, "Preferences.Connection.Proxy_Host_Tooltip"); … … 285 285 proxy_port_label.setPreferredSize(LABEL_SIZE); 286 286 Dictionary.registerText(proxy_port_label, "Preferences.Connection.Proxy_Port"); 287 String port_value = Gatherer.config.getString("general.proxy_port", true);287 String port_value = Configuration.getString("general.proxy_port", true); 288 288 if(port_value.length() > 0) { 289 289 proxy_port_field = new JSpinner(new SpinnerNumberModel((new Integer(port_value)).intValue(), 0, 65535, 1)); … … 414 414 email_label.setPreferredSize(LABEL_SIZE); 415 415 Dictionary.registerText(email_label, "Preferences.General.Email"); 416 email_field = new EmailField( Gatherer.config.getColor("coloring.error_background", false));417 email_field.setText( Gatherer.config.getEmail());416 email_field = new EmailField(Configuration.getColor("coloring.error_background", false)); 417 email_field.setText(Configuration.getEmail()); 418 418 Dictionary.registerTooltip(email_field, "Preferences.General.Email_Tooltip"); 419 419 … … 421 421 view_extracted_metadata_checkbox = new JCheckBox(); 422 422 view_extracted_metadata_checkbox.setSelected(false); 423 if ( Gatherer.config.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) {423 if (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) { 424 424 view_extracted_metadata_checkbox.setSelected(true); 425 425 } … … 429 429 show_file_size_checkbox = new JCheckBox(); 430 430 show_file_size_checkbox.setSelected(false); 431 if ( Gatherer.config.get("general.show_file_size", Configuration.COLLECTION_SPECIFIC)) {431 if (Configuration.get("general.show_file_size", Configuration.COLLECTION_SPECIFIC)) { 432 432 show_file_size_checkbox.setSelected(true); 433 433 } … … 442 442 Dictionary.registerTooltip(language_combobox, "Preferences.General.Interface_Language_Tooltip"); 443 443 // Try to locate and select the current language 444 String language_code = Gatherer.config.getLanguage();444 String language_code = Configuration.getLanguage(); 445 445 for(int b = 0; b < language_combobox.getItemCount(); b++) { 446 446 DictionaryEntry entry = (DictionaryEntry) language_combobox.getItemAt(b); … … 497 497 mode_description_textarea.setWrapStyleWord(true); 498 498 // Determine which value is already selected 499 switch( Gatherer.config.getMode()) {499 switch(Configuration.getMode()) { 500 500 case Configuration.ASSISTANT_MODE: 501 501 assistant_mode_radio_button.setSelected(true); … … 540 540 private JPanel createWarningPreferences() { 541 541 // Retrieve all of the warning preferences settings. 542 HashMap warning_preferences = Gatherer.config.getAll("warning\\..*", true);542 HashMap warning_preferences = Configuration.getAll("warning\\..*", true); 543 543 warning_preferences_check_list = new CheckList(false); 544 544 for(Iterator keys = warning_preferences.keySet().iterator(); keys.hasNext(); ) { … … 580 580 581 581 workflow_mirror = new JCheckBox(); 582 workflow_mirror.setSelected( Gatherer.config.get("workflow.mirror", false));582 workflow_mirror.setSelected(Configuration.get("workflow.mirror", false)); 583 583 workflow_mirror.setPreferredSize(ROW_SIZE); 584 584 Dictionary.registerText(workflow_mirror, "Preferences.Workflow.Mirror"); 585 585 586 586 workflow_gather = new JCheckBox(); 587 workflow_gather.setSelected( Gatherer.config.get("workflow.gather", false));587 workflow_gather.setSelected(Configuration.get("workflow.gather", false)); 588 588 workflow_gather.setPreferredSize(ROW_SIZE); 589 589 Dictionary.registerText(workflow_gather, "Preferences.Workflow.Gather"); 590 590 591 591 workflow_enrich = new JCheckBox(); 592 workflow_enrich.setSelected( Gatherer.config.get("workflow.enrich", false));592 workflow_enrich.setSelected(Configuration.get("workflow.enrich", false)); 593 593 workflow_enrich.setPreferredSize(ROW_SIZE); 594 594 Dictionary.registerText(workflow_enrich, "Preferences.Workflow.Enrich"); 595 595 596 596 workflow_design = new JCheckBox(); 597 workflow_design.setSelected( Gatherer.config.get("workflow.design", false));597 workflow_design.setSelected(Configuration.get("workflow.design", false)); 598 598 workflow_design.setPreferredSize(ROW_SIZE); 599 599 Dictionary.registerText(workflow_design, "Preferences.Workflow.Design"); 600 600 601 601 workflow_export = new JCheckBox(); 602 workflow_export.setSelected( Gatherer.config.get("workflow.export", false));602 workflow_export.setSelected(Configuration.get("workflow.export", false)); 603 603 workflow_export.setPreferredSize(ROW_SIZE); 604 604 Dictionary.registerText(workflow_export, "Preferences.Workflow.Export"); 605 605 606 606 workflow_create = new JCheckBox(); 607 workflow_create.setSelected( Gatherer.config.get("workflow.create", false));607 workflow_create.setSelected(Configuration.get("workflow.create", false)); 608 608 workflow_create.setPreferredSize(ROW_SIZE); 609 609 Dictionary.registerText(workflow_create, "Preferences.Workflow.Create"); … … 620 620 checklist_pane.setLayout(new BoxLayout(checklist_pane, BoxLayout.Y_AXIS)); 621 621 checklist_pane.add(title_label); 622 if ( Gatherer.config.get("workflow.mirror", true)) {622 if (Configuration.get("workflow.mirror", true)) { 623 623 checklist_pane.add(workflow_mirror); 624 624 } 625 if ( Gatherer.config.get("workflow.gather", true)) {625 if (Configuration.get("workflow.gather", true)) { 626 626 checklist_pane.add(workflow_gather); 627 627 } 628 if ( Gatherer.config.get("workflow.enrich", true)) {628 if (Configuration.get("workflow.enrich", true)) { 629 629 checklist_pane.add(workflow_enrich); 630 630 } 631 if ( Gatherer.config.get("workflow.design", true)) {631 if (Configuration.get("workflow.design", true)) { 632 632 checklist_pane.add(workflow_design); 633 633 } 634 if ( Gatherer.config.get("workflow.export", true)) {634 if (Configuration.get("workflow.export", true)) { 635 635 checklist_pane.add(workflow_export); 636 636 } 637 if ( Gatherer.config.get("workflow.create", true)) {637 if (Configuration.get("workflow.create", true)) { 638 638 checklist_pane.add(workflow_create); 639 639 } … … 665 665 program_str = program_str + " %1"; 666 666 } 667 Gatherer.config.setPreviewCommand(program_str);667 Configuration.setPreviewCommand(program_str); 668 668 669 669 String library_path_string = library_path_field.getText(); 670 Gatherer.config.setString("general.exec_address", true, library_path_string);670 Configuration.setString("general.exec_address", true, library_path_string); 671 671 if (!library_path_string.equals("")) { 672 672 try { 673 Gatherer.config.exec_address = new URL(library_path_string);673 Configuration.exec_address = new URL(library_path_string); 674 674 } 675 675 catch (MalformedURLException error) { … … 679 679 boolean site_changed = false; 680 680 if (Gatherer.GS3) { 681 String current_site = Gatherer.config.site_name;681 String current_site = Configuration.site_name; 682 682 String new_site =(String)site_combobox.getSelectedItem() ; 683 683 if (!new_site.equals(current_site)) { 684 684 site_changed = true; 685 685 } 686 Gatherer.config.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem());686 Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem()); 687 687 } 688 688 689 Gatherer.config.set("general.use_proxy", true, use_proxy_checkbox.isSelected());690 Gatherer.config.setString("general.proxy_host", true, proxy_host_field.getText());691 Gatherer.config.setString("general.proxy_port", true, proxy_port_field.getValue() + "");689 Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected()); 690 Configuration.setString("general.proxy_host", true, proxy_host_field.getText()); 691 Configuration.setString("general.proxy_port", true, proxy_port_field.getValue() + ""); 692 692 Gatherer.setProxy(); 693 693 694 694 // General preferences 695 Gatherer.config.setEmail(email_field.getText());696 697 Gatherer.config.set("general.show_file_size", Configuration.COLLECTION_SPECIFIC, show_file_size_checkbox.isSelected());695 Configuration.setEmail(email_field.getText()); 696 697 Configuration.set("general.show_file_size", Configuration.COLLECTION_SPECIFIC, show_file_size_checkbox.isSelected()); 698 698 // Force both workspace and collection trees to redraw 699 699 if (Gatherer.g_man != null) { … … 702 702 } 703 703 704 Gatherer.config.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected());704 Configuration.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected()); 705 705 Gatherer.g_man.enrich_pane.valueChanged((TreeSelectionEvent) null); // Refresh metadata table 706 706 707 String current_lang = Gatherer.config.getLanguage();707 String current_lang = Configuration.getLanguage(); 708 708 String new_lang = ((DictionaryEntry)language_combobox.getSelectedItem()).getLocale().getLanguage(); 709 709 if (!current_lang.equals(new_lang)) { 710 Gatherer.config.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry)language_combobox.getSelectedItem()).getLocale());710 Configuration.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry)language_combobox.getSelectedItem()).getLocale()); 711 711 // delete the plugins and classifiers.dat files 712 712 PlugInManager.clearPlugInCache(); … … 715 715 716 716 // Mode preferences 717 int current_mode = Gatherer.config.getMode();717 int current_mode = Configuration.getMode(); 718 718 int new_mode; 719 719 if(assistant_mode_radio_button.isSelected()) { … … 731 731 // If there has been a change in modes, update the config, and also inform the persistant gui views that have a need to know 732 732 if(new_mode != current_mode) { 733 Gatherer.config.setMode(new_mode);733 Configuration.setMode(new_mode); 734 734 Collection collection = Gatherer.c_man.getCollection(); 735 735 if (collection != null) { … … 741 741 for(int i = 0; i < warning_preferences_check_list.getEntryCount(); i++) { 742 742 Entry entry = warning_preferences_check_list.get(i); 743 Gatherer.config.set(entry.getProperty(), true, entry.isSelected());743 Configuration.set(entry.getProperty(), true, entry.isSelected()); 744 744 } 745 745 … … 751 751 752 752 // Workflow preferences 753 // Gatherer.config.set("workflow.mirror", false, workflow_mirror.isSelected());754 // Gatherer.config.set("workflow.gather", false, workflow_gather.isSelected());755 // Gatherer.config.set("workflow.enrich", false, workflow_enrich.isSelected());756 // Gatherer.config.set("workflow.design", false, workflow_design.isSelected());757 // Gatherer.config.set("workflow.export", false, workflow_export.isSelected());758 // Gatherer.config.set("workflow.create", false, workflow_create.isSelected());753 // Configuration.set("workflow.mirror", false, workflow_mirror.isSelected()); 754 // Configuration.set("workflow.gather", false, workflow_gather.isSelected()); 755 // Configuration.set("workflow.enrich", false, workflow_enrich.isSelected()); 756 // Configuration.set("workflow.design", false, workflow_design.isSelected()); 757 // Configuration.set("workflow.export", false, workflow_export.isSelected()); 758 // Configuration.set("workflow.create", false, workflow_create.isSelected()); 759 759 // Gatherer.g_man.workflowUpdate("Mirror", workflow_mirror.isSelected()); 760 760 // Gatherer.g_man.workflowUpdate("Gather", workflow_gather.isSelected()); 761 761 // Gatherer.g_man.workflowUpdate("Enrich", workflow_enrich.isSelected()); 762 // Gatherer.g_man.workflowUpdate("Design", (workflow_design.isSelected() && Gatherer.config.getMode() > Configuration.ASSISTANT_MODE));762 // Gatherer.g_man.workflowUpdate("Design", (workflow_design.isSelected() && Configuration.getMode() > Configuration.ASSISTANT_MODE)); 763 763 // Gatherer.g_man.workflowUpdate("Export", workflow_export.isSelected()); 764 764 // Gatherer.g_man.workflowUpdate("Create", workflow_create.isSelected()); 765 765 766 766 // Always save configuration changes immediately (in case the GLI crashes) 767 Gatherer.config.save();767 Configuration.save(); 768 768 769 769 // Hide dialog … … 903 903 public void actionPerformed(ActionEvent event) { 904 904 boolean enabled = use_proxy_checkbox.isSelected(); 905 Gatherer.config.set("general.use_proxy", true, enabled);905 Configuration.set("general.use_proxy", true, enabled); 906 906 // Fortunately this is already driven by the event thread. 907 907 proxy_host_field.setEnabled(enabled); -
trunk/gli/src/org/greenstone/gatherer/gui/PreviewCommandDialog.java
r7540 r8231 45 45 import javax.swing.filechooser.*; 46 46 import javax.swing.table.*; 47 import org.greenstone.gatherer.Configuration; 47 48 import org.greenstone.gatherer.Dictionary; 48 49 import org.greenstone.gatherer.Gatherer; … … 81 82 82 83 JPanel content_pane = (JPanel) getContentPane(); 83 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));84 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 84 85 85 86 JTextArea instructions_area = new JTextArea(); -
trunk/gli/src/org/greenstone/gatherer/gui/SimpleOpenCollectionDialog.java
r8213 r8231 33 33 import javax.swing.*; 34 34 import javax.swing.event.*; 35 import org.greenstone.gatherer.Configuration; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 138 139 content_pane.add(button_pane, BorderLayout.SOUTH); 139 140 140 Dimension screen_size = Gatherer.config.screen_size;141 Dimension screen_size = Configuration.screen_size; 141 142 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 142 143 screen_size = null; … … 210 211 public GS3CollectionListModel() { 211 212 data = new TreeSet(); 212 File sites_folder = new File(Utility.getSitesDir( Gatherer.config.gsdl3_path));213 File sites_folder = new File(Utility.getSitesDir(Configuration.gsdl3_path)); 213 214 File sites[] = sites_folder.listFiles(); 214 215 for (int s=0; s<sites.length; s++) { 215 216 String site_name = sites[s].getName(); 216 217 System.err.println("found site "+site_name); 217 File collect_folder = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, site_name) );218 File collect_folder = new File(Utility.getCollectDir(Configuration.gsdl3_path, site_name) ); 218 219 if (!collect_folder.exists()) { 219 220 continue; … … 267 268 File collect_folder; 268 269 if (Gatherer.GS3) { 269 collect_folder = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name) );270 collect_folder = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name) ); 270 271 } else { 271 collect_folder = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));272 collect_folder = new File(Utility.getCollectDir(Configuration.gsdl_path)); 272 273 } 273 274 if (!collect_folder.exists()) { -
trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java
r7558 r8231 184 184 boolean bad_value = false; 185 185 if(event.getSource() == ok_button) { 186 if(affected_property != null && Gatherer.config!= null) {186 if(affected_property != null && Configuration.self != null) { 187 187 String value = value_field.getText(); 188 188 if(value.length() > 0) { … … 192 192 if(!bad_value) { 193 193 // Store the value of the property 194 Gatherer.config.setString(affected_property, true, value_field.getText());194 Configuration.setString(affected_property, true, value_field.getText()); 195 195 } 196 196 } … … 201 201 } 202 202 if(!bad_value) { 203 if (Gatherer.config!= null) {203 if (Configuration.self != null) { 204 204 // Store the state of the show message checkbox. 205 Gatherer.config.set(full_property, true, !show_check.isSelected());205 Configuration.set(full_property, true, !show_check.isSelected()); 206 206 } 207 207 // Done. … … 230 230 231 231 public int display() { 232 if (Gatherer.config == null || Gatherer.config.get(full_property, false)) {232 if (Configuration.self == null || Configuration.get(full_property, false)) { 233 233 setVisible(true); 234 234 } -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java
r7517 r8231 41 41 import java.util.*; 42 42 import javax.swing.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Dictionary; 44 45 import org.greenstone.gatherer.Gatherer; … … 274 275 content_pane.add(lower_pane, BorderLayout.SOUTH); 275 276 276 Dimension screen_size = Gatherer.config.screen_size;277 Dimension screen_size = Configuration.screen_size; 277 278 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 278 279 screen_size = null; -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java
r6318 r8231 42 42 import javax.swing.event.*; 43 43 import javax.swing.tree.*; 44 import org.greenstone.gatherer.Configuration; 44 45 import org.greenstone.gatherer.Dictionary; 45 46 import org.greenstone.gatherer.Gatherer; … … 133 134 content_pane.add(button_pane, BorderLayout.SOUTH); 134 135 135 Dimension screen_size = Gatherer.config.screen_size;136 Dimension screen_size = Configuration.screen_size; 136 137 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 137 138 screen_size = null; -
trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java
r7691 r8231 367 367 if (!element.toString().startsWith("hidden.")) { 368 368 // Only process extracted metadata if the user has specified to 369 if(!element.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) || Gatherer.config.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) {369 if(!element.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) || Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) { 370 370 // If a piece of metadata is at folder level, display the warning 371 371 if (!metadatum.isFileLevel()) { -
trunk/gli/src/org/greenstone/gatherer/gui/table/TableCellRenderer.java
r5782 r8231 41 41 import javax.swing.*; 42 42 import javax.swing.table.DefaultTableCellRenderer; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Gatherer; 44 import org.greenstone.gatherer.gui.table.GTableModel;45 45 import org.greenstone.gatherer.msm.ElementWrapper; 46 46 import org.greenstone.gatherer.msm.Metadata; … … 88 88 if(column <= 1) { 89 89 if(isSelected) { 90 renderer.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", true));90 renderer.setBackground(Configuration.getColor("coloring.workspace_heading_background", true)); 91 91 } 92 92 else { 93 renderer.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", true));93 renderer.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 94 94 } 95 95 } 96 96 else { 97 97 if(isSelected) { 98 renderer.setBackground( Gatherer.config.getColor("coloring.workspace_heading_background", true));98 renderer.setBackground(Configuration.getColor("coloring.workspace_heading_background", true)); 99 99 } 100 100 else { 101 renderer.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", true));101 renderer.setBackground(Configuration.getColor("coloring.collection_tree_background", true)); 102 102 } 103 103 } -
trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTreeCellRenderer.java
r6255 r8231 77 77 78 78 String new_value = null; 79 if( Gatherer.config.get("general.show_file_size", Configuration.COLLECTION_SPECIFIC) && node.getFile() != null && !node.getAllowsChildren()) {79 if(Configuration.get("general.show_file_size", Configuration.COLLECTION_SPECIFIC) && node.getFile() != null && !node.getAllowsChildren()) { 80 80 new_value = node.toString() + StaticStrings.SPACE_CHARACTER + StaticStrings.LBRACKET_CHARACTER + Utility.formatFileLength(node.getFile().length()) + StaticStrings.RBRACKET_CHARACTER; 81 81 } -
trunk/gli/src/org/greenstone/gatherer/gui/tree/WorkspaceTree.java
r7639 r8231 4 4 import java.util.Enumeration; 5 5 import javax.swing.tree.TreePath; 6 import org.greenstone.gatherer.Configuration; 6 7 import org.greenstone.gatherer.Gatherer; 7 8 import org.greenstone.gatherer.file.FileNode; … … 49 50 if (refresh_reason == WorkspaceTree.LIBRARY_CONTENTS_CHANGED) { 50 51 Gatherer.println("...Reason: library contents changed."); 51 String collect_directory_str = Gatherer.config.gsdl_path + Utility.COL_DIR;52 String collect_directory_str = Configuration.gsdl_path + Utility.COL_DIR; 52 53 refreshEveryNodeShowingFolder(collect_directory_str); 53 54 WorkspaceTreeModel.refreshGreenstoneCollectionsNode(); -
trunk/gli/src/org/greenstone/gatherer/mem/MEMNode.java
r7326 r8231 151 151 File collect_path; 152 152 if (Gatherer.GS3) { 153 collect_path = new File(Utility.getCollectDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name));153 collect_path = new File(Utility.getCollectDir(Configuration.gsdl3_path, Configuration.site_name)); 154 154 } else { 155 collect_path = new File(Utility.getCollectDir( Gatherer.config.gsdl_path));155 collect_path = new File(Utility.getCollectDir(Configuration.gsdl_path)); 156 156 } 157 157 File current_path = source_path; -
trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java
r7162 r8231 44 44 import javax.swing.text.*; 45 45 import javax.swing.tree.*; 46 import org.greenstone.gatherer.Configuration; 46 47 import org.greenstone.gatherer.Dictionary; 47 48 import org.greenstone.gatherer.Gatherer; … … 153 154 super(Gatherer.g_man); 154 155 this.dialog_options = new String[2]; 155 this.screen_size = Gatherer.config.screen_size;156 this.screen_size = Configuration.screen_size; 156 157 this.self = this; 157 158 … … 167 168 168 169 JPanel content_pane = (JPanel) getContentPane(); 169 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));170 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 170 171 171 172 JPanel upper_pane = new JPanel(); … … 180 181 mds_tree.setCellRenderer(new MEMTreeCellRenderer()); 181 182 mds_tree.setRootVisible(false); 182 mds_tree.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));183 mds_tree.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));184 mds_tree.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));185 mds_tree.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));183 mds_tree.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 184 mds_tree.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 185 mds_tree.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 186 mds_tree.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 186 187 // We may have been asked to select a cetain initial set 187 188 if(set != null) { … … 219 220 set_attributes_pane.setOpaque(false); 220 221 set_attributes_scroll = new JScrollPane(); 221 set_attributes_scroll.getViewport().setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));222 set_attributes_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 222 223 set_attributes_scroll.setOpaque(true); 223 224 set_attributes = new SmarterTable(); 224 225 set_attributes.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 225 set_attributes.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));226 set_attributes.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));227 set_attributes.setHeadingBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));228 set_attributes.setHeadingForeground( Gatherer.config.getColor("coloring.collection_heading_foreground", false));226 set_attributes.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 227 set_attributes.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 228 set_attributes.setHeadingBackground(Configuration.getColor("coloring.collection_heading_background", false)); 229 set_attributes.setHeadingForeground(Configuration.getColor("coloring.collection_heading_foreground", false)); 229 230 set_attributes.setOpaque(false); 230 set_attributes.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));231 set_attributes.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));231 set_attributes.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 232 set_attributes.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 232 233 set_attributes.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 233 234 … … 250 251 element_attributes_pane.setOpaque(false); 251 252 element_attributes_scroll = new JScrollPane(); 252 element_attributes_scroll.getViewport().setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));253 element_attributes_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 253 254 element_attributes_scroll.setOpaque(true); 254 255 element_attributes = new SmarterTable(); 255 256 element_attributes.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 256 element_attributes.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));257 element_attributes.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));258 element_attributes.setHeadingBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));259 element_attributes.setHeadingForeground( Gatherer.config.getColor("coloring.collection_heading_foreground", false));260 element_attributes.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));261 element_attributes.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));257 element_attributes.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 258 element_attributes.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 259 element_attributes.setHeadingBackground(Configuration.getColor("coloring.collection_heading_background", false)); 260 element_attributes.setHeadingForeground(Configuration.getColor("coloring.collection_heading_foreground", false)); 261 element_attributes.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 262 element_attributes.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 262 263 element_attributes.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 263 264 … … 266 267 element_values_pane.setOpaque(false); 267 268 element_values = new SmarterTree(); 268 element_values.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));269 element_values.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));269 element_values.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 270 element_values.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 270 271 element_values.setRootVisible(false); 271 element_values.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));272 element_values.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));272 element_values.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 273 element_values.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 273 274 274 275 JPanel element_novalues_pane = new JPanel(); … … 290 291 profile_attributes_pane.setOpaque(false); 291 292 profile_attributes_scroll = new JScrollPane(); 292 profile_attributes_scroll.getViewport().setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));293 profile_attributes_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 293 294 profile_attributes_scroll.setOpaque(true); 294 295 profile_attributes = new SmarterTable(); 295 296 profile_attributes.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 296 profile_attributes.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));297 profile_attributes.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));298 profile_attributes.setHeadingBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));299 profile_attributes.setHeadingForeground( Gatherer.config.getColor("coloring.collection_heading_foreground", false));300 profile_attributes.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));301 profile_attributes.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));297 profile_attributes.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 298 profile_attributes.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 299 profile_attributes.setHeadingBackground(Configuration.getColor("coloring.collection_heading_background", false)); 300 profile_attributes.setHeadingForeground(Configuration.getColor("coloring.collection_heading_foreground", false)); 301 profile_attributes.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 302 profile_attributes.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 302 303 profile_attributes.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 303 304 … … 642 643 // Creation 643 644 JPanel content_pane = (JPanel) getContentPane(); 644 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));645 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 645 646 JPanel upper_pane = new JPanel(); 646 647 upper_pane.setOpaque(false); … … 675 676 676 677 JTextArea v_text_area = (JTextArea) value.getTextComponent(); 677 v_text_area.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));678 v_text_area.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));679 v_text_area.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));680 v_text_area.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));678 v_text_area.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 679 v_text_area.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 680 v_text_area.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 681 v_text_area.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 681 682 Dictionary.setTooltip(v_text_area, "MEM.Attribute_Value_Tooltip"); 682 683 … … 727 728 content_pane.add(center_pane, BorderLayout.CENTER); 728 729 729 setLocation(( Gatherer.config.screen_size.width - ADD_OR_EDIT_ATTRIBUTE_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_OR_EDIT_ATTRIBUTE_SIZE.height) / 2);730 setLocation((Configuration.screen_size.width - ADD_OR_EDIT_ATTRIBUTE_SIZE.width) / 2, (Configuration.screen_size.height - ADD_OR_EDIT_ATTRIBUTE_SIZE.height) / 2); 730 731 } 731 732 /** Any implementation of ActionListener must include this method so that we can be informed when an action as occured on our registered component, allowing us to add a new attribute to the selected set or element. … … 1047 1048 // Creation 1048 1049 JPanel content_pane = (JPanel) getContentPane(); 1049 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));1050 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 1050 1051 JPanel center_pane = new JPanel(); 1051 1052 center_pane.setOpaque(false); … … 1065 1066 Dictionary.setText(name_label, "MEM.Name"); 1066 1067 name_field = new NonWhitespaceField(); 1067 name_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1068 name_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1069 name_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1070 name_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1068 name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1069 name_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1070 name_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1071 name_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1071 1072 Dictionary.setTooltip(name_field, "MEM.Element_Name_Tooltip"); 1072 1073 … … 1112 1113 content_pane.add(button_pane, BorderLayout.SOUTH); 1113 1114 1114 setLocation(( Gatherer.config.screen_size.width - ADD_ELEMENT_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_ELEMENT_SIZE.height) / 2);1115 setLocation((Configuration.screen_size.width - ADD_ELEMENT_SIZE.width) / 2, (Configuration.screen_size.height - ADD_ELEMENT_SIZE.height) / 2); 1115 1116 } 1116 1117 … … 1126 1127 if(!current_set.containsElement(name_str)) { 1127 1128 // Add it, 1128 String language_code = Gatherer.config.getLanguage();1129 String language_code = Configuration.getLanguage(); 1129 1130 ElementWrapper element = current_set.addElement(name_str, language_code); 1130 1131 // Then update the tree … … 1187 1188 // Creation 1188 1189 JPanel content_pane = (JPanel) getContentPane(); 1189 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));1190 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 1190 1191 JPanel center_pane = new JPanel(); 1191 1192 center_pane.setOpaque(false); … … 1202 1203 Dictionary.setText(name_label, "MEM.Name"); 1203 1204 name_field = new JTextField(); 1204 name_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1205 name_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1206 name_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1207 name_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1205 name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1206 name_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1207 name_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1208 name_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1208 1209 Dictionary.setTooltip(name_field, "MEM.Profile_Name_Tooltip"); 1209 1210 … … 1248 1249 content_pane.add(button_pane, BorderLayout.SOUTH); 1249 1250 1250 setLocation(( Gatherer.config.screen_size.width - ADD_FILE_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_FILE_SIZE.height) / 2);1251 setLocation((Configuration.screen_size.width - ADD_FILE_SIZE.width) / 2, (Configuration.screen_size.height - ADD_FILE_SIZE.height) / 2); 1251 1252 } 1252 1253 /** Any implementation of ActionListener must include this method so that we can be informed when an action as occured on our registered component, allowing us to … … 1305 1306 // Creation 1306 1307 JPanel content_pane = (JPanel) getContentPane(); 1307 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));1308 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 1308 1309 JPanel center_pane = new JPanel(); 1309 1310 center_pane.setOpaque(false); … … 1316 1317 Dictionary.setText(namespace_label, "MEM.Namespace"); 1317 1318 namespace_field = TransformCharacterTextField.createNamespaceTextField(); 1318 namespace_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1319 namespace_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1320 namespace_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1321 namespace_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1319 namespace_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1320 namespace_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1321 namespace_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1322 namespace_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1322 1323 Dictionary.setTooltip(namespace_field, "MEM.Set_Namespace_Tooltip"); 1323 1324 … … 1326 1327 Dictionary.setText(name_label, "MEM.Name"); 1327 1328 name_field = new JTextField(); 1328 name_field.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1329 name_field.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1330 name_field.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1331 name_field.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1329 name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1330 name_field.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1331 name_field.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1332 name_field.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1332 1333 Dictionary.setTooltip(name_field, "MEM.Set_Name_Tooltip"); 1333 1334 … … 1371 1372 content_pane.add(button_pane, BorderLayout.SOUTH); 1372 1373 1373 setLocation(( Gatherer.config.screen_size.width - ADD_SET_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_SET_SIZE.height) / 2);1374 setLocation((Configuration.screen_size.width - ADD_SET_SIZE.width) / 2, (Configuration.screen_size.height - ADD_SET_SIZE.height) / 2); 1374 1375 } 1375 1376 /** Any implementation of ActionListener must include this method so that we can be informed when an action as occured on our registered component, allowing us to … … 1434 1435 // Create 1435 1436 JPanel content_pane = (JPanel) getContentPane(); 1436 content_pane.setBackground( Gatherer.config.getColor("coloring.collection_heading_background", false));1437 content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 1437 1438 JPanel center_pane = new JPanel(); 1438 1439 center_pane.setOpaque(false); … … 1445 1446 Dictionary.setText(subject_tree_label, "MEM.Subject"); 1446 1447 subject_tree = new SmarterTree(); 1447 subject_tree.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1448 subject_tree.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1449 subject_tree.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1450 subject_tree.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1448 subject_tree.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1449 subject_tree.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1450 subject_tree.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1451 subject_tree.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1451 1452 JPanel value_pane = new JPanel(); 1452 1453 value_pane.setOpaque(false); … … 1455 1456 Dictionary.setText(value_label, "MEM.Value"); 1456 1457 value = new JTextArea(); 1457 value.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));1458 value.setForeground( Gatherer.config.getColor("coloring.collection_tree_foreground", false));1459 value.setSelectionColor( Gatherer.config.getColor("coloring.collection_selection_background", false));1460 value.setSelectedTextColor( Gatherer.config.getColor("coloring.collection_selection_foreground", false));1458 value.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 1459 value.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 1460 value.setSelectionColor(Configuration.getColor("coloring.collection_selection_background", false)); 1461 value.setSelectedTextColor(Configuration.getColor("coloring.collection_selection_foreground", false)); 1461 1462 Dictionary.setTooltip(value, "MEM.Value_Tooltip"); 1462 1463 … … 1502 1503 content_pane.add(inner_pane, BorderLayout.CENTER); 1503 1504 content_pane.add(button_pane, BorderLayout.SOUTH); 1504 setLocation(( Gatherer.config.screen_size.width - ADD_OR_EDIT_VALUE_SIZE.width) / 2, (Gatherer.config.screen_size.height - ADD_OR_EDIT_VALUE_SIZE.height) / 2);1505 setLocation((Configuration.screen_size.width - ADD_OR_EDIT_VALUE_SIZE.width) / 2, (Configuration.screen_size.height - ADD_OR_EDIT_VALUE_SIZE.height) / 2); 1505 1506 } 1506 1507 /** Any implementation of ActionListener must include this method so that we can be informed when an action as occured on our registered component, allowing us to add a new metadata value to the assigned values tree. -
trunk/gli/src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java
r8168 r8231 129 129 130 130 // Get the extracted metadata for this file, if desired 131 if ( Gatherer.config.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) == true) {131 if (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) == true) { 132 132 current_file_metadata.addAll(DocXMLFileManager.getMetadataExtractedFromFile(current_file)); 133 133 } -
trunk/gli/src/org/greenstone/gatherer/metadata/MetadataElement.java
r8164 r8231 29 29 30 30 import java.io.File; 31 import org.greenstone.gatherer. Gatherer;31 import org.greenstone.gatherer.Configuration; 32 32 import org.greenstone.gatherer.util.XMLTools; 33 33 import org.w3c.dom.*; … … 101 101 public String getDisplayName() 102 102 { 103 String metadata_element_display_name = MetadataTools.getMetadataElementAttribute(this, "identifier", Gatherer.config.getLanguage(), "en");103 String metadata_element_display_name = MetadataTools.getMetadataElementAttribute(this, "identifier", Configuration.getLanguage(), "en"); 104 104 if (metadata_element_display_name != null) { 105 105 return getNamespace() + "." + metadata_element_display_name; -
trunk/gli/src/org/greenstone/gatherer/metadata/MetadataValueTableModel.java
r8165 r8231 178 178 179 179 // Get the extracted metadata for this file, if desired 180 if ( Gatherer.config.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) == true) {180 if (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) == true) { 181 181 ArrayList extracted_metadata = DocXMLFileManager.getMetadataExtractedFromFile(current_file); 182 182 for (int k = 0; k < extracted_metadata.size(); k++) { -
trunk/gli/src/org/greenstone/gatherer/msm/ExportMDSPrompt.java
r6318 r8231 42 42 import javax.swing.*; 43 43 import javax.swing.filechooser.*; 44 import org.greenstone.gatherer.Configuration; 44 45 import org.greenstone.gatherer.Dictionary; 45 46 import org.greenstone.gatherer.Gatherer; … … 201 202 content_pane.add(button_pane, BorderLayout.SOUTH); 202 203 // Display 203 Dimension screen_size = Gatherer.config.screen_size;204 Dimension screen_size = Configuration.screen_size; 204 205 setLocation((screen_size.width - getSize().width) / 2, (screen_size.height - getSize().height) / 2); 205 206 } -
trunk/gli/src/org/greenstone/gatherer/msm/GreenstoneArchiveParser.java
r7743 r8231 189 189 MetadataSet extracted_mds = Gatherer.c_man.msm.getSet(Utility.EXTRACTED_METADATA_NAMESPACE); 190 190 if (extracted_mds != null) { 191 element = extracted_mds.addElement(name, Gatherer.config.getLanguage());191 element = extracted_mds.addElement(name, Configuration.getLanguage()); 192 192 } 193 193 } -
trunk/gli/src/org/greenstone/gatherer/msm/MSMPrompt.java
r7609 r8231 43 43 import javax.swing.*; 44 44 import javax.swing.event.*; 45 import org.greenstone.gatherer.Configuration; 45 46 import org.greenstone.gatherer.Dictionary; 46 47 import org.greenstone.gatherer.Gatherer; … … 101 102 progress.setStringPainted(true); 102 103 103 screen_size = Gatherer.config.screen_size;104 screen_size = Configuration.screen_size; 104 105 } 105 106 … … 686 687 JPanel control_pane = new JPanel(); 687 688 JTextArea instructions = new JTextArea(); 688 instructions.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));689 instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 689 690 instructions.setEditable(false); 690 691 instructions.setLineWrap(true); … … 698 699 Dictionary.setText(original_label, "MSMPrompt.Select_Element_Original"); 699 700 JTextField original = new JTextField(name); 700 original.setBackground( Gatherer.config.getColor("coloring.collection_tree_background", false));701 original.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 701 702 original.setEditable(false); 702 703 … … 878 879 Element element = mds.getElement(name); 879 880 if (element == null) { 880 result = mds.addElement(name, Gatherer.config.getLanguage());881 result = mds.addElement(name, Configuration.getLanguage()); 881 882 } 882 883 else { -
trunk/gli/src/org/greenstone/gatherer/msm/MSMUtils.java
r8000 r8231 39 39 import java.io.*; 40 40 import java.util.*; 41 import org.greenstone.gatherer.Configuration; 41 42 import org.greenstone.gatherer.Gatherer; 42 43 import org.greenstone.gatherer.cdm.CommandTokenizer; … … 379 380 */ 380 381 static public String getDescription(Element element) { 381 String language_code_str = Gatherer.config.getLanguage();382 String language_code_str = Configuration.getLanguage(); 382 383 StringBuffer description = new StringBuffer(StaticStrings.EMPTY_STR); 383 384 description.append(getElementAttribute(element, StaticStrings.DEFINITION_VALUE, language_code_str)); … … 532 533 */ 533 534 static final public String getIdentifier(Element element) { 534 String identifier = getElementAttribute(element, StaticStrings.IDENTIFIER_VALUE, Gatherer.config.getLanguage());535 String identifier = getElementAttribute(element, StaticStrings.IDENTIFIER_VALUE, Configuration.getLanguage()); 535 536 // Failing the above we return the nodes name instead. 536 537 if(identifier == null || identifier.length() == 0) { -
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSet.java
r7744 r8231 41 41 import java.util.*; 42 42 import org.apache.xerces.dom.*; 43 import org.greenstone.gatherer.Configuration; 43 44 import org.greenstone.gatherer.Dictionary; 44 45 import org.greenstone.gatherer.Gatherer; … … 294 295 */ 295 296 public String getDescription() { 296 if(current_language_code != null && ! Gatherer.config.getLanguage().equals(current_language_code)) {297 if(current_language_code != null && !Configuration.getLanguage().equals(current_language_code)) { 297 298 description = null; 298 299 } … … 391 392 */ 392 393 public String getName() { 393 if(current_language_code != null && ! Gatherer.config.getLanguage().equals(current_language_code)) {394 if(current_language_code != null && !Configuration.getLanguage().equals(current_language_code)) { 394 395 name = null; 395 396 } … … 537 538 538 539 // Determine the language code. 539 current_language_code = Gatherer.config.getLanguage();540 current_language_code = Configuration.getLanguage(); 540 541 541 542 ///ystem.err.println("Searching for the " + element_name + " in " + current_language_code); -
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java
r8035 r8231 359 359 MetadataSet mds = (MetadataSet)mds_hashtable.get(keys.nextElement()); 360 360 if((!mds.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) && !mds.getNamespace().equals(HIDDEN)) 361 || (mds.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) && ( Gatherer.config.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) || force_extracted))361 || (mds.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) && (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) || force_extracted)) 362 362 || (mds.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE) && mds.getNamespace().equals(HIDDEN) && all)) { 363 363 NodeList set_elements = mds.getElements(); -
trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java
r7924 r8231 217 217 state = BUILD; 218 218 // Produce a lower detail message if required 219 if( Gatherer.config.getMode() <= threshold && !stop) {219 if(Configuration.getMode() <= threshold && !stop) { 220 220 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.BuildBegun1"), event.getStatus())); 221 221 } … … 237 237 if(value.equals(COMPRESSTEXT_VALUE)) { 238 238 state = COMPRESSTEXT; 239 if( Gatherer.config.getMode() <= threshold) {239 if(Configuration.getMode() <= threshold) { 240 240 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.CompressText"), event.getStatus())); 241 241 } … … 243 243 else if(value.equals(INDEX_VALUE)) { 244 244 state = INDEX; 245 if( Gatherer.config.getMode() <= threshold) {245 if(Configuration.getMode() <= threshold) { 246 246 String args[] = new String[1]; 247 247 args[0] = element.getAttribute(SOURCE_ATTRIBUTE); … … 252 252 else if(value.equals(CREATEINFODATA_VALUE)) { 253 253 state = CREATEINFODATA; 254 if( Gatherer.config.getMode() <= threshold) {254 if(Configuration.getMode() <= threshold) { 255 255 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.InfoDatabase"), event.getStatus())); 256 256 } … … 258 258 else if(value.equals(PHIND_VALUE)) { 259 259 state = PHIND; 260 if( Gatherer.config.getMode() <= threshold) {260 if(Configuration.getMode() <= threshold) { 261 261 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.Phind"), event.getStatus())); 262 262 } … … 264 264 else if(value.equals(CREATINGAUXILARY_VALUE)) { 265 265 state = CREATINGAUXILARY; 266 if( Gatherer.config.getMode() <= threshold) {266 if(Configuration.getMode() <= threshold) { 267 267 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.Auxilary"), event.getStatus())); 268 268 } … … 280 280 setValue(MAX); 281 281 state = BASE; 282 if( Gatherer.config.getMode() <= threshold) {282 if(Configuration.getMode() <= threshold) { 283 283 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Build.BuildComplete1"), event.getStatus())); 284 284 } … … 470 470 } 471 471 // If we are dealing with lower detail modes then veto any other messages. We do this here as the progress monitors are garuenteed to recieve this message before anything else 472 else if( Gatherer.config.getMode() <= threshold) {472 else if(Configuration.getMode() <= threshold) { 473 473 event.veto(); 474 474 } -
trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
r7963 r8231 222 222 showing_string = false; 223 223 } 224 if( Gatherer.config.getMode() <= threshold) {224 if(Configuration.getMode() <= threshold) { 225 225 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportBegun1"), event.getStatus())); 226 226 } … … 241 241 ///ystem.err.println("#FileProcessing"); 242 242 // If we are at lower mode settings fire a new 'dumbed down' event 243 if( Gatherer.config.getMode() <= threshold) {243 if(Configuration.getMode() <= threshold) { 244 244 String args[] = new String[2]; 245 245 args[0] = element.getAttribute(NAME_ATTRIBUTE); … … 251 251 // processing error 252 252 else if (name.equals(PROCESSINGERROR_ELEMENT)) { 253 if( Gatherer.config.getMode() <= threshold) {253 if(Configuration.getMode() <= threshold) { 254 254 String args[] = new String[1]; 255 255 args[0] = element.getAttribute(NAME_ATTRIBUTE); … … 260 260 // unrecognised file 261 261 else if (name.equals(NONRECOGNISEDFILE_ELEMENT)) { 262 if( Gatherer.config.getMode() <= threshold) {262 if(Configuration.getMode() <= threshold) { 263 263 String args[] = new String[1]; 264 264 args[0] =element.getAttribute(NAME_ATTRIBUTE); … … 269 269 // unprocessed file 270 270 else if (name.equals(NONPROCESSEDFILE_ELEMENT)) { 271 if( Gatherer.config.getMode() <= threshold) {271 if(Configuration.getMode() <= threshold) { 272 272 String args[] = new String[1]; 273 273 args[0] =element.getAttribute(NAME_ATTRIBUTE); … … 281 281 setValue(next_progress_value); 282 282 // If we are at lower mode settings fire a new 'dumbed down' event 283 if( Gatherer.config.getMode() <= threshold) {283 if(Configuration.getMode() <= threshold) { 284 284 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete1"), event.getStatus())); 285 285 String considered_str = element.getAttribute(CONSIDERED_ATTRIBUTE); … … 361 361 } 362 362 } // GLI output 363 else if( Gatherer.config.getMode() <= threshold) {363 else if(Configuration.getMode() <= threshold) { 364 364 event.veto(); 365 365 } -
trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r8205 r8231 473 473 Utility.upload_url_zip(col_name,"etc"); 474 474 475 String col_dir = Utility.getCollectionDir( Gatherer.config.gsdl_path, col_name);475 String col_dir = Utility.getCollectionDir(Configuration.gsdl_path, col_name); 476 476 File img_dir = new File(Utility.getImagesDir(col_dir)); 477 477 if (img_dir.exists()) { … … 654 654 655 655 // If we were cancelled, and we are lower details modes, fire off one last message. 656 if(status == CANCELLED && Gatherer.config.getMode() <= Configuration.SYSTEMS_MODE) {656 if(status == CANCELLED && Configuration.getMode() <= Configuration.SYSTEMS_MODE) { 657 657 GShellEvent current_event = new GShellEvent(this, 0, type, Dictionary.get("GShell.Build.BuildCancelled"), status); 658 658 Object[] concerned = listeners.getListenerList(); -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r8148 r8231 46 46 import org.apache.xerces.parsers.*; 47 47 import org.apache.xml.serialize.*; 48 import org.greenstone.gatherer.Configuration; 48 49 import org.greenstone.gatherer.Dictionary; 49 50 import org.greenstone.gatherer.Gatherer; … … 498 499 499 500 if (Gatherer.GS3) { 500 this_col_dir = getCollectionDir( Gatherer.config.gsdl3_path, Gatherer.config.site_name, col_name);501 this_col_dir = getCollectionDir(Configuration.gsdl3_path, Configuration.site_name, col_name); 501 502 } else { 502 this_col_dir = getCollectionDir( Gatherer.config.gsdl_path, col_name);503 this_col_dir = getCollectionDir(Configuration.gsdl_path, col_name); 503 504 504 505 } … … 584 585 static public String getHelpFolder() { 585 586 586 String help_folder = "help/" + Gatherer.config.getLanguage() + "/";587 String help_folder = "help/" + Configuration.getLanguage() + "/"; 587 588 588 589 // Try in the JAR/classes directory first … … 813 814 814 815 // set up output stream for zip download 815 String col_dir = Utility.getCollectDir( Gatherer.config.gsdl_path);816 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 816 817 String zip_fname = col_dir + col_name + ".zip"; 817 818 FileOutputStream zip_fos = new FileOutputStream(zip_fname); … … 842 843 final int maxBufferSize = 1024; 843 844 844 String col_dir = Utility.getCollectDir( Gatherer.config.gsdl_path);845 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 845 846 String zip_fname = col_dir + col_name + ".zip"; 846 847 String upload_cgi = Gatherer.cgiBase + "upload"; … … 1027 1028 static public void zipup(String col_name, String dir_or_file) 1028 1029 { 1029 String col_dir = Utility.getCollectDir( Gatherer.config.gsdl_path);1030 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 1030 1031 int prefix_strip = col_dir.length(); 1031 1032 … … 1080 1081 static public void unzip(String col_name) 1081 1082 { 1082 String col_dir = Utility.getCollectDir( Gatherer.config.gsdl_path);1083 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 1083 1084 String zip_fname = col_dir + col_name + ".zip"; 1084 1085 int zip_mode = ZipFile.OPEN_READ | ZipFile.OPEN_DELETE;
Note:
See TracChangeset
for help on using the changeset viewer.