Ignore:
Timestamp:
2003-09-26T14:58:33+12:00 (21 years ago)
Author:
mdewsnip
Message:

Many more tooltips and improvements to the Dictionary. Still more to come.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r5529 r5536  
    3535import javax.swing.plaf.basic.*;
    3636import org.apache.xerces.parsers.*;
     37import org.greenstone.gatherer.Dictionary;
    3738import org.greenstone.gatherer.Gatherer;
    3839import org.greenstone.gatherer.cdm.Argument;
     
    145146    }
    146147    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);
    148149        return;
    149150    }
     
    182183        if(index < 0) {
    183184            String args[] = new String[2];
    184             args[0] = Gatherer.dictionary.get("CDM.PlugInManager.PlugIn_Str");
     185            args[0] = Dictionary.newget("CDM.PlugInManager.PlugIn_Str");
    185186            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);
    187188            return;
    188189        }
     
    197198            String args[] = new String[1];
    198199            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);
    200201            // Still not going to move RecPlug or ArcPlug.
    201202            return;
     
    373374        String plugin_name = getPlugInName(plugin);
    374375        //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);
    376379        }
    377380    }
     
    410413    if(files != null) {
    411414        // 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);
    413416        for(int i = 0; i < files.length; i++) {
    414417        // We only want to check Perl Modules.
     
    559562        add = new JButton();
    560563        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");
    562565
    563566        button_pane = new JPanel();
     
    567570        configure.setEnabled(false);
    568571        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");
    570573
    571574        header_pane = new JPanel();
     
    577580        instructions.setRows(6);
    578581        instructions.setWrapStyleWord(true);
    579         Gatherer.dictionary.setText(instructions, "CDM.PlugInManager.Instructions", null);
     582        Dictionary.registerText(instructions, "CDM.PlugInManager.Instructions");
    580583
    581584        move_top_button = new DoubleImageButton("", Utility.getImage("arrow-top.gif"), Utility.getImage("arrow-top-disabled.gif"));
     
    584587        // move_top_button.setDisplayedMnemonicIndex(8);  // !! English-centric hack
    585588        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");
    587590
    588591        move_up_button = new DoubleImageButton("", Utility.getImage("arrow-up.gif"), Utility.getImage("arrow-up-disabled.gif"));
     
    590593        move_up_button.setMnemonic(KeyEvent.VK_U);
    591594        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");
    593596
    594597        move_down_button = new DoubleImageButton("", Utility.getImage("arrow-down.gif"), Utility.getImage("arrow-down-disabled.gif"));
     
    596599        move_down_button.setMnemonic(KeyEvent.VK_D);
    597600        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");
    599602
    600603        move_bottom_button = new DoubleImageButton("", Utility.getImage("arrow-bottom.gif"), Utility.getImage("arrow-bottom-disabled.gif"));
     
    602605        move_bottom_button.setMnemonic(KeyEvent.VK_B);
    603606        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");
    605608
    606609        movement_pane = new JPanel();
     
    613616        plugin.setTextNonSelectionColor(Gatherer.config.getColor("coloring.workspace_tree_foreground", false));
    614617        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");
    616619
    617620        plugin_label = new JLabel();
    618         Gatherer.dictionary.setText(plugin_label, "CDM.PlugInManager.PlugIn", null);
     621        Dictionary.registerText(plugin_label, "CDM.PlugInManager.PlugIn");
    619622
    620623        plugin_list = new JList(model);
     
    624627        plugin_list_label.setHorizontalAlignment(JLabel.CENTER);
    625628        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");
    627630
    628631        plugin_list_pane = new JPanel();
     
    632635        remove.setEnabled(false);
    633636        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");
    635638
    636639        title = new JLabel();
    637640        title.setHorizontalAlignment(JLabel.CENTER);
    638641        title.setOpaque(true);
    639         Gatherer.dictionary.setText(title, "CDM.PlugInManager.Title", null);
     642        Dictionary.registerText(title, "CDM.PlugInManager.Title");
    640643
    641644        // Listeners
     
    693696         (BorderFactory.createEmptyBorder(5,0,5,0),
    694697          BorderFactory.createCompoundBorder
    695           (BorderFactory.createTitledBorder(Gatherer.dictionary.get("CDM.PlugInManager.Controls")),
     698          (BorderFactory.createTitledBorder(Dictionary.newget("CDM.PlugInManager.Controls")),
    696699           BorderFactory.createEmptyBorder(2,2,2,2))));
    697700
     
    768771            }
    769772            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);
    771774            }
    772775            base_plugin = null;
Note: See TracChangeset for help on using the changeset viewer.