Changeset 5593
- Timestamp:
- 2003-10-07T15:35:23+13:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r5571 r5593 229 229 230 230 231 static public String newget(String key)232 { 233 return self. get(key);234 } 235 236 237 static public String newget(String key, String arg)231 static public String get(String key) 232 { 233 return self.oldget(key); 234 } 235 236 237 static public String get(String key, String arg) 238 238 { 239 239 String[] args = new String[1]; 240 240 args[0] = arg; 241 return self. get(key, args);242 } 243 244 245 static public String newget(String key, String[] args)246 { 247 return self. get(key, args);241 return self.oldget(key, args); 242 } 243 244 245 static public String get(String key, String[] args) 246 { 247 return self.oldget(key, args); 248 248 } 249 249 … … 255 255 * @return A <strong>String</strong> which has been referenced by the key String and that either contains no argument fields, or has had the argument fields automatiically populated with formatting Strings of with argument String provided in the get call. 256 256 */ 257 public String get(String key) { 258 return get(key, (String[])null); 259 } 257 public String oldget(String key) { 258 return oldget(key, (String[])null); 259 } 260 260 261 /** 261 262 * @deprecated 262 263 * Convienence method with transforms the second string argument into a string array. */ 263 public String get(String key, String arg) {264 public String oldget(String key, String arg) { 264 265 String[] args = new String[1]; 265 266 args[0] = arg; 266 return get(key, args);267 return oldget(key, args); 267 268 } 268 269 … … 273 274 * @return A <strong>String</strong> which has been referenced by the key String and that either contains no argument fields, or has had the argument fields automatiically populated with formatting Strings of with argument String provided in the get call. 274 275 */ 275 public String get(String key, String args[]) {276 public String oldget(String key, String args[]) { 276 277 if(key_list != null) { 277 278 synchronized(this) { … … 310 311 f_subargs[0] = "Arial"; 311 312 } 312 complete = complete + get("Farg" + arg_num, f_subargs);313 complete = complete + oldget("Farg" + arg_num, f_subargs); 313 314 } 314 315 } … … 452 453 453 454 if (details.has_text) { 454 text = self. get(details.text_key, details.text_args);455 text = self.oldget(details.text_key, details.text_args); 455 456 } 456 457 if (details.has_tooltip) { 457 tooltip = self. get(details.tooltip_key, (String[]) null);458 tooltip = self.oldget(details.tooltip_key, (String[]) null); 458 459 } 459 460 } … … 496 497 497 498 /** 498 * @deprecated 499 * Register a tab pane component. */ 499 * Register a tab pane component. This will be deprecated eventually. */ 500 500 static public void register(JTabbedPane component) 501 501 { 502 if (component != null) {502 if (component != null) { 503 503 String[] args = new String[component.getTabCount()]; 504 504 505 505 // Iterate through the tabbed panes tabs, updating values and recording the original key of each item in args. 506 for (int i = 0; i < args.length; i++) {506 for (int i = 0; i < args.length; i++) { 507 507 if (args[i] == null) { 508 508 args[i] = component.getTitleAt(i); 509 509 } 510 String value = self. get(args[i], (String[])null);511 String tooltip = self. get(args[i] + "_Tooltip", (String[])null);512 JTabbedPaneChangeTask task = new JTabbedPaneChangeTask(component, args[i],i, value, tooltip);510 String value = self.oldget(args[i], (String[]) null); 511 String tooltip = self.oldget(args[i] + "_Tooltip", (String[]) null); 512 JTabbedPaneChangeTask task = new JTabbedPaneChangeTask(component, i, value, tooltip); 513 513 SwingUtilities.invokeLater(task); 514 514 } … … 520 520 static private class JTabbedPaneChangeTask 521 521 implements Runnable { 522 protected String key; 523 pr otected String value;522 523 private JTabbedPane component; 524 524 private int index; 525 private JTabbedPane component;525 private String value; 526 526 private String tooltip; 527 527 528 public JTabbedPaneChangeTask(JTabbedPane component, String key, int index, String value, String tooltip) { 529 this.key = key; 530 this.value = value; 528 public JTabbedPaneChangeTask(JTabbedPane component, int index, String value, String tooltip) { 531 529 this.component = component; 532 530 this.index = index; 531 this.value = value; 533 532 this.tooltip = tooltip; 534 533 } 534 535 535 public void run() { 536 536 component.setTitleAt(index, value); 537 if(!tooltip.equals(key+"_Tooltip")) { 538 component.setToolTipTextAt(index, tooltip); 539 } 540 else { 541 component.setToolTipTextAt(index, null); 542 } 537 component.setToolTipTextAt(index, tooltip); 543 538 } 544 539 } -
trunk/gli/src/org/greenstone/gatherer/GAuthenticator.java
r5536 r5593 72 72 protected PasswordAuthentication getPasswordAuthentication() { 73 73 // Component definition. 74 dialog = new JDialog (Gatherer.g_man, Dictionary. newget("GAuthenticator.Title"), true);74 dialog = new JDialog (Gatherer.g_man, Dictionary.get("GAuthenticator.Title"), true); 75 75 dialog.setModal(true); 76 76 dialog.setSize(SIZE); -
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r5581 r5593 366 366 } 367 367 else { 368 JOptionPane.showMessageDialog(g_man, Dictionary. newget("General.Outstanding_Processes"), Dictionary.newget("General.Outstanding_Processes_Title"), JOptionPane.ERROR_MESSAGE);368 JOptionPane.showMessageDialog(g_man, Dictionary.get("General.Outstanding_Processes"), Dictionary.get("General.Outstanding_Processes_Title"), JOptionPane.ERROR_MESSAGE); 369 369 g_man.hide(); 370 370 } … … 586 586 dialog.dispose(); 587 587 dialog = null; 588 ///ystem.out.println(Dictionary. newget("General.Missing_EXEC"));588 ///ystem.out.println(Dictionary.get("General.Missing_EXEC")); 589 589 } 590 590 … … 596 596 dialog.dispose(); 597 597 dialog = null; 598 ///ystem.out.println(Dictionary. newget("General.Missing_GSDL"));598 ///ystem.out.println(Dictionary.get("General.Missing_GSDL")); 599 599 } 600 600 … … 605 605 dialog.dispose(); 606 606 dialog = null; 607 ///ystem.out.println(Dictionary. newget("General.Missing_PERL"));607 ///ystem.out.println(Dictionary.get("General.Missing_PERL")); 608 608 } 609 609 … … 626 626 */ 627 627 static public void printUsage(Dictionary dictionary) { 628 System.out.println(Dictionary. newget("General.Usage"));628 System.out.println(Dictionary.get("General.Usage")); 629 629 } 630 630 … … 735 735 ///ystem.err.print("."); 736 736 if(attempt_count == 60) { 737 try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary. newget("Server.QuitTimeOut"), Dictionary.newget("General.Warning"), JOptionPane.YES_NO_OPTION);737 try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.QuitTimeOut"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION); 738 738 } 739 739 else { … … 798 798 while(gsdlsite_cfg.getURL() != null && try_again == JOptionPane.YES_OPTION) { 799 799 if(attempt_count == 60) { 800 try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary. newget("Server.QuitTimeOut"), Dictionary.newget("General.Warning"), JOptionPane.YES_NO_OPTION);800 try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.QuitTimeOut"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION); 801 801 } 802 802 else { … … 809 809 } 810 810 //if(gsdlsite_cfg.getURL() != null) { 811 //JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("Server.QuitManual"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);811 //JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Server.QuitManual"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 812 812 //} 813 813 } … … 822 822 // If the local server is still running then our changed values will get overwritten. 823 823 if(gsdlsite_cfg.getURL() != null) { 824 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("Server.QuitFailed"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);824 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Server.QuitFailed"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 825 825 } 826 826 gsdlsite_cfg = null; -
trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java
r5590 r5593 540 540 String args[] = new String[1]; 541 541 args[0] = argument.getName(); 542 JOptionPane.showMessageDialog(self, Dictionary. newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);542 JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE); 543 543 args = null; 544 544 return false; … … 563 563 args[0] = argument.getName(); 564 564 args[1] = result; 565 JOptionPane.showMessageDialog(self, Dictionary. newget("CDM.ArgumentConfiguration.Bad_Integer", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);565 JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Bad_Integer", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE); 566 566 args = null; 567 567 return false; … … 573 573 String args[] = new String[1]; 574 574 args[0] = argument.getName(); 575 JOptionPane.showMessageDialog(self, Dictionary. newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);575 JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE); 576 576 args = null; 577 577 return false; … … 612 612 String args[] = new String[1]; 613 613 args[0] = argument.getName(); 614 JOptionPane.showMessageDialog(self, Dictionary. newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);614 JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE); 615 615 return false; 616 616 } -
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r5590 r5593 200 200 if(index < 0) { 201 201 String args[] = new String[2]; 202 args[0] = Dictionary. newget("CDM.ClassifierManager.Classifier");202 args[0] = Dictionary.get("CDM.ClassifierManager.Classifier"); 203 203 args[1] = classifier.getName(); 204 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.Move.At_Top", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);204 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Top", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 205 205 return; 206 206 } … … 213 213 if(index >= getSize()) { 214 214 String args[] = new String[2]; 215 args[0] = Dictionary. newget("CDM.ClassifierManager.Classifier_Str");215 args[0] = Dictionary.get("CDM.ClassifierManager.Classifier_Str"); 216 216 args[1] = classifier.getName(); 217 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.Move.At_Bottom", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);217 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Bottom", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 218 218 return; 219 219 } … … 337 337 String classifier_name = getClassifierName(classifier); 338 338 Gatherer.println("Zero length argument xml detected for: " + classifier_name); 339 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.ClassifierManager.Classifier_XML_Parse_Failed", classifier_name), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);339 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_XML_Parse_Failed", classifier_name), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 340 340 classifier_name = null; 341 341 } … … 370 370 if(files != null) { 371 371 // Create a progress indicator. 372 ParsingProgress progress = new ParsingProgress(Dictionary. newget("CDM.ClassifierManager.Parsing.Title"), Dictionary.newget("CDM.ClassifierManager.Parsing.Message"), files.length);372 ParsingProgress progress = new ParsingProgress(Dictionary.get("CDM.ClassifierManager.Parsing.Title"), Dictionary.get("CDM.ClassifierManager.Parsing.Message"), files.length); 373 373 for(int i = 0; i < files.length; i++) { 374 374 // We only want to check Perl Modules. … … 516 516 // Create 517 517 add = new JButton(); 518 Dictionary. setBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip");518 Dictionary.registerBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip"); 519 519 JPanel button_pane = new JPanel(); 520 520 JPanel central_pane = new JPanel(); 521 521 configure = new JButton(); 522 522 configure.setEnabled(false); 523 Dictionary. setBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip");523 Dictionary.registerBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip"); 524 524 JPanel header_pane = new JPanel(); 525 525 instructions = new JTextArea(); … … 528 528 instructions.setRows(6); 529 529 instructions.setWrapStyleWord(true); 530 Dictionary. setText(instructions, "CDM.ClassifierManager.Instructions");530 Dictionary.registerText(instructions, "CDM.ClassifierManager.Instructions"); 531 531 532 532 classifier = new GComboBox(getAvailable()); … … 537 537 classifier.setTextNonSelectionColor(Gatherer.config.getColor("coloring.workspace_tree_foreground", false)); 538 538 classifier.setTextSelectionColor(Gatherer.config.getColor("coloring.collection_selection_foreground", false)); 539 Dictionary. setTooltip(classifier, "CDM.ClassifierManager.Classifier_Tooltip");539 Dictionary.registerTooltip(classifier, "CDM.ClassifierManager.Classifier_Tooltip"); 540 540 541 541 JLabel classifier_label = new JLabel(); 542 Dictionary. setText(classifier_label, "CDM.ClassifierManager.Classifier");542 Dictionary.registerText(classifier_label, "CDM.ClassifierManager.Classifier"); 543 543 classifier_list = new JList(model); 544 544 classifier_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 546 546 classifier_list_label.setHorizontalAlignment(JLabel.CENTER); 547 547 classifier_list_label.setOpaque(true); 548 Dictionary. setText(classifier_list_label, "CDM.ClassifierManager.Assigned");548 Dictionary.registerText(classifier_list_label, "CDM.ClassifierManager.Assigned"); 549 549 JPanel classifier_list_pane = new JPanel(); 550 550 JPanel classifier_pane = new JPanel(); 551 551 remove = new JButton(); 552 552 remove.setEnabled(false); 553 Dictionary. setBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip");553 Dictionary.registerBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip"); 554 554 555 555 JLabel title = new JLabel(); 556 556 title.setHorizontalAlignment(JLabel.CENTER); 557 557 title.setOpaque(true); 558 Dictionary. setText(title, "CDM.ClassifierManager.Title");558 Dictionary.registerText(title, "CDM.ClassifierManager.Title"); 559 559 560 560 JPanel temp = new JPanel(new BorderLayout()); … … 635 635 636 636 // Scope these mad bordering skillz. 637 temp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,0,5,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("CDM.ClassifierManager.Controls")), BorderFactory.createEmptyBorder(2,2,2,2))));637 temp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,0,5,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("CDM.ClassifierManager.Controls")), BorderFactory.createEmptyBorder(2,2,2,2)))); 638 638 temp.add(classifier_pane, BorderLayout.NORTH); 639 639 temp.add(button_pane, BorderLayout.SOUTH); … … 712 712 } 713 713 else { 714 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.ClassifierManager.Classifier_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);714 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 715 715 } 716 716 } -
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r5590 r5593 369 369 button_pane.add(remove_button); 370 370 371 center_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("CDM.FormatManager.Editing_Controls")), BorderFactory.createEmptyBorder(2,2,2,2)));371 center_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("CDM.FormatManager.Editing_Controls")), BorderFactory.createEmptyBorder(2,2,2,2))); 372 372 center_pane.setLayout(new BorderLayout()); 373 373 center_pane.add(selection_pane, BorderLayout.NORTH); -
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r5536 r5593 356 356 */ 357 357 public void setSelectedView(String type) { 358 type = Dictionary. newget(type);358 type = Dictionary.get(type); 359 359 for(int i = 0; i < root.getChildCount(); i++) { 360 360 DesignNode child = (DesignNode) root.getChildAt(i); … … 379 379 */ 380 380 public String toString() { 381 return Dictionary. newget("CDM.GUI." + (String)getUserObject());381 return Dictionary.get("CDM.GUI." + (String)getUserObject()); 382 382 } 383 383 } -
trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java
r5590 r5593 107 107 } 108 108 else { 109 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.IndexManager.Index_Exists"), Dictionary.newget("General.Warning"), JOptionPane.WARNING_MESSAGE);109 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.IndexManager.Index_Exists"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE); 110 110 } 111 111 } … … 125 125 } 126 126 else { 127 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.IndexManager.Level_Exists"), Dictionary.newget("General.Warning"), JOptionPane.WARNING_MESSAGE);127 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.IndexManager.Level_Exists"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE); 128 128 } 129 129 } … … 587 587 Dictionary.registerText(level_label, "CDM.IndexManager.Level"); 588 588 level_combobox = new JComboBox(); 589 level_combobox.addItem(Dictionary. newget("CDM.IndexManager.Document"));590 level_combobox.addItem(Dictionary. newget("CDM.IndexManager.Paragraph"));591 level_combobox.addItem(Dictionary. newget("CDM.IndexManager.Section"));589 level_combobox.addItem(Dictionary.get("CDM.IndexManager.Document")); 590 level_combobox.addItem(Dictionary.get("CDM.IndexManager.Paragraph")); 591 level_combobox.addItem(Dictionary.get("CDM.IndexManager.Section")); 592 592 level_combobox.setEditable(false); 593 593 Dictionary.registerTooltip(level_combobox, "CDM.IndexManager.Level_Tooltip"); … … 800 800 JLabel component = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); 801 801 if(default_index != null && default_index.equals(value)) { 802 component.setText(component.getText() + " " + Dictionary. newget("CDM.IndexManager.Default_Index_Indicator"));802 component.setText(component.getText() + " " + Dictionary.get("CDM.IndexManager.Default_Index_Indicator")); 803 803 } 804 804 return component; … … 1199 1199 header_panel.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER); 1200 1200 1201 tabbed_pane.add(Dictionary. newget("CDM.IndexManager.MGPP.Indexes"), indexes_panel);1202 tabbed_pane.add(Dictionary. newget("CDM.IndexManager.MGPP.Levels"), levels_panel);1201 tabbed_pane.add(Dictionary.get("CDM.IndexManager.MGPP.Indexes"), indexes_panel); 1202 tabbed_pane.add(Dictionary.get("CDM.IndexManager.MGPP.Levels"), levels_panel); 1203 1203 1204 1204 setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); -
trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java
r5590 r5593 195 195 element_label.setHorizontalAlignment(JLabel.CENTER); 196 196 element_label.setOpaque(true); 197 Dictionary. setText(element_label, "CDM.MetadataSetManager.Elements");197 Dictionary.registerText(element_label, "CDM.MetadataSetManager.Elements"); 198 198 element_list = new JList(); 199 199 element_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); -
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r5590 r5593 146 146 } 147 147 if(plugin.getName().equals(StaticStrings.ARCPLUG_STR) || plugin.getName().equals(StaticStrings.RECPLUG_STR)) { 148 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.Move.Fixed"), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);148 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.Fixed"), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 149 149 return; 150 150 } … … 183 183 if(index < 0) { 184 184 String args[] = new String[2]; 185 args[0] = Dictionary. newget("CDM.PlugInManager.PlugIn_Str");185 args[0] = Dictionary.get("CDM.PlugInManager.PlugIn_Str"); 186 186 args[1] = plugin.getName(); 187 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.Move.At_Top", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);187 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Top", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 188 188 return; 189 189 } … … 198 198 String args[] = new String[1]; 199 199 args[0] = plugin.getName(); 200 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.Move.Cannot", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);200 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.Cannot", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 201 201 // Still not going to move RecPlug or ArcPlug. 202 202 return; … … 376 376 String[] margs = new String[1]; 377 377 margs[0] = plugin_name; 378 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.PlugInManager.PlugIn_XML_Parse_Failed", margs), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);378 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", margs), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 379 379 } 380 380 } … … 413 413 if(files != null) { 414 414 // Create a progress indicator. 415 ParsingProgress progress = new ParsingProgress(Dictionary. newget("CDM.PlugInManager.Parsing.Title"), Dictionary.newget("CDM.PlugInManager.Parsing.Message"), files.length);415 ParsingProgress progress = new ParsingProgress(Dictionary.get("CDM.PlugInManager.Parsing.Title"), Dictionary.get("CDM.PlugInManager.Parsing.Message"), files.length); 416 416 for(int i = 0; i < files.length; i++) { 417 417 // We only want to check Perl Modules. … … 696 696 (BorderFactory.createEmptyBorder(5,0,5,0), 697 697 BorderFactory.createCompoundBorder 698 (BorderFactory.createTitledBorder(Dictionary. newget("CDM.PlugInManager.Controls")),698 (BorderFactory.createTitledBorder(Dictionary.get("CDM.PlugInManager.Controls")), 699 699 BorderFactory.createEmptyBorder(2,2,2,2)))); 700 700 … … 771 771 } 772 772 else { 773 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CDM.PlugInManager.PlugIn_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);773 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 774 774 } 775 775 base_plugin = null; -
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r5590 r5593 102 102 if((direction && index < 0) || (!direction && index >= getSize())) { 103 103 String args[] = new String[2]; 104 args[0] = Dictionary. newget("CDM.SearchTypeManager.SearchType");104 args[0] = Dictionary.get("CDM.SearchTypeManager.SearchType"); 105 105 args[1] = search_type.toString(); 106 106 String message = null; 107 107 if (direction) { 108 message = Dictionary. newget("CDM.Move.At_Top", args);108 message = Dictionary.get("CDM.Move.At_Top", args); 109 109 } 110 110 else { 111 message = Dictionary. newget("CDM.Move.At_Bottom", args);112 } 113 JOptionPane.showMessageDialog(Gatherer.g_man, message, Dictionary. newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);111 message = Dictionary.get("CDM.Move.At_Bottom", args); 112 } 113 JOptionPane.showMessageDialog(Gatherer.g_man, message, Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 114 114 return; 115 115 } -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r5590 r5593 311 311 subcollection_pane.add(button_pane, BorderLayout.SOUTH); 312 312 313 tabbed_pane.addTab(Dictionary. newget("CDM.SubcollectionManager.Subcollection_Controls"), subcollection_pane);314 tabbed_pane.addTab(Dictionary. newget("CDM.SubcollectionManager.Subindex_Controls"), (JPanel) CollectionDesignManager.subcollectionindex_manager.getControls());315 tabbed_pane.addTab(Dictionary. newget("CDM.SubcollectionManager.Language_Controls"), (JPanel) CollectionDesignManager.language_manager.getControls());313 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subcollection_Controls"), subcollection_pane); 314 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subindex_Controls"), (JPanel) CollectionDesignManager.subcollectionindex_manager.getControls()); 315 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Language_Controls"), (JPanel) CollectionDesignManager.language_manager.getControls()); 316 316 317 317 border_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5)); -
trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java
r5590 r5593 520 520 } 521 521 public String getColumnName(int column) { 522 return Dictionary. newget("CDM.TranslationManager.Column_Name_" + column);522 return Dictionary.get("CDM.TranslationManager.Column_Name_" + column); 523 523 } 524 524 -
trunk/gli/src/org/greenstone/gatherer/checklist/Entry.java
r5564 r5593 28 28 MetadataSet set = (MetadataSet) object; 29 29 // Build tooltip 30 StringBuffer tip = new StringBuffer(Dictionary. newget("NewCollectionPrompt.Set_Contains"));30 StringBuffer tip = new StringBuffer(Dictionary.get("NewCollectionPrompt.Set_Contains")); 31 31 tip.append(":\n"); 32 32 for(int i = 0; i < set.size(); i++) { -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r5590 r5593 229 229 try { 230 230 // Create a progress monitor. 231 ProgressMonitor progress = new ProgressMonitor(Gatherer.g_man, Dictionary. newget("CollectionManager.Creating_New"), "mkcol.pl", 0, 7);231 ProgressMonitor progress = new ProgressMonitor(Gatherer.g_man, Dictionary.get("CollectionManager.Creating_New"), "mkcol.pl", 0, 7); 232 232 // Create the new collection. 233 233 makeCollection(description, email, name, title); … … 241 241 gcache_dir.mkdirs(); 242 242 if(progress != null) { 243 progress.setNote(Dictionary. newget("CollectionManager.Gcache_Created"));243 progress.setNote(Dictionary.get("CollectionManager.Gcache_Created")); 244 244 } 245 245 … … 249 249 log_dir.mkdirs(); 250 250 if(progress != null) { 251 progress.setNote(Dictionary. newget("CollectionManager.Log_Created"));251 progress.setNote(Dictionary.get("CollectionManager.Log_Created")); 252 252 } 253 253 … … 401 401 String args[] = new String[1]; 402 402 args[0] = name; 403 progress.setNote(Dictionary. newget("CollectionManager.Session_Ready", args));403 progress.setNote(Dictionary.get("CollectionManager.Session_Ready", args)); 404 404 progress.close(); 405 405 } … … 584 584 return collection.getTitle(); 585 585 } 586 return Dictionary. newget("Collection.No_Collection");586 return Dictionary.get("Collection.No_Collection"); 587 587 } 588 588 … … 616 616 // Create and add Greenstone collections node. 617 617 // Starting at the collection directory of gsdl... 618 FileNode world_root = new FileNode(Dictionary. newget("Tree.World"));618 FileNode world_root = new FileNode(Dictionary.get("Tree.World")); 619 619 world_root.unmap(); 620 620 workspace_root.insert(world_root); … … 625 625 if(roots != null) { 626 626 FileNode file_root; 627 String name = Dictionary. newget("Tree.Root");627 String name = Dictionary.get("Tree.Root"); 628 628 if(roots.length == 1) { 629 629 file_root = new FileNode(roots[0], name); … … 652 652 String[] args = new String[1]; 653 653 args[0] = home_folder.getName(); 654 FileNode home_folder_node = new FileNode(home_folder, Dictionary. newget("Tree.Home", args));654 FileNode home_folder_node = new FileNode(home_folder, Dictionary.get("Tree.Home", args)); 655 655 workspace_root.insert(home_folder_node); 656 656 } … … 659 659 if(Gatherer.config.get("workflow.mirror", false)) { 660 660 // Add Public workspace 661 FileNode public_root = new FileNode(new File(Utility.CACHE_DIR), Dictionary. newget("Tree.Public"));661 FileNode public_root = new FileNode(new File(Utility.CACHE_DIR), Dictionary.get("Tree.Public")); 662 662 workspace_root.insert(public_root); 663 663 // Add Private workspace if a collection has been loaded. 664 664 if(ready()) { 665 FileNode private_root = new FileNode(new File(getCollectionCache()), Dictionary. newget("Tree.Private"));665 FileNode private_root = new FileNode(new File(getCollectionCache()), Dictionary.get("Tree.Private")); 666 666 workspace_root.insert(private_root); 667 667 } … … 761 761 File metadata_directory = new File(collection_directory, Utility.META_DIR); 762 762 if(!metadata_directory.exists()) { 763 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.Old_Collection", args2), Dictionary.newget("General.Warning"), JOptionPane.INFORMATION_MESSAGE);763 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Old_Collection", args2), Dictionary.get("General.Warning"), JOptionPane.INFORMATION_MESSAGE); 764 764 } 765 765 // Normal GLI collection … … 793 793 String[] args = new String[1]; 794 794 args[0] = name; 795 Gatherer.println(Dictionary. newget("CollectionManager.Loading_Successful", args));795 Gatherer.println(Dictionary.get("CollectionManager.Loading_Successful", args)); 796 796 // Now we need to hook up classes that depend on messages from the metadata set manager to keep their content fresh. 797 797 collection.msm.addMSMListener(this); … … 806 806 // There is obviously no existing collection present. 807 807 Gatherer.printStackTrace(error); 808 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.Cannot_Open", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);808 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Cannot_Open", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 809 809 } 810 810 } … … 813 813 } 814 814 else { 815 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.File_Not_Found", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);815 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.File_Not_Found", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 816 816 } 817 817 collection_directory = null; 818 818 } 819 819 else { 820 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.Not_Col_File", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);820 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Not_Col_File", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 821 821 Gatherer.println("Not a Gatherer Collection."); 822 822 } … … 939 939 workspace_model = null; 940 940 Gatherer.g_man.collectionChanged(ready()); 941 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.Preview_Ready"), Dictionary.newget("CollectionManager.Preview_Ready_Title"), JOptionPane.INFORMATION_MESSAGE);941 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.INFORMATION_MESSAGE); 942 942 } 943 943 else if(event.getStatus() == GShell.ERROR) { 944 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("CollectionManager.Preview_Ready_Failed"), Dictionary.newget("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE);944 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready_Failed"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE); 945 945 Gatherer.g_man.collectionChanged(ready()); 946 946 } … … 986 986 FileNode greenstone_collections_node = null; 987 987 int root_child_count = root.getChildCount(); 988 String greenstone_collections_str = Dictionary. newget("Tree.World");988 String greenstone_collections_str = Dictionary.get("Tree.World"); 989 989 for(int i = 0; greenstone_collections_node == null && i < root_child_count; i++) { 990 990 TreeNode child = root.getChildAt(i); … … 1106 1106 model.removeNodeFromParent(old); 1107 1107 // Create and insert new. 1108 FileNode private_workspace = new FileNode(new File(getCollectionCache()), Dictionary. newget("Tree.Private"));1108 FileNode private_workspace = new FileNode(new File(getCollectionCache()), Dictionary.get("Tree.Private")); 1109 1109 model.insertNodeInto(private_workspace, root, 2); 1110 1110 } … … 1144 1144 1145 1145 // Special case for build mode "all": replace index dir with building dir 1146 if (build_mode == null || build_mode.equals(Dictionary. newget("CreatePane.Mode_All"))) {1146 if (build_mode == null || build_mode.equals(Dictionary.get("CreatePane.Mode_All"))) { 1147 1147 // Remove the old index directory 1148 1148 if (index_dir.exists()) { -
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r5581 r5593 199 199 args[0] = collection.getName(); 200 200 if (success) { 201 JOptionPane.showMessageDialog(prompt,Dictionary. newget("DeleteCollectionPrompt.Successful_Delete", args),Dictionary.newget("DeleteCollectionPrompt.Successful_Title"),JOptionPane.INFORMATION_MESSAGE);201 JOptionPane.showMessageDialog(prompt,Dictionary.get("DeleteCollectionPrompt.Successful_Delete", args),Dictionary.get("DeleteCollectionPrompt.Successful_Title"),JOptionPane.INFORMATION_MESSAGE); 202 202 } 203 203 else { 204 JOptionPane.showMessageDialog(prompt,Dictionary. newget("DeleteCollectionPrompt.Failed_Delete", args),Dictionary.newget("DeleteCollectionPrompt.Failed_Title"),JOptionPane.WARNING_MESSAGE);204 JOptionPane.showMessageDialog(prompt,Dictionary.get("DeleteCollectionPrompt.Failed_Delete", args),Dictionary.get("DeleteCollectionPrompt.Failed_Title"),JOptionPane.WARNING_MESSAGE); 205 205 } 206 206 } -
trunk/gli/src/org/greenstone/gatherer/collection/Job.java
r5581 r5593 220 220 int count = 0; 221 221 while(count < 3 && (user_pass = (String) Gatherer.authentications.get(address)) == null) { 222 Authenticator.requestPasswordAuthentication(proxy_host, null, Integer.parseInt(proxy_port), "http://", Dictionary. newget("WGet.Prompt"), "HTTP");222 Authenticator.requestPasswordAuthentication(proxy_host, null, Integer.parseInt(proxy_port), "http://", Dictionary.get("WGet.Prompt"), "HTTP"); 223 223 count++; 224 224 } -
trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java
r5564 r5593 110 110 // Create progress monitor box. It will display itself as necessary. 111 111 // WARNING: ProgressMonitors seem to be extremely dodgy, and are not recommended! 112 // ProgressMonitor spd = new ProgressMonitor(Gatherer.g_man, Dictionary. newget("SaveProgressDialog.Title", collection.getName()), null, 0, 100);112 // ProgressMonitor spd = new ProgressMonitor(Gatherer.g_man, Dictionary.get("SaveProgressDialog.Title", collection.getName()), null, 0, 100); 113 113 // spd.setMillisToDecideToPopup(100); 114 114 // spd.setMillisToPopup(100); -
trunk/gli/src/org/greenstone/gatherer/file/FileManager.java
r5581 r5593 77 77 // If the source is the workspace then display an error message. Workspace is read only. 78 78 if(source.toString().equals("Workspace")) { 79 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.Read_Only"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);79 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.Read_Only"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 80 80 return; 81 81 } … … 111 111 //... check if it already exists. 112 112 if(folder_file.exists()) { 113 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.Folder_Already_Exists", name), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);113 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.Folder_Already_Exists", name), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 114 114 } 115 115 // Otherwise create it. -
trunk/gli/src/org/greenstone/gatherer/file/FileNode.java
r5581 r5593 238 238 children = new ArrayList(); 239 239 // Super Special Case: if the name of this node is the Tree.World string, then we actually map the collections installed in greenstone. The file in this case will actually by the collect directory of greenstone. 240 if(file == null && title.equals(Dictionary. newget("Tree.World"))) {240 if(file == null && title.equals(Dictionary.get("Tree.World"))) { 241 241 ///atherer.println("Map the 'Greenstone Collections' node."); 242 242 // For each of the children directories, which are collections... … … 387 387 public void unmap() { 388 388 // You cannot unmap nodes that have no file basis. 389 if(file != null || title.equals(Dictionary. newget("Tree.World"))) {389 if(file != null || title.equals(Dictionary.get("Tree.World"))) { 390 390 ///atherer.println("Unmap: " + this); 391 391 children = null; -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r5581 r5593 90 90 progress.setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false)); 91 91 progress.setForeground(Gatherer.config.getColor("coloring.collection_tree_foreground", false)); 92 progress.setString(Dictionary. newget("FileActions.No_Activity"));92 progress.setString(Dictionary.get("FileActions.No_Activity")); 93 93 progress.setStringPainted(true); 94 94 args = null; … … 138 138 public boolean calculateSize(FileNode[] files) { 139 139 progress.reset(); 140 progress.setString(Dictionary. newget("FileActions.Calculating_Size"));140 progress.setString(Dictionary.get("FileActions.Calculating_Size")); 141 141 progress.setIndeterminate(true); 142 142 Vector remaining = new Vector(); … … 155 155 } 156 156 } 157 progress.setString(Dictionary. newget("FileActions.No_Activity"));157 progress.setString(Dictionary.get("FileActions.No_Activity")); 158 158 progress.setIndeterminate(false); 159 159 // Now we return if calculation was cancelled so that the FileManagers Task can skip the addJob phase correctly. … … 239 239 else { 240 240 ///atherer.println("Opps! This filename already exists. Give the user some options."); 241 Object[] options = { Dictionary. newget("General.Yes"), Dictionary.newget("FileActions.Yes_To_All"), Dictionary.newget("General.No"), Dictionary.newget("General.Cancel") };242 int result = JOptionPane.showOptionDialog(Gatherer.g_man, Dictionary. newget("FileActions.File_Exists", target_file.getName()), Dictionary.newget("General.Warning"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]);241 Object[] options = { Dictionary.get("General.Yes"), Dictionary.get("FileActions.Yes_To_All"), Dictionary.get("General.No"), Dictionary.get("General.Cancel") }; 242 int result = JOptionPane.showOptionDialog(Gatherer.g_man, Dictionary.get("FileActions.File_Exists", target_file.getName()), Dictionary.get("General.Warning"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); 243 243 switch(result) { 244 244 case 1: // Yes To All … … 273 273 if(job.type == FileJob.COPY) { 274 274 args[0] = Utility.formatPath("FileActions.Copying", source_file.getAbsolutePath(), file_status.getSize().width); 275 file_status.setText(Dictionary. newget("FileActions.Copying", args));275 file_status.setText(Dictionary.get("FileActions.Copying", args)); 276 276 } 277 277 else { 278 278 args[0] = Utility.formatPath("FileActions.Moving", source_file.getAbsolutePath(), file_status.getSize().width); 279 file_status.setText(Dictionary. newget("FileActions.Moving", args));279 file_status.setText(Dictionary.get("FileActions.Moving", args)); 280 280 } 281 281 args = null; … … 292 292 cancel_action = true; 293 293 // Show warning. 294 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.File_Not_Found_Message", source_file.getName()), Dictionary.newget("FileActions.File_Not_Found_Title"), JOptionPane.ERROR_MESSAGE);294 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.File_Not_Found_Message", source_file.getName()), Dictionary.get("FileActions.File_Not_Found_Title"), JOptionPane.ERROR_MESSAGE); 295 295 // Force refresh of source folder. 296 296 source_model.refresh(new TreePath(((FileNode)origin_node.getParent()).getPath())); … … 300 300 cancel_action = true; 301 301 // Show warning. 302 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.File_Already_Exists_Message", target_file.getName()), Dictionary.newget("FileActions.File_Already_Exists_Title"), JOptionPane.ERROR_MESSAGE);302 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.File_Already_Exists_Message", target_file.getName()), Dictionary.get("FileActions.File_Already_Exists_Title"), JOptionPane.ERROR_MESSAGE); 303 303 // Nothing else can be done by the Gatherer. 304 304 } … … 307 307 cancel_action = true; 308 308 // Show warning. The message body of the expection explains how much more space is required for this file copy. 309 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.Insufficient_Space_Message", is_exception.getMessage()), Dictionary.newget("FileActions.Insufficient_Space_Title"), JOptionPane.ERROR_MESSAGE);309 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.Insufficient_Space_Message", is_exception.getMessage()), Dictionary.get("FileActions.Insufficient_Space_Title"), JOptionPane.ERROR_MESSAGE); 310 310 // Nothing else can be done by the Gatherer. In fact if we are really out of space I'm not even sure we can quit safely. 311 311 } … … 314 314 cancel_action = true; 315 315 // Show warning 316 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.Unknown_File_Error_Message"), Dictionary.newget("FileActions.Unknown_File_Error_Title"), JOptionPane.ERROR_MESSAGE);316 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.Unknown_File_Error_Message"), Dictionary.get("FileActions.Unknown_File_Error_Title"), JOptionPane.ERROR_MESSAGE); 317 317 // Nothing else we can do. 318 318 } … … 321 321 cancel_action = true; 322 322 // Show warning 323 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.Write_Not_Permitted_Message", target_file.getAbsolutePath()), Dictionary.newget("FileActions.Write_Not_Permitted_Title"), JOptionPane.ERROR_MESSAGE);323 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.Write_Not_Permitted_Message", target_file.getAbsolutePath()), Dictionary.get("FileActions.Write_Not_Permitted_Title"), JOptionPane.ERROR_MESSAGE); 324 324 // Nothing else we can do. 325 325 } … … 377 377 // Else inform the users that a directory already exists and files will be copied into it 378 378 //else { 379 // JOptionPane.showMessageDialog(null, Dictionary. newget("Directory_Exists", target_file.toString()), Dictionary.newget("General.Warning"), JOptionPane.WARNING_MESSAGE);379 // JOptionPane.showMessageDialog(null, Dictionary.get("Directory_Exists", target_file.toString()), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE); 380 380 //} 381 381 // Queue non-filtered child files for copying. If this directory already existed, the child records will have to generate the undo jobs, as we don't want to entirely delete this directory if it already existed. … … 400 400 cancel_action = true; 401 401 // Show warning. 402 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.File_Not_Found_Message", source_file.getName()), Dictionary.newget("FileActions.File_Not_Found_Title"), JOptionPane.ERROR_MESSAGE);402 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.File_Not_Found_Message", source_file.getName()), Dictionary.get("FileActions.File_Not_Found_Title"), JOptionPane.ERROR_MESSAGE); 403 403 // Force refresh of source folder. 404 404 source_model.refresh(new TreePath(((FileNode)origin_node.getParent()).getPath())); … … 456 456 String args[] = new String[1]; 457 457 args[0] = "" + (queue.size() + 1) + ""; 458 //job_status.setText(Dictionary. newget("Jobs", args));458 //job_status.setText(Dictionary.get("Jobs", args)); 459 459 args[0] = Utility.formatPath("FileActions.Deleting", source_file.getAbsolutePath(), file_status.getSize().width); 460 file_status.setText(Dictionary. newget("FileActions.Deleting", args));460 file_status.setText(Dictionary.get("FileActions.Deleting", args)); 461 461 args = null; 462 462 … … 592 592 } 593 593 // Reset status area 594 //job_status.setText(Dictionary. newget("No_Selection"));595 file_status.setText(Dictionary. newget("FileActions.No_Activity"));594 //job_status.setText(Dictionary.get("No_Selection")); 595 file_status.setText(Dictionary.get("FileActions.No_Activity")); 596 596 progress.reset(); 597 progress.setString(Dictionary. newget("FileActions.No_Activity"));597 progress.setString(Dictionary.get("FileActions.No_Activity")); 598 598 yes_to_all = false; 599 599 completed_folder_mappings.clear(); -
trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java
r5564 r5593 112 112 FileNode node = (FileNode) path.getLastPathComponent(); 113 113 // If this error node is a dummy node (ie has no associated file) we can't unmap it, so we iterate through its children refreshing each in turn. The exception being Greenstone Collections, as it is a dummy node but we can map/unmap it 114 if(node.getFile() == null && !node.toString().equals(Dictionary. newget("Tree.World"))) {114 if(node.getFile() == null && !node.toString().equals(Dictionary.get("Tree.World"))) { 115 115 for(int i = 0; i < node.getChildCount(); i++) { 116 116 FileNode child = (FileNode) node.getChildAt(i); -
trunk/gli/src/org/greenstone/gatherer/gui/AboutDialog.java
r5589 r5593 59 59 60 60 public AboutDialog(JFrame parent) { 61 super(parent, Dictionary. newget("AboutDialog.Title"), true);61 super(parent, Dictionary.get("AboutDialog.Title"), true); 62 62 this.self = this; 63 63 setSize(SIZE); … … 71 71 JLabel title_one_label = new JLabel(); 72 72 Dictionary.setText(title_one_label, "AboutDialog.Title_One"); 73 JLabel title_two_label = new JLabel(Utility.PROGRAM_NAME + " " + Utility.PROGRAM_VERSION + " " + Dictionary. newget("AboutDialog.Date"));73 JLabel title_two_label = new JLabel(Utility.PROGRAM_NAME + " " + Utility.PROGRAM_VERSION + " " + Dictionary.get("AboutDialog.Date")); 74 74 JLabel title_three_label = new JLabel(); 75 75 Dictionary.setText(title_three_label, "AboutDialog.Title_Two"); … … 113 113 114 114 // Build text content 115 text.append(Dictionary. newget("AboutDialog.Java_Req"));115 text.append(Dictionary.get("AboutDialog.Java_Req")); 116 116 text.append("\n"); 117 text.append(Dictionary. newget("AboutDialog.Java_Req_One"));117 text.append(Dictionary.get("AboutDialog.Java_Req_One")); 118 118 text.append("\n"); 119 text.append(Dictionary. newget("AboutDialog.Java_Req_Two"));119 text.append(Dictionary.get("AboutDialog.Java_Req_Two")); 120 120 text.append("\n\n"); 121 text.append("*****" + Dictionary. newget("AboutDialog.Acknowledgement") + "*****");121 text.append("*****" + Dictionary.get("AboutDialog.Acknowledgement") + "*****"); 122 122 text.append("\n\n"); 123 text.append(Dictionary. newget("AboutDialog.Item0"));123 text.append(Dictionary.get("AboutDialog.Item0")); 124 124 text.append("\n\n"); 125 text.append(Dictionary. newget("AboutDialog.Item1"));125 text.append(Dictionary.get("AboutDialog.Item1")); 126 126 text.append("\n\n"); 127 text.append(Dictionary. newget("AboutDialog.Item2"));127 text.append(Dictionary.get("AboutDialog.Item2")); 128 128 text.append("\n\n"); 129 text.append(Dictionary. newget("AboutDialog.Item3"));129 text.append(Dictionary.get("AboutDialog.Item3")); 130 130 text.append("\n\n"); 131 text.append("*****" + Dictionary. newget("AboutDialog.Thanks") + "*****");131 text.append("*****" + Dictionary.get("AboutDialog.Thanks") + "*****"); 132 132 text.append("\n\n"); 133 text.append(Dictionary. newget("AboutDialog.Item4"));133 text.append(Dictionary.get("AboutDialog.Item4")); 134 134 text.append("\n\n"); 135 text.append(Dictionary. newget("AboutDialog.Item5"));135 text.append(Dictionary.get("AboutDialog.Item5")); 136 136 text.append("\n\n"); 137 text.append(Dictionary. newget("AboutDialog.Item6"));137 text.append(Dictionary.get("AboutDialog.Item6")); 138 138 text.append("\n\n"); 139 text.append(Dictionary. newget("AboutDialog.Item7"));139 text.append(Dictionary.get("AboutDialog.Item7")); 140 140 text.append("\n\n"); 141 text.append(Dictionary. newget("AboutDialog.Item8"));141 text.append(Dictionary.get("AboutDialog.Item8")); 142 142 text.setCaretPosition(0); 143 143 -
trunk/gli/src/org/greenstone/gatherer/gui/CollectionPane.java
r5571 r5593 199 199 FileNode node = (FileNode) collection_tree.getModel().getRoot(); 200 200 Gatherer.f_man.newFolder(collection_tree, node); 201 //JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("FileActions.No_Parent_For_New_Folder"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);201 //JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("FileActions.No_Parent_For_New_Folder"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 202 202 } 203 203 } … … 228 228 else { 229 229 String args[] = new String[1]; 230 args[0] = Dictionary. newget("Collection.No_Collection");230 args[0] = Dictionary.get("Collection.No_Collection"); 231 231 Dictionary.registerText(collection_label, "Collection.Collection", args); 232 232 args = null; … … 305 305 306 306 args = new String[1]; 307 args[0] = Dictionary. newget("Collection.No_Collection");307 args[0] = Dictionary.get("Collection.No_Collection"); 308 308 collection_label = new JLabel(); 309 309 collection_label.setOpaque(true); … … 557 557 String[] args = new String[1]; 558 558 args[0] = collection_tree.getSelectionDetails(); 559 show_metaaudit = new JMenuItem(Dictionary. newget("Menu.Metadata_View", args), KeyEvent.VK_V);559 show_metaaudit = new JMenuItem(Dictionary.get("Menu.Metadata_View", args), KeyEvent.VK_V); 560 560 show_metaaudit.addActionListener(this); 561 561 add(show_metaaudit); 562 562 } 563 563 if(tree == collection_tree && node != null && node.getFile() != null && node.getFile().isDirectory() && !node.isReadOnly()) { 564 new_folder = new JMenuItem(Dictionary. newget("CollectionPopupMenu.New_Folder"), KeyEvent.VK_N);564 new_folder = new JMenuItem(Dictionary.get("CollectionPopupMenu.New_Folder"), KeyEvent.VK_N); 565 565 new_folder.addActionListener(this); 566 566 add(new_folder); … … 568 568 } 569 569 if(node == null || (node != null && !node.isReadOnly())) { 570 delete = new JMenuItem(Dictionary. newget("CollectionPopupMenu.Delete"), KeyEvent.VK_D);570 delete = new JMenuItem(Dictionary.get("CollectionPopupMenu.Delete"), KeyEvent.VK_D); 571 571 delete.addActionListener(this); 572 572 add(delete); … … 575 575 String node_name = node.toString(); 576 576 FileNode root = (FileNode) tree.getModel().getRoot(); 577 if(!node_name.equals(Dictionary. newget("Tree.World")) && !node_name.equals(Dictionary.newget("Tree.Root")) && !node_name.equals(Dictionary.newget("Tree.Public")) && !node_name.equals(Dictionary.newget("Tree.Private"))) {577 if(!node_name.equals(Dictionary.get("Tree.World")) && !node_name.equals(Dictionary.get("Tree.Root")) && !node_name.equals(Dictionary.get("Tree.Public")) && !node_name.equals(Dictionary.get("Tree.Private"))) { 578 578 // You can unmap 1st level nodes. 579 579 if(root.getIndex(node) != -1) { 580 unmap = new JMenuItem(Dictionary. newget("MappingPrompt.Unmap"), KeyEvent.VK_U);580 unmap = new JMenuItem(Dictionary.get("MappingPrompt.Unmap"), KeyEvent.VK_U); 581 581 unmap.addActionListener(this); 582 582 add(unmap); … … 584 584 // Or map any other level directories. 585 585 else { 586 map = new JMenuItem(Dictionary. newget("MappingPrompt.Map"), KeyEvent.VK_M);586 map = new JMenuItem(Dictionary.get("MappingPrompt.Map"), KeyEvent.VK_M); 587 587 map.addActionListener(this); 588 588 add(map); -
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r5589 r5593 246 246 247 247 JPanel options_area = new JPanel(); 248 options_area.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createTitledBorder(Dictionary. newget("CreatePane.Options_Title"))));248 options_area.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createTitledBorder(Dictionary.get("CreatePane.Options_Title")))); 249 249 options_area.setLayout(new BorderLayout()); 250 250 options_area.add(left, BorderLayout.WEST); … … 475 475 476 476 // Create tree. 477 building = new OptionTreeNode(Dictionary. newget("CreatePane.Build"));478 building.setToolTipText(Dictionary. newget("CreatePane.Build_Tooltip"));479 importing = new OptionTreeNode(Dictionary. newget("CreatePane.Import"));480 importing.setToolTipText(Dictionary. newget("CreatePane.Import_Tooltip"));481 log = new OptionTreeNode(Dictionary. newget("CreatePane.Log"));482 log.setToolTipText(Dictionary. newget("CreatePane.Log_Tooltip"));483 options = new OptionTreeNode(Dictionary. newget("CreatePane.Options"));477 building = new OptionTreeNode(Dictionary.get("CreatePane.Build")); 478 building.setToolTipText(Dictionary.get("CreatePane.Build_Tooltip")); 479 importing = new OptionTreeNode(Dictionary.get("CreatePane.Import")); 480 importing.setToolTipText(Dictionary.get("CreatePane.Import_Tooltip")); 481 log = new OptionTreeNode(Dictionary.get("CreatePane.Log")); 482 log.setToolTipText(Dictionary.get("CreatePane.Log_Tooltip")); 483 options = new OptionTreeNode(Dictionary.get("CreatePane.Options")); 484 484 485 485 model = new DefaultTreeModel(options); -
trunk/gli/src/org/greenstone/gatherer/gui/FileAssociationDialog.java
r5589 r5593 255 255 public void actionPerformed(ActionEvent event) { 256 256 JFileChooser chooser = new JFileChooser(new File(Utility.BASE_DIR)); 257 chooser.setDialogTitle(Dictionary. newget("FileAssociationDialog.Browse_Title"));258 chooser.setFileFilter(new ExtensionFileFilter(".bat", Dictionary. newget("FileAssociationDialog.Batch_File")));259 chooser.setFileFilter(new ExtensionFileFilter(".com", Dictionary. newget("FileAssociationDialog.Command_File")));260 chooser.setFileFilter(new ExtensionFileFilter(".exe", Dictionary. newget("FileAssociationDialog.Executable_File")));257 chooser.setDialogTitle(Dictionary.get("FileAssociationDialog.Browse_Title")); 258 chooser.setFileFilter(new ExtensionFileFilter(".bat", Dictionary.get("FileAssociationDialog.Batch_File"))); 259 chooser.setFileFilter(new ExtensionFileFilter(".com", Dictionary.get("FileAssociationDialog.Command_File"))); 260 chooser.setFileFilter(new ExtensionFileFilter(".exe", Dictionary.get("FileAssociationDialog.Executable_File"))); 261 261 chooser.setAcceptAllFileFilterUsed(true); 262 262 int return_val = chooser.showOpenDialog(null); -
trunk/gli/src/org/greenstone/gatherer/gui/Filter.java
r5564 r5593 101 101 for(int i = 0; i < DEFAULTS.length; i++) { 102 102 try { 103 Entry entry = new Entry(Dictionary. newget("Filter." + i), Pattern.compile(DEFAULTS[i]));103 Entry entry = new Entry(Dictionary.get("Filter." + i), Pattern.compile(DEFAULTS[i])); 104 104 combobox.add(entry); 105 105 } … … 238 238 ///ystem.err.println("Filter = " + temp_str); 239 239 // Ignore any string which matches a predefined filter, starting with All Files. 240 if(temp_str.equals(Dictionary. newget("Filter.All_Files"))) {240 if(temp_str.equals(Dictionary.get("Filter.All_Files"))) { 241 241 } 242 242 // HTM & HTML 243 else if(temp_str.equals(Dictionary. newget("Filter.0"))) {243 else if(temp_str.equals(Dictionary.get("Filter.0"))) { 244 244 } 245 245 // XML 246 else if(temp_str.equals(Dictionary. newget("Filter.1"))) {246 else if(temp_str.equals(Dictionary.get("Filter.1"))) { 247 247 } 248 248 // Text files 249 else if(temp_str.equals(Dictionary. newget("Filter.2"))) {249 else if(temp_str.equals(Dictionary.get("Filter.2"))) { 250 250 } 251 251 // Images 252 else if(temp_str.equals(Dictionary. newget("Filter.3"))) {252 else if(temp_str.equals(Dictionary.get("Filter.3"))) { 253 253 } 254 254 else { … … 273 273 catch (PatternSyntaxException error) { 274 274 if(first) { 275 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("Filter.Invalid_Pattern"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);275 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Filter.Invalid_Pattern"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 276 276 } 277 277 } … … 318 318 } 319 319 else if (pattern == null) { 320 result = Dictionary. newget("Filter.All_Files");320 result = Dictionary.get("Filter.All_Files"); 321 321 } 322 322 else { -
trunk/gli/src/org/greenstone/gatherer/gui/GComboBox.java
r5589 r5593 67 67 public GComboBox(ComboBoxModel model) { 68 68 super(model); 69 init(); 70 } 71 72 public GComboBox(Gatherer gatherer) { 73 super(); 69 74 init(); 70 75 } -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r5590 r5593 148 148 thread_group = bob.getThreadGroup(); 149 149 // Set up some other UI stuff. (fonts handled in Gatherer.main()) 150 UIManager.put("FileChooser.lookInLabelText", Dictionary. newget("SaveCollectionBox.Look_In"));151 UIManager.put("FileChooser.filesOfTypeLabelText", Dictionary. newget("SaveCollectionBox.Files_Of_Type"));152 UIManager.put("FileChooser.fileNameLabelText", Dictionary. newget("SaveCollectionBox.File_Name"));150 UIManager.put("FileChooser.lookInLabelText", Dictionary.get("SaveCollectionBox.Look_In")); 151 UIManager.put("FileChooser.filesOfTypeLabelText", Dictionary.get("SaveCollectionBox.Files_Of_Type")); 152 UIManager.put("FileChooser.fileNameLabelText", Dictionary.get("SaveCollectionBox.File_Name")); 153 153 } 154 154 /** Any implementation of <i>ActionListener</i> must include this method so that we can be informed when an action has occured. In this case we are listening to actions from the menu-bar, and should react appropriately. … … 369 369 } 370 370 else { 371 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary. newget("Collection.No_Collection"));371 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary.get("Collection.No_Collection")); 372 372 } 373 373 // Now is a good time to force a garbage collect. … … 389 389 } 390 390 else { 391 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary. newget("Collection.No_Collection"));391 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary.get("Collection.No_Collection")); 392 392 } 393 393 // Pretty corner icon … … 539 539 public void setTabEnabled(String rawname, boolean state) { 540 540 // Retrieve the dictionary based name. 541 String name = Dictionary. newget("GUI." + rawname);541 String name = Dictionary.get("GUI." + rawname); 542 542 int index = tab_pane.indexOfTab(name); 543 543 // Of course we may not have this tab available. -
trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java
r5564 r5593 31 31 32 32 public LockFileDialog(JFrame parent, String name, File lock_file) { 33 super(parent, Dictionary. newget("LockFileDialog.Title"), true);33 super(parent, Dictionary.get("LockFileDialog.Title"), true); 34 34 setSize(SIZE); 35 35 setJMenuBar(new SimpleMenuBar("openingacollection")); … … 167 167 } 168 168 else { 169 value = Dictionary. newget("LockFileDialog.Error");169 value = Dictionary.get("LockFileDialog.Error"); 170 170 } 171 171 return value; -
trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java
r5564 r5593 231 231 Dictionary.registerText(metadata_export, "Menu.Metadata_Export"); 232 232 233 metadata_view = new MagicMenuItem(Dictionary. newget("Menu.Metadata_View") + " " + Dictionary.newget("FileActions.No_Selection"), KeyEvent.VK_A);233 metadata_view = new MagicMenuItem(Dictionary.get("Menu.Metadata_View") + " " + Dictionary.get("FileActions.No_Selection"), KeyEvent.VK_A); 234 234 metadata_view.addActionListener(Gatherer.g_man); 235 235 … … 371 371 ///ystem.err.println("**** Set suffix: " + metaaudit_suffix); 372 372 if(metaaudit_suffix == null) { 373 metadata_view.setText(Dictionary. newget("Menu.Metadata_View") + " " + Dictionary.newget("FileActions.No_Selection"));373 metadata_view.setText(Dictionary.get("Menu.Metadata_View") + " " + Dictionary.get("FileActions.No_Selection")); 374 374 metadata_view.setEnabled(false); 375 375 } 376 376 else { 377 377 ///ystem.err.println("Set metadata view suffix: " + metaaudit_suffix); 378 metadata_view.setText(Dictionary. newget("Menu.Metadata_View") + " " + metaaudit_suffix);378 metadata_view.setText(Dictionary.get("Menu.Metadata_View") + " " + metaaudit_suffix); 379 379 metadata_view.setEnabled(true); 380 380 } -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java
r5589 r5593 324 324 collection_label.setBackground(Color.lightGray); 325 325 collection_label.setForeground(Color.black); 326 collection_tree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode(Dictionary. newget("Collection.No_Collection"))));326 collection_tree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode(Dictionary.get("Collection.No_Collection")))); 327 327 } 328 328 … … 930 930 String[] args = new String[1]; 931 931 args[0] = collection_tree.getSelectionDetails(); 932 JMenuItem show_metaaudit = new JMenuItem(Dictionary. newget("Menu.Metadata_View", args), KeyEvent.VK_V);932 JMenuItem show_metaaudit = new JMenuItem(Dictionary.get("Menu.Metadata_View", args), KeyEvent.VK_V); 933 933 show_metaaudit.addActionListener(this); 934 934 add(show_metaaudit); -
trunk/gli/src/org/greenstone/gatherer/gui/MirrorPane.java
r5536 r5593 171 171 button_pane.add(download_button); 172 172 173 edit_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2,0,0,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("Mirroring.Download_Controls")), BorderFactory.createEmptyBorder(2,2,2,2))));173 edit_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2,0,0,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("Mirroring.Download_Controls")), BorderFactory.createEmptyBorder(2,2,2,2)))); 174 174 edit_pane.setLayout(new BorderLayout()); 175 175 edit_pane.add(details_pane, BorderLayout.CENTER); … … 204 204 } 205 205 catch(MalformedURLException error) { 206 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("Mirroring.Invalid_URL"), Dictionary.newget("Mirroring.Invalid_URL__Title"), JOptionPane.ERROR_MESSAGE);206 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Mirroring.Invalid_URL"), Dictionary.get("Mirroring.Invalid_URL__Title"), JOptionPane.ERROR_MESSAGE); 207 207 } 208 208 if(url != null) { -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r5571 r5593 74 74 // Sort the result. 75 75 Collections.sort(base_collection_model); 76 base_collection_model.add(0, new Item(null, Dictionary. newget("NewCollectionPrompt.NewCollection")));76 base_collection_model.add(0, new Item(null, Dictionary.get("NewCollectionPrompt.NewCollection"))); 77 77 78 78 // Creation … … 298 298 title_final = title.getText(); 299 299 if(title_final.length() == 0) { 300 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("NewCollectionPrompt.Title_Error"), Dictionary.newget("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE);300 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Title_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 301 301 title.setForeground(Gatherer.config.getColor("coloring.error_foreground", false)); 302 302 title.setBackground(Gatherer.config.getColor("coloring.error_background", false)); … … 310 310 for(int i = 0; children != null && i < children.length; i++) { 311 311 if(children[i].getName().equals(name_final)) { 312 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("NewCollectionPrompt.Name_Error"), Dictionary.newget("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE);312 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Name_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 313 313 file.setForeground(Gatherer.config.getColor("coloring.error_foreground", false)); 314 314 file.setBackground(Gatherer.config.getColor("coloring.error_background", false)); … … 318 318 } 319 319 else { 320 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("NewCollectionPrompt.Name_Error"), Dictionary.newget("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE);320 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Name_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 321 321 file.setForeground(Gatherer.config.getColor("coloring.error_foreground", false)); 322 322 file.setBackground(Gatherer.config.getColor("coloring.error_background", false)); … … 325 325 email_final = address.getText() + "@" + host.getText(); 326 326 if(email_final.length() == 0 || email_final.startsWith("@") || email_final.endsWith("@")) { 327 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("NewCollectionPrompt.Email_Error"), Dictionary.newget("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE);327 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Email_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 328 328 address.setForeground(Gatherer.config.getColor("coloring.error_foreground", false)); 329 329 address.setBackground(Gatherer.config.getColor("coloring.error_background", false)); … … 334 334 description_final = description.getText(); 335 335 if(description_final.length() == 0) { 336 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("NewCollectionPrompt.Description_Error"), Dictionary.newget("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE);336 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Description_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 337 337 description.setForeground(Gatherer.config.getColor("coloring.error_foreground", false)); 338 338 description.setBackground(Gatherer.config.getColor("coloring.error_background", false)); -
trunk/gli/src/org/greenstone/gatherer/gui/NewFolderPrompt.java
r5589 r5593 21 21 22 22 public NewFolderPrompt(FileNode node) { 23 super(Gatherer.g_man, Dictionary. newget("NewFolderPrompt.Title"), true);23 super(Gatherer.g_man, Dictionary.get("NewFolderPrompt.Title"), true); 24 24 this.node = node; 25 25 } … … 79 79 { 80 80 File file = node.getFile(); 81 String default_name = Dictionary. newget("NewFolderPrompt.Default_Folder_Name");81 String default_name = Dictionary.get("NewFolderPrompt.Default_Folder_Name"); 82 82 File temp_file = new File(file, default_name); 83 83 int count = 1; -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r5536 r5593 65 65 // Other initialization 66 66 setAcceptAllFileFilterUsed(false); 67 setDialogTitle(Dictionary. newget("OpenCollectionDialog.Title"));67 setDialogTitle(Dictionary.get("OpenCollectionDialog.Title")); 68 68 setFileFilter(new GathererFilter()); 69 69 setFileSystemView(new GathererFileSystemView()); … … 190 190 // The description of this filter 191 191 public String getDescription() { 192 return Dictionary. newget("OpenCollectionDialog.Collection");192 return Dictionary.get("OpenCollectionDialog.Collection"); 193 193 } 194 194 } … … 241 241 if (file.getName().endsWith(".col")) { 242 242 if (!lockExists(file)) { 243 description = Dictionary. newget("OpenCollectionDialog.Normal_Collection");243 description = Dictionary.get("OpenCollectionDialog.Normal_Collection"); 244 244 } 245 245 else { 246 description = Dictionary. newget("OpenCollectionDialog.Locked_Collection");246 description = Dictionary.get("OpenCollectionDialog.Locked_Collection"); 247 247 } 248 248 } -
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r5536 r5593 541 541 switch (success) { 542 542 case SUCCESSFUL: 543 d.append(Dictionary. newget("OptionsPane.Successful"));543 d.append(Dictionary.get("OptionsPane.Successful")); 544 544 break; 545 545 case UNSUCCESSFUL: 546 d.append(Dictionary. newget("OptionsPane.Unsuccessful"));546 d.append(Dictionary.get("OptionsPane.Unsuccessful")); 547 547 break; 548 548 case CANCELLED: 549 d.append(Dictionary. newget("OptionsPane.Cancelled"));549 d.append(Dictionary.get("OptionsPane.Cancelled")); 550 550 break; 551 551 default: 552 d.append(Dictionary. newget("OptionsPane.Unknown"));552 d.append(Dictionary.get("OptionsPane.Unknown")); 553 553 } 554 554 display = d.toString(); -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r5589 r5593 270 270 String value = (String) warning_preferences.get(property); 271 271 // Remove 'warning.' 272 String title = Dictionary. newget(property.substring(8) + ".Title");272 String title = Dictionary.get(property.substring(8) + ".Title"); 273 273 Entry entry = new Entry(title, value.equalsIgnoreCase(TRUE)); 274 274 entry.setProperty(property); … … 533 533 Gatherer.dictionary.changeDictionary(entry.getLocale()); 534 534 // Display message 535 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("Preferences.General.Restart_Required"), Dictionary.newget("Preferences.General.Restart_Required"), JOptionPane.WARNING_MESSAGE);535 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Preferences.General.Restart_Required"), Dictionary.get("Preferences.General.Restart_Required"), JOptionPane.WARNING_MESSAGE); 536 536 } 537 537 } -
trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java
r5589 r5593 183 183 } 184 184 else { 185 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("WarningDialog.Invalid_Value"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);185 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("WarningDialog.Invalid_Value"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 186 186 } 187 187 } -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java
r5589 r5593 169 169 Dictionary.setText(order_label, "Autofilter.Order"); 170 170 order = new JComboBox(); 171 order.addItem(Dictionary. newget("Autofilter.Ascending"));172 order.addItem(Dictionary. newget("Autofilter.Descending"));171 order.addItem(Dictionary.get("Autofilter.Ascending")); 172 order.addItem(Dictionary.get("Autofilter.Descending")); 173 173 Dictionary.setTooltip(order, "Autofilter.Order_Tooltip"); 174 174 175 175 // Assign values to method comboboxes. 176 176 for(int i = 0; i < Autofilter.METHOD_LIST.length; i++) { 177 first_method.addItem(Dictionary. newget("Autofilter." + Autofilter.METHOD_LIST[i]));178 second_method.addItem(Dictionary. newget("Autofilter." + Autofilter.METHOD_LIST[i]));177 first_method.addItem(Dictionary.get("Autofilter." + Autofilter.METHOD_LIST[i])); 178 second_method.addItem(Dictionary.get("Autofilter." + Autofilter.METHOD_LIST[i])); 179 179 } 180 180 JPanel button_pane = new JPanel(); … … 242 242 custom_pane.add(second_pane); 243 243 244 control.add(Dictionary. newget("Autofilter.Filter_By_Value"), value_pane);245 control.add(Dictionary. newget("Autofilter.Custom_Filter"), custom_pane);244 control.add(Dictionary.get("Autofilter.Filter_By_Value"), value_pane); 245 control.add(Dictionary.get("Autofilter.Custom_Filter"), custom_pane); 246 246 247 247 button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditModel.java
r5564 r5593 77 77 String result; 78 78 if(column == 0) { 79 result = Dictionary. newget("AuditTable.File");79 result = Dictionary.get("AuditTable.File"); 80 80 } 81 81 else { -
trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java
r5571 r5593 63 63 private ModelBuilder builder = null; 64 64 65 static final private String[] COLUMN_NAMES = {"", Dictionary. newget("Metadata.Element"), Dictionary.newget("Metadata.Value")};65 static final private String[] COLUMN_NAMES = {"", Dictionary.get("Metadata.Element"), Dictionary.get("Metadata.Value")}; 66 66 67 67 -
trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTree.java
r5590 r5593 222 222 } 223 223 else { 224 String title = getSelectionCount() + Dictionary. newget("Tree.Files");224 String title = getSelectionCount() + Dictionary.get("Tree.Files"); 225 225 label = new JLabel(title, ((DefaultTreeCellRenderer)getCellRenderer()).getClosedIcon(), JLabel.CENTER); 226 226 title = null; -
trunk/gli/src/org/greenstone/gatherer/help/HelpFrame.java
r5581 r5593 78 78 view = new CalHTMLPane(new CalHTMLPreferences(), new Observer(), "Help Pages"); 79 79 80 HelpItem rootNode = new HelpItem(Dictionary. newget("Help.Contents"), "<null>");80 HelpItem rootNode = new HelpItem(Dictionary.get("Help.Contents"), "<null>"); 81 81 model = new ContentsModel(rootNode); 82 82 contents = new JTree((DefaultTreeModel) model); -
trunk/gli/src/org/greenstone/gatherer/mem/MEMNode.java
r5564 r5593 161 161 } 162 162 v = null; 163 164 children.add(new MEMNode(PROFILER, Dictionary. newget("MEM.Profiles"), this));163 // Add the profile set. 164 children.add(new MEMNode(PROFILER, Dictionary.get("MEM.Profiles"), this)); 165 165 break; 166 166 case SET: // Add the elements as children -
trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java
r5590 r5593 143 143 this.self = this; 144 144 145 dialog_options[0] = Dictionary. newget("General.OK");146 dialog_options[1] = Dictionary. newget("General.Cancel");145 dialog_options[0] = Dictionary.get("General.OK"); 146 dialog_options[1] = Dictionary.get("General.Cancel"); 147 147 148 148 // Creation … … 386 386 set_attributes_scroll.setViewportView(set_attributes); 387 387 388 set_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Attributes")), BorderFactory.createEmptyBorder(2,2,2,2)));388 set_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Attributes")), BorderFactory.createEmptyBorder(2,2,2,2))); 389 389 set_attributes_pane.setLayout(new BorderLayout()); 390 390 set_attributes_pane.add(set_attributes_scroll, BorderLayout.CENTER); 391 391 392 set_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Set_Details")), BorderFactory.createEmptyBorder(2,2,2,2)));392 set_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Set_Details")), BorderFactory.createEmptyBorder(2,2,2,2))); 393 393 set_details_pane.setLayout(new BorderLayout()); 394 394 //set_details_pane.add(set_name_pane, BorderLayout.NORTH); … … 401 401 element_attributes_scroll.setViewportView(element_attributes); 402 402 403 element_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Attributes")), BorderFactory.createEmptyBorder(2,2,2,2)));403 element_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Attributes")), BorderFactory.createEmptyBorder(2,2,2,2))); 404 404 element_attributes_pane.setLayout(new BorderLayout()); 405 405 element_attributes_pane.add(element_attributes_scroll, BorderLayout.CENTER); 406 406 407 element_values_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Values")), BorderFactory.createEmptyBorder(2,2,2,2)));407 element_values_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Values")), BorderFactory.createEmptyBorder(2,2,2,2))); 408 408 //element_values_pane.setLayout(new BorderLayout()); 409 409 //element_values_pane.add(new JScrollPane(element_values), BorderLayout.CENTER); … … 416 416 element_inner_pane.add(element_values_pane); 417 417 418 element_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Element_Details")), BorderFactory.createEmptyBorder(2,2,2,2)));418 element_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Element_Details")), BorderFactory.createEmptyBorder(2,2,2,2))); 419 419 element_details_pane.setLayout(new BorderLayout()); 420 420 //element_details_pane.add(element_name_pane, BorderLayout.NORTH); … … 427 427 profile_attributes_scroll.setViewportView(profile_attributes); 428 428 429 profile_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Profiles")), BorderFactory.createEmptyBorder(2,2,2,2)));429 profile_attributes_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Profiles")), BorderFactory.createEmptyBorder(2,2,2,2))); 430 430 profile_attributes_pane.setLayout(new BorderLayout()); 431 431 profile_attributes_pane.add(profile_attributes_scroll, BorderLayout.CENTER); 432 432 433 profile_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary. newget("MEM.Profile_Details")), BorderFactory.createEmptyBorder(2,2,2,2)));433 profile_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("MEM.Profile_Details")), BorderFactory.createEmptyBorder(2,2,2,2))); 434 434 profile_details_pane.setLayout(new BorderLayout()); 435 435 //profile_details_pane.add(profile_name_pane, BorderLayout.NORTH); … … 601 601 JPanel center_pane = new JPanel(); 602 602 center_pane.setOpaque(false); 603 value = new ComboArea(Dictionary. newget("MEM.Values"), LABEL_SIZE);603 value = new ComboArea(Dictionary.get("MEM.Values"), LABEL_SIZE); 604 604 value.setOpaque(false); 605 605 … … 885 885 else { 886 886 cont = false; 887 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.Attribute_Already_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);887 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.Attribute_Already_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 888 888 } 889 889 … … 917 917 else { 918 918 cont = false; 919 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.Attribute_Already_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);919 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.Attribute_Already_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 920 920 } 921 921 … … 1073 1073 // Otherwise show an error message and do not proceed. 1074 1074 else { 1075 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.Element_Already_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);1075 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.Element_Already_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 1076 1076 } 1077 1077 name_str = null; … … 1092 1092 // Warn the user that they can't do that dave. 1093 1093 else { 1094 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.Cannot_Add_Elements_To_Greenstone_MDS"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);1094 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.Cannot_Add_Elements_To_Greenstone_MDS"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 1095 1095 } 1096 1096 } … … 1201 1201 // Otherwise warn the user and don't hide the prompt. 1202 1202 else { 1203 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.File_Already_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);1203 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.File_Already_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 1204 1204 } 1205 1205 name_str = null; … … 1329 1329 // Otherwise show a warning. 1330 1330 else { 1331 JOptionPane.showMessageDialog(self, Dictionary. newget("MEM.Set_Already_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);1331 JOptionPane.showMessageDialog(self, Dictionary.get("MEM.Set_Already_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 1332 1332 } 1333 1333 name_str = null; … … 1652 1652 public void actionPerformed(ActionEvent event) { 1653 1653 if(current_attribute != -1) { 1654 int result = JOptionPane.showOptionDialog(self, Dictionary. newget("MEM.Confirm_Removal", Dictionary.newget("MEM.Attribute")), Dictionary.newget("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]);1654 int result = JOptionPane.showOptionDialog(self, Dictionary.get("MEM.Confirm_Removal", Dictionary.get("MEM.Attribute")), Dictionary.get("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]); 1655 1655 // Remove this attribute 1656 1656 if(result == 0) { … … 1700 1700 public void actionPerformed(ActionEvent event) { 1701 1701 if(current_element != null) { 1702 int result = JOptionPane.showOptionDialog(self, Dictionary. newget("MEM.Confirm_Removal", Dictionary.newget("MEM.Element")), Dictionary.newget("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]);1702 int result = JOptionPane.showOptionDialog(self, Dictionary.get("MEM.Confirm_Removal", Dictionary.get("MEM.Element")), Dictionary.get("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]); 1703 1703 // Remove this attribute 1704 1704 if(result == 0) { … … 1728 1728 public void actionPerformed(ActionEvent event) { 1729 1729 if(current_collection_file != null) { 1730 int result = JOptionPane.showOptionDialog(self, Dictionary. newget("MEM.Confirm_Removal", Dictionary.newget("MEM.File")), Dictionary.newget("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]);1730 int result = JOptionPane.showOptionDialog(self, Dictionary.get("MEM.Confirm_Removal", Dictionary.get("MEM.File")), Dictionary.get("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]); 1731 1731 // Remove the current collection file profile from the profiler. 1732 1732 if(result == 0) { … … 1753 1753 public void actionPerformed(ActionEvent event) { 1754 1754 if(current_set != null) { 1755 int result = JOptionPane.showOptionDialog(self, Dictionary. newget("MEM.Confirm_Removal", Dictionary.newget("MEM.Set")), Dictionary.newget("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]);1755 int result = JOptionPane.showOptionDialog(self, Dictionary.get("MEM.Confirm_Removal", Dictionary.get("MEM.Set")), Dictionary.get("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]); 1756 1756 // Remove the currently selected set 1757 1757 if(result == 0) { … … 1778 1778 public void actionPerformed(ActionEvent event) { 1779 1779 if(current_value_node != null) { 1780 int result = JOptionPane.showOptionDialog(self, Dictionary. newget("MEM.Confirm_Removal", Dictionary.newget("MEM.Value")), Dictionary.newget("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]);1780 int result = JOptionPane.showOptionDialog(self, Dictionary.get("MEM.Confirm_Removal", Dictionary.get("MEM.Value")), Dictionary.get("MEM.Confirm_Removal_Title"), JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, dialog_options, dialog_options[0]); 1781 1781 // Remove the current selected value 1782 1782 if(result == 0) { … … 1909 1909 String action = Gatherer.c_man.msm.profiler.getAction(current_collection_file, source); 1910 1910 if (action == null) { 1911 action = Dictionary. newget("MEM.Ignore");1911 action = Dictionary.get("MEM.Ignore"); 1912 1912 } 1913 1913 attributes.add(new Attribute(source, action)); 1914 1914 } 1915 atm = new AttributeTableModel(attributes, Dictionary. newget("MEM.Source"), Dictionary.newget("MEM.Target"), Dictionary.newget("MEM.Ignore"));1915 atm = new AttributeTableModel(attributes, Dictionary.get("MEM.Source"), Dictionary.get("MEM.Target"), Dictionary.get("MEM.Ignore")); 1916 1916 //current_node.setModel(atm); 1917 1917 } … … 1927 1927 atm = current_node.getModel(); 1928 1928 if(atm == null) { 1929 atm = new AttributeTableModel(current_element.getAttributes(), Dictionary. newget("MEM.Name"), Dictionary.newget("MEM.Language_Code"), Dictionary.newget("MEM.Value"), "");1929 atm = new AttributeTableModel(current_element.getAttributes(), Dictionary.get("MEM.Name"), Dictionary.get("MEM.Language_Code"), Dictionary.get("MEM.Value"), ""); 1930 1930 //current_node.setModel(atm); 1931 1931 } … … 1965 1965 attribute = null; 1966 1966 } 1967 atm = new AttributeTableModel(attributes, Dictionary. newget("MEM.Name"), Dictionary.newget("MEM.Value"), "");1967 atm = new AttributeTableModel(attributes, Dictionary.get("MEM.Name"), Dictionary.get("MEM.Value"), ""); 1968 1968 //current_node.setModel(atm); 1969 1969 temp = null; -
trunk/gli/src/org/greenstone/gatherer/msm/ExportMDSPrompt.java
r5589 r5593 221 221 JFileChooser chooser = new JFileChooser(new File(Utility.METADATA_DIR)); 222 222 javax.swing.filechooser.FileFilter filter = new MDSFileFilter(); 223 chooser.setApproveButtonText(Dictionary. newget("General.OK"));223 chooser.setApproveButtonText(Dictionary.get("General.OK")); 224 224 chooser.setFileFilter(filter); 225 225 int returnVal = chooser.showSaveDialog(Gatherer.g_man); -
trunk/gli/src/org/greenstone/gatherer/msm/GreenstoneArchiveParser.java
r5589 r5593 82 82 args[0] = document_directories[i].getName(); 83 83 args[1] = String.valueOf(count); 84 shell.fireMessage(GShell.IMPORT, shell.typeAsString(GShell.IMPORT) + "> " + Dictionary. newget("GShell.Extracted", args), GShell.OK);84 shell.fireMessage(GShell.IMPORT, shell.typeAsString(GShell.IMPORT) + "> " + Dictionary.get("GShell.Extracted", args), GShell.OK); 85 85 args = null; 86 86 progress.increment(); -
trunk/gli/src/org/greenstone/gatherer/msm/MDSFileFilter.java
r5564 r5593 51 51 */ 52 52 public MDSFileFilter() { 53 description = Dictionary. newget("MSMPrompt.File_Filter_Description");53 description = Dictionary.get("MSMPrompt.File_Filter_Description"); 54 54 } 55 55 -
trunk/gli/src/org/greenstone/gatherer/msm/MSMPrompt.java
r5589 r5593 109 109 String args[] = new String[2]; 110 110 args[0] = mde_new.getAttribute("name"); 111 args[1] = Dictionary. newget(reason);112 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("MSMPrompt.Add_Failed", args), Dictionary.newget("MSMPrompt.Add_Failed_Title"), JOptionPane.ERROR_MESSAGE);111 args[1] = Dictionary.get(reason); 112 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.Add_Failed", args), Dictionary.get("MSMPrompt.Add_Failed_Title"), JOptionPane.ERROR_MESSAGE); 113 113 } 114 114 … … 215 215 JPanel current_pane = new JPanel(); 216 216 current_pane.setLayout(new BorderLayout()); 217 current_pane.setBorder(BorderFactory.createTitledBorder(Dictionary. newget("MSMPrompt.Current_Values")));217 current_pane.setBorder(BorderFactory.createTitledBorder(Dictionary.get("MSMPrompt.Current_Values"))); 218 218 JScrollPane scroll = new JScrollPane(cur_values); 219 219 current_pane.add(scroll, BorderLayout.CENTER); 220 220 221 221 JPanel new_pane = new JPanel(); 222 new_pane.setBorder(BorderFactory.createTitledBorder(Dictionary. newget("MSMPrompt.New_Value")));222 new_pane.setBorder(BorderFactory.createTitledBorder(Dictionary.get("MSMPrompt.New_Value"))); 223 223 new_pane.setLayout(new BorderLayout()); 224 224 JLabel new_att = new JLabel(MSMUtils.getValue(att_new)); … … 349 349 String opt_cur[] = MSMUtils.getOptionListDetails(mde_cur); 350 350 String ass_cur[] = MSMUtils.getAssignedValuesDetails(mds_cur, mde_cur); 351 String details_cur = Dictionary. newget("MSMPrompt.Structural", str_cur);351 String details_cur = Dictionary.get("MSMPrompt.Structural", str_cur); 352 352 if(opt_cur != null) { 353 details_cur = details_cur + "\n" + Dictionary. newget("MSMPrompt.OptionList", opt_cur);353 details_cur = details_cur + "\n" + Dictionary.get("MSMPrompt.OptionList", opt_cur); 354 354 } 355 355 if(ass_cur != null) { 356 details_cur = details_cur + "\n" + Dictionary. newget("MSMPrompt.AssignedValues", ass_cur);356 details_cur = details_cur + "\n" + Dictionary.get("MSMPrompt.AssignedValues", ass_cur); 357 357 } 358 358 current_details.setText(details_cur); … … 376 376 String opt_new[] = MSMUtils.getOptionListDetails(mde_new); 377 377 String ass_new[] = MSMUtils.getAssignedValuesDetails(mds_new, mde_new); 378 String details_new = Dictionary. newget("MSMPrompt.Structural", str_new);378 String details_new = Dictionary.get("MSMPrompt.Structural", str_new); 379 379 if(opt_new != null) { 380 details_new = details_new + "\n" + Dictionary. newget("MSMPrompt.OptionList", opt_new);380 details_new = details_new + "\n" + Dictionary.get("MSMPrompt.OptionList", opt_new); 381 381 } 382 382 if(ass_new != null) { 383 details_new = details_new + "\n" + Dictionary. newget("MSMPrompt.AssignedValues", ass_new);383 details_new = details_new + "\n" + Dictionary.get("MSMPrompt.AssignedValues", ass_new); 384 384 } 385 385 new_details.setText(details_new); … … 564 564 String args[] = new String[2]; 565 565 args[0] = mde_cur.getAttribute("name"); 566 args[1] = Dictionary. newget(reason);567 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("MSMPrompt.Remove_Failed", args), Dictionary.newget("MSMPrompt.Remove_Failed_Title"), JOptionPane.ERROR_MESSAGE);566 args[1] = Dictionary.get(reason); 567 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.Remove_Failed", args), Dictionary.get("MSMPrompt.Remove_Failed_Title"), JOptionPane.ERROR_MESSAGE); 568 568 } 569 569 … … 577 577 args[0] = mde_new.getAttribute("name"); 578 578 args[1] = new_name; 579 args[2] = Dictionary. newget(reason);580 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary. newget("MSMPrompt.Rename_Failed", args), Dictionary.newget("MSMPrompt.Rename_Failed_Title"), JOptionPane.ERROR_MESSAGE);579 args[2] = Dictionary.get(reason); 580 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.Rename_Failed", args), Dictionary.get("MSMPrompt.Rename_Failed_Title"), JOptionPane.ERROR_MESSAGE); 581 581 } 582 582 … … 883 883 JComboBox set = new JComboBox(); 884 884 set.setBackground(Color.white); 885 set.addItem(Dictionary. newget("MSMPrompt.Select_Set_None"));885 set.addItem(Dictionary.get("MSMPrompt.Select_Set_None")); 886 886 Vector sets = manager.getSets(); 887 887 for(int i = sets.size() - 1; i >= 0; i--) { -
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSet.java
r5589 r5593 341 341 // Failing all that set an error message 342 342 if(description == null) { 343 description = Dictionary. newget("MSM.No_Description");343 description = Dictionary.get("MSM.No_Description"); 344 344 } 345 345 } … … 448 448 // Failing all that set an error message 449 449 if(name == null) { 450 name = Dictionary. newget("MSM.No_Name");450 name = Dictionary.get("MSM.No_Name"); 451 451 } 452 452 } -
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java
r5589 r5593 548 548 javax.swing.filechooser.FileFilter filter = new MDSFileFilter(); 549 549 chooser.setFileFilter(filter); 550 int returnVal = chooser.showDialog(Gatherer.g_man, Dictionary. newget("MSMPrompt.File_Import"));550 int returnVal = chooser.showDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.File_Import")); 551 551 if(returnVal == JFileChooser.APPROVE_OPTION) { 552 552 return importMDS(chooser.getSelectedFile(), true); -
trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
r5564 r5593 159 159 160 160 public void saving() { 161 progress_bar.setString(Dictionary. newget("SaveProgressDialog.Title"));161 progress_bar.setString(Dictionary.get("SaveProgressDialog.Title")); 162 162 progress_bar.setValue(MAX / (10 * 2)); 163 163 } … … 174 174 */ 175 175 public void start() { 176 progress_bar.setString(Dictionary. newget("FileActions.Calculating_Size"));176 progress_bar.setString(Dictionary.get("FileActions.Calculating_Size")); 177 177 progress_bar.setValue(MAX / 10); 178 178 num_files = Gatherer.c_man.getCollection().getDocumentCount(); -
trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r5581 r5593 151 151 } 152 152 ///ystem.err.println("Command: " + command); 153 fireMessage(type, Dictionary. newget("GShell.Command") + ": " + command, status);153 fireMessage(type, Dictionary.get("GShell.Command") + ": " + command, status); 154 154 155 155 Runtime rt = Runtime.getRuntime(); … … 188 188 if(prcs.exitValue() == 0) { 189 189 status = OK; 190 fireMessage(type, typeAsString(type) + "> " + Dictionary. newget("GShell.Success"), status);190 fireMessage(type, typeAsString(type) + "> " + Dictionary.get("GShell.Success"), status); 191 191 } 192 192 else { 193 193 status = ERROR; 194 fireMessage(type, typeAsString(type) + "> " + Dictionary. newget("GShell.Failure"), status);194 fireMessage(type, typeAsString(type) + "> " + Dictionary.get("GShell.Failure"), status); 195 195 } 196 196 } … … 210 210 // If no error occured, and this was an import process we now extract any new metadata from the archive directory. 211 211 if(status == OK && type == IMPORT) { 212 fireMessage(type, typeAsString(type) + "> " + Dictionary. newget("GShell.Parsing_Metadata_Start"), status);212 fireMessage(type, typeAsString(type) + "> " + Dictionary.get("GShell.Parsing_Metadata_Start"), status); 213 213 new GreenstoneArchiveParser(progress, this); 214 fireMessage(type, typeAsString(type) + "> " + Dictionary. newget("GShell.Parsing_Metadata_Complete"), status);214 fireMessage(type, typeAsString(type) + "> " + Dictionary.get("GShell.Parsing_Metadata_Complete"), status); 215 215 } 216 216 // Tidy up. … … 292 292 switch(type) { 293 293 case BUILD: 294 name = Dictionary. newget("GShell.Build");294 name = Dictionary.get("GShell.Build"); 295 295 break; 296 296 case IMPORT: 297 name = Dictionary. newget("GShell.Import");297 name = Dictionary.get("GShell.Import"); 298 298 break; 299 299 case NEW: 300 name = Dictionary. newget("GShell.New");300 name = Dictionary.get("GShell.New"); 301 301 break; 302 302 default: 303 name = Dictionary. newget("GShell.Other");303 name = Dictionary.get("GShell.Other"); 304 304 } 305 305 return name; -
trunk/gli/src/org/greenstone/gatherer/util/DragTreeSelectionModel.java
r5564 r5593 114 114 args[0] = String.valueOf(file_count); 115 115 args[1] = String.valueOf(folder_count); 116 suffix = Dictionary. newget("FileActions.Selected", args);116 suffix = Dictionary.get("FileActions.Selected", args); 117 117 } 118 118 else if(file_count > 1) { 119 119 args = new String[1]; 120 120 args[0] = String.valueOf(file_count); 121 suffix = Dictionary. newget("FileActions.Files_And_Directory_Selected", args);121 suffix = Dictionary.get("FileActions.Files_And_Directory_Selected", args); 122 122 } 123 123 else if(folder_count > 1) { 124 124 args = new String[1]; 125 125 args[0] = String.valueOf(folder_count); 126 suffix = Dictionary. newget("FileActions.File_And_Directories_Selected", args);126 suffix = Dictionary.get("FileActions.File_And_Directories_Selected", args); 127 127 } 128 128 else { 129 suffix = Dictionary. newget("FileActions.File_And_Directory_Selected");129 suffix = Dictionary.get("FileActions.File_And_Directory_Selected"); 130 130 } 131 131 } … … 134 134 args = new String[1]; 135 135 args[0] = String.valueOf(file_count); 136 suffix = Dictionary. newget("FileActions.Files_Selected", args);136 suffix = Dictionary.get("FileActions.Files_Selected", args); 137 137 } 138 138 else if(file_count == 1) { 139 suffix = Dictionary. newget("FileActions.File_Selected");139 suffix = Dictionary.get("FileActions.File_Selected"); 140 140 } 141 141 } … … 144 144 args = new String[1]; 145 145 args[0] = String.valueOf(folder_count); 146 suffix = Dictionary. newget("FileActions.Directories_Selected", args);146 suffix = Dictionary.get("FileActions.Directories_Selected", args); 147 147 } 148 148 else { 149 suffix = Dictionary. newget("FileActions.Directory_Selected");149 suffix = Dictionary.get("FileActions.Directory_Selected"); 150 150 } 151 151 } -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r5581 r5593 485 485 */ 486 486 static public String formatPath(String key, String raw, int width) { 487 JLabel label = new JLabel(Dictionary. newget(key, raw));487 JLabel label = new JLabel(Dictionary.get(key, raw)); 488 488 int position = -1; 489 489 while(label.getPreferredSize().width > width && (position = raw.indexOf(File.separator)) != -1) { 490 490 raw = "..." + raw.substring(position + 1); 491 label.setText(Dictionary. newget(key, raw));491 label.setText(Dictionary.get(key, raw)); 492 492 } 493 493 if(raw.indexOf(File.separator) == -1 && raw.startsWith("...")) { … … 571 571 int year = current.get(Calendar.YEAR); 572 572 573 return Dictionary. newget("Dates." + day_name) + " " + Dictionary.newget("Dates." + month_name) + " " + day + " " + year + " " + Utility.pad(String.valueOf(hour), 2, '0', true) + ":" + Utility.pad(String.valueOf(minute), 2, '0', true) + ":" + Utility.pad(String.valueOf(second), 2, '0', true);573 return Dictionary.get("Dates." + day_name) + " " + Dictionary.get("Dates." + month_name) + " " + day + " " + year + " " + Utility.pad(String.valueOf(hour), 2, '0', true) + ":" + Utility.pad(String.valueOf(minute), 2, '0', true) + ":" + Utility.pad(String.valueOf(second), 2, '0', true); 574 574 } 575 575 … … 594 594 ImageIcon image = null; 595 595 try { 596 image = new ImageIcon(ClassLoader.getSystemResource("images/" + Dictionary. newget("Version") + "/" + filename));596 image = new ImageIcon(ClassLoader.getSystemResource("images/" + Dictionary.get("Version") + "/" + filename)); 597 597 } 598 598 catch(NullPointerException exception) {
Note:
See TracChangeset
for help on using the changeset viewer.