- Timestamp:
- 2003-09-26T14:58:33+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r5529 r5536 35 35 import javax.swing.plaf.basic.*; 36 36 import org.apache.xerces.parsers.*; 37 import org.greenstone.gatherer.Dictionary; 37 38 import org.greenstone.gatherer.Gatherer; 38 39 import org.greenstone.gatherer.cdm.Argument; … … 145 146 } 146 147 if(plugin.getName().equals(StaticStrings.ARCPLUG_STR) || plugin.getName().equals(StaticStrings.RECPLUG_STR)) { 147 JOptionPane.showMessageDialog(Gatherer.g_man, Gatherer.dictionary.get("CDM.Move.Fixed"), Gatherer.dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);148 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.Fixed"), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 148 149 return; 149 150 } … … 182 183 if(index < 0) { 183 184 String args[] = new String[2]; 184 args[0] = Gatherer.dictionary.get("CDM.PlugInManager.PlugIn_Str");185 args[0] = Dictionary.newget("CDM.PlugInManager.PlugIn_Str"); 185 186 args[1] = plugin.getName(); 186 JOptionPane.showMessageDialog(Gatherer.g_man, Gatherer.dictionary.get("CDM.Move.At_Top", args), Gatherer.dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);187 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.At_Top", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 187 188 return; 188 189 } … … 197 198 String args[] = new String[1]; 198 199 args[0] = plugin.getName(); 199 JOptionPane.showMessageDialog(Gatherer.g_man, Gatherer.dictionary.get("CDM.Move.Cannot", args), Gatherer.dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);200 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.Cannot", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE); 200 201 // Still not going to move RecPlug or ArcPlug. 201 202 return; … … 373 374 String plugin_name = getPlugInName(plugin); 374 375 //Gatherer.println("Zero length argument xml detected for: " + plugin_name); 375 JOptionPane.showMessageDialog(Gatherer.g_man, Gatherer.dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin_name), Gatherer.dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 376 String[] margs = new String[1]; 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); 376 379 } 377 380 } … … 410 413 if(files != null) { 411 414 // Create a progress indicator. 412 ParsingProgress progress = new ParsingProgress( Gatherer.dictionary.get("CDM.PlugInManager.Parsing.Title"), Gatherer.dictionary.get("CDM.PlugInManager.Parsing.Message"), files.length);415 ParsingProgress progress = new ParsingProgress(Dictionary.newget("CDM.PlugInManager.Parsing.Title"), Dictionary.newget("CDM.PlugInManager.Parsing.Message"), files.length); 413 416 for(int i = 0; i < files.length; i++) { 414 417 // We only want to check Perl Modules. … … 559 562 add = new JButton(); 560 563 add.setMnemonic(KeyEvent.VK_A); 561 Gatherer.dictionary.setBoth(add, "CDM.PlugInManager.Add", "CDM.PlugInManager.Add_Tooltip");564 Dictionary.registerBoth(add, "CDM.PlugInManager.Add", "CDM.PlugInManager.Add_Tooltip"); 562 565 563 566 button_pane = new JPanel(); … … 567 570 configure.setEnabled(false); 568 571 configure.setMnemonic(KeyEvent.VK_C); 569 Gatherer.dictionary.setBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip");572 Dictionary.registerBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip"); 570 573 571 574 header_pane = new JPanel(); … … 577 580 instructions.setRows(6); 578 581 instructions.setWrapStyleWord(true); 579 Gatherer.dictionary.setText(instructions, "CDM.PlugInManager.Instructions", null);582 Dictionary.registerText(instructions, "CDM.PlugInManager.Instructions"); 580 583 581 584 move_top_button = new DoubleImageButton("", Utility.getImage("arrow-top.gif"), Utility.getImage("arrow-top-disabled.gif")); … … 584 587 // move_top_button.setDisplayedMnemonicIndex(8); // !! English-centric hack 585 588 move_top_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 586 Gatherer.dictionary.setBoth(move_top_button, "CDM.Move.Move_Top", "CDM.Move.Move_Top_Tooltip");589 Dictionary.registerBoth(move_top_button, "CDM.Move.Move_Top", "CDM.Move.Move_Top_Tooltip"); 587 590 588 591 move_up_button = new DoubleImageButton("", Utility.getImage("arrow-up.gif"), Utility.getImage("arrow-up-disabled.gif")); … … 590 593 move_up_button.setMnemonic(KeyEvent.VK_U); 591 594 move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 592 Gatherer.dictionary.setBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");595 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 593 596 594 597 move_down_button = new DoubleImageButton("", Utility.getImage("arrow-down.gif"), Utility.getImage("arrow-down-disabled.gif")); … … 596 599 move_down_button.setMnemonic(KeyEvent.VK_D); 597 600 move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 598 Gatherer.dictionary.setBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");601 Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip"); 599 602 600 603 move_bottom_button = new DoubleImageButton("", Utility.getImage("arrow-bottom.gif"), Utility.getImage("arrow-bottom-disabled.gif")); … … 602 605 move_bottom_button.setMnemonic(KeyEvent.VK_B); 603 606 move_bottom_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 604 Gatherer.dictionary.setBoth(move_bottom_button, "CDM.Move.Move_Bottom", "CDM.Move.Move_Bottom_Tooltip");607 Dictionary.registerBoth(move_bottom_button, "CDM.Move.Move_Bottom", "CDM.Move.Move_Bottom_Tooltip"); 605 608 606 609 movement_pane = new JPanel(); … … 613 616 plugin.setTextNonSelectionColor(Gatherer.config.getColor("coloring.workspace_tree_foreground", false)); 614 617 plugin.setTextSelectionColor(Gatherer.config.getColor("coloring.collection_selection_foreground", false)); 615 Gatherer.dictionary.setTooltip(plugin, "CDM.PlugInManager.PlugIn_Tooltip");618 Dictionary.registerTooltip(plugin, "CDM.PlugInManager.PlugIn_Tooltip"); 616 619 617 620 plugin_label = new JLabel(); 618 Gatherer.dictionary.setText(plugin_label, "CDM.PlugInManager.PlugIn", null);621 Dictionary.registerText(plugin_label, "CDM.PlugInManager.PlugIn"); 619 622 620 623 plugin_list = new JList(model); … … 624 627 plugin_list_label.setHorizontalAlignment(JLabel.CENTER); 625 628 plugin_list_label.setOpaque(true); 626 Gatherer.dictionary.setText(plugin_list_label, "CDM.PlugInManager.Assigned", null);629 Dictionary.registerText(plugin_list_label, "CDM.PlugInManager.Assigned"); 627 630 628 631 plugin_list_pane = new JPanel(); … … 632 635 remove.setEnabled(false); 633 636 remove.setMnemonic(KeyEvent.VK_R); 634 Gatherer.dictionary.setBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip");637 Dictionary.registerBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip"); 635 638 636 639 title = new JLabel(); 637 640 title.setHorizontalAlignment(JLabel.CENTER); 638 641 title.setOpaque(true); 639 Gatherer.dictionary.setText(title, "CDM.PlugInManager.Title", null);642 Dictionary.registerText(title, "CDM.PlugInManager.Title"); 640 643 641 644 // Listeners … … 693 696 (BorderFactory.createEmptyBorder(5,0,5,0), 694 697 BorderFactory.createCompoundBorder 695 (BorderFactory.createTitledBorder( Gatherer.dictionary.get("CDM.PlugInManager.Controls")),698 (BorderFactory.createTitledBorder(Dictionary.newget("CDM.PlugInManager.Controls")), 696 699 BorderFactory.createEmptyBorder(2,2,2,2)))); 697 700 … … 768 771 } 769 772 else { 770 JOptionPane.showMessageDialog(Gatherer.g_man, Gatherer.dictionary.get("CDM.PlugInManager.PlugIn_Exists"), Gatherer.dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);773 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.PlugInManager.PlugIn_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE); 771 774 } 772 775 base_plugin = null;
Note:
See TracChangeset
for help on using the changeset viewer.