Changeset 8231 for trunk/gli/src/org/greenstone/gatherer/cdm
- Timestamp:
- 2004-10-07T16:44:32+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/cdm
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.