Ignore:
Timestamp:
2006-07-10T15:02:33+12:00 (18 years ago)
Author:
kjdon
Message:

Changed text handling to use Dictionary.get rather than Dictionary.setText or Dictionary.registerBoth etc. also removed mnemonics cos they suck for other languages.

File:
1 edited

Legend:

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

    r12071 r12123  
    701701    public PluginControl() {
    702702        // Create
    703         add = new GLIButton();
    704         add.setMnemonic(KeyEvent.VK_A);
    705         Dictionary.registerBoth(add, "CDM.PlugInManager.Add", "CDM.PlugInManager.Add_Tooltip");
    706 
     703        add = new GLIButton(Dictionary.get("CDM.PlugInManager.Add"), Dictionary.get("CDM.PlugInManager.Add_Tooltip"));
     704       
    707705        button_pane = new JPanel();
    708706        central_pane = new JPanel();
    709707
    710         configure = new GLIButton();
     708        configure = new GLIButton(Dictionary.get("CDM.PlugInManager.Configure"), Dictionary.get("CDM.PlugInManager.Configure_Tooltip"));
    711709        configure.setEnabled(false);
    712         configure.setMnemonic(KeyEvent.VK_C);
    713         Dictionary.registerBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip");
    714 
     710       
    715711        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Plugins", "plugins");
    716         move_up_button = new GLIButton("", JarTools.getImage("arrow-up.gif"));
     712        move_up_button = new GLIButton(Dictionary.get("CDM.Move.Move_Up"), JarTools.getImage("arrow-up.gif"), Dictionary.get("CDM.Move.Move_Up_Tooltip"));
    717713        move_up_button.setEnabled(false);
    718         move_up_button.setMnemonic(KeyEvent.VK_U);
    719         Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    720 
    721         move_down_button = new GLIButton("", JarTools.getImage("arrow-down.gif"));
     714       
     715        move_down_button = new GLIButton(Dictionary.get("CDM.Move.Move_Down"), JarTools.getImage("arrow-down.gif"), Dictionary.get("CDM.Move.Move_Down_Tooltip"));
    722716        move_down_button.setEnabled(false);
    723         move_down_button.setMnemonic(KeyEvent.VK_D);
    724         Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    725 
     717       
    726718        movement_pane = new JPanel();
    727719
     
    735727        picl.itemStateChanged(new ItemEvent(plugin, 0, null, ItemEvent.SELECTED));
    736728
    737         plugin_label = new JLabel();
    738         Dictionary.registerText(plugin_label, "CDM.PlugInManager.PlugIn");
    739 
     729        plugin_label = new JLabel(Dictionary.get("CDM.PlugInManager.PlugIn"));
     730       
    740731        plugin_list = new JList(model);
    741732        plugin_list.setCellRenderer(new ListRenderer());
    742733        plugin_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    743         plugin_list_label = new JLabel();
     734        plugin_list_label = new JLabel(Dictionary.get("CDM.PlugInManager.Assigned"));
    744735        //plugin_list_label.setHorizontalAlignment(JLabel.CENTER);
    745736        plugin_list_label.setOpaque(true);
    746         Dictionary.registerText(plugin_list_label, "CDM.PlugInManager.Assigned");
    747 
     737       
    748738        plugin_list_pane = new JPanel();
    749739        plugin_pane = new JPanel();
    750740
    751         remove = new GLIButton();
     741        remove = new GLIButton(Dictionary.get("CDM.PlugInManager.Remove"), Dictionary.get("CDM.PlugInManager.Remove_Tooltip"));
    752742        remove.setEnabled(false);
    753         remove.setMnemonic(KeyEvent.VK_R);
    754         Dictionary.registerBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip");
    755 
     743       
    756744        // Listeners
    757745        add.addActionListener(new AddListener()); //all_change_listener is listening to the ArgumentConfiguration
     
    10741062                // And reset the tooltip. If the plugin is null or is a string, then go back to the default message
    10751063                if(current_selection == null || current_selection instanceof String) {
    1076                     Dictionary.registerTooltip(plugin, "CDM.PlugInManager.PlugIn_Tooltip");
     1064            plugin.setToolTipText(Dictionary.get("CDM.PlugInManager.PlugIn_Tooltip"));
    10771065                }
    10781066                else {
    10791067                    Plugin current_plugin = (Plugin) current_selection;
    1080                     Dictionary.registerTooltipText(plugin, Utility.formatHTMLWidth(current_plugin.getDescription(), 40));
     1068            plugin.setToolTipText(Utility.formatHTMLWidth(current_plugin.getDescription(), 40));
    10811069                    current_plugin = null;
    10821070                }
     
    11541142        setModal(true);
    11551143        setSize(size);
    1156         Dictionary.setText(this, "CDM.PluginManager.SuggestedPluginListTitle");
     1144        setTitle(Dictionary.get("CDM.PluginManager.SuggestedPluginListTitle"));
    11571145
    11581146        String[] args = new String[1];
    11591147        args[0] = filename;
    11601148
    1161         JTextArea instructions_textarea = new JTextArea();
     1149        JTextArea instructions_textarea = new JTextArea(Dictionary.get("CDM.PluginManager.Plugin_Suggestion_Prompt", args));
    11621150        instructions_textarea.setCaretPosition(0);
    11631151        instructions_textarea.setEditable(false);
     
    11651153        instructions_textarea.setRows(5);
    11661154        instructions_textarea.setWrapStyleWord(true);
    1167         Dictionary.setText(instructions_textarea, "CDM.PluginManager.Plugin_Suggestion_Prompt", args);
    1168 
    1169         JLabel suitable_plugins_label = new JLabel();
    1170         Dictionary.registerText(suitable_plugins_label, "CDM.PlugInManager.PlugIn");
     1155
     1156        JLabel suitable_plugins_label = new JLabel(Dictionary.get("CDM.PlugInManager.PlugIn"));
    11711157        suitable_plugins_label.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    11721158
     
    11831169        suitable_plugins_pane.add(suitable_plugins_combobox, BorderLayout.CENTER);
    11841170
    1185         add_button = new GLIButton();
    1186         Dictionary.setBoth(add_button, "CDM.PlugInManager.QuickAdd", "CDM.PlugInManager.Add_Tooltip");
    1187         ignore_button = new GLIButton();
    1188         Dictionary.setBoth(ignore_button, "CDM.PlugInManager.Ignore","CDM.PlugInManager.Ignore_Tooltip" );
    1189 
     1171        add_button = new GLIButton(Dictionary.get("CDM.PlugInManager.QuickAdd"), Dictionary.get("CDM.PlugInManager.Add_Tooltip"));
     1172        ignore_button = new GLIButton(Dictionary.get("CDM.PlugInManager.Ignore"), Dictionary.get("CDM.PlugInManager.Ignore_Tooltip"));
     1173       
    11901174        add_button.addActionListener(this);
    11911175        ignore_button.addActionListener(this);
Note: See TracChangeset for help on using the changeset viewer.