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/SubcollectionManager.java

    r11039 r12123  
    186186
    187187        JPanel button_pane_3 = new JPanel();
    188         add_button = new GLIButton();
    189         add_button.setMnemonic(KeyEvent.VK_A);
     188        add_button = new GLIButton(Dictionary.get("CDM.SubcollectionManager.Add"), Dictionary.get("CDM.SubcollectionManager.Add_Tooltip"));
    190189        add_button.setEnabled(false);
    191         Dictionary.registerBoth(add_button, "CDM.SubcollectionManager.Add", "CDM.SubcollectionManager.Add_Tooltip");
    192         remove_button = new GLIButton();
    193         remove_button.setMnemonic(KeyEvent.VK_R);
     190       
     191        remove_button = new GLIButton(Dictionary.get("CDM.SubcollectionManager.Remove"), Dictionary.get("CDM.SubcollectionManager.Remove_Tooltip"));
    194192        remove_button.setEnabled(false);
    195         Dictionary.registerBoth(remove_button, "CDM.SubcollectionManager.Remove", "CDM.SubcollectionManager.Remove_Tooltip");
    196         update_button = new GLIButton();
    197         update_button.setMnemonic(KeyEvent.VK_C);
     193       
     194        update_button = new GLIButton(Dictionary.get("CDM.SubcollectionManager.Replace"), Dictionary.get("CDM.SubcollectionManager.Replace_Tooltip"));
    198195        update_button.setEnabled(false);
    199         Dictionary.registerBoth(update_button, "CDM.SubcollectionManager.Replace", "CDM.SubcollectionManager.Replace_Tooltip");
    200 
     196       
    201197        JPanel button_pane = new JPanel();
    202198        JPanel button_pane_1 = new JPanel();
    203         include_button = new JRadioButton();
     199        include_button = new JRadioButton(Dictionary.get("CDM.SubcollectionManager.Include"));
    204200        include_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    205         include_button.setMnemonic(KeyEvent.VK_I);
    206201        include_button.setOpaque(false);
    207         Dictionary.registerText(include_button, "CDM.SubcollectionManager.Include");
    208         exclude_button = new JRadioButton();
     202       
     203        exclude_button = new JRadioButton(Dictionary.get("CDM.SubcollectionManager.Exclude"));
    209204        exclude_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    210         exclude_button.setMnemonic(KeyEvent.VK_X);
    211205        exclude_button.setOpaque(false);
    212         Dictionary.registerText(exclude_button, "CDM.SubcollectionManager.Exclude");
    213 
    214         JLabel flags_label = new JLabel();
    215         Dictionary.registerText(flags_label, "CDM.SubcollectionManager.Flags");
     206       
     207        JLabel flags_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Flags"));
     208       
    216209        flags_field = new NonWhitespaceField();
    217         Dictionary.registerTooltip(flags_field, "CDM.SubcollectionManager.Flags_Tooltip");
     210        flags_field.setToolTipText(Dictionary.get("CDM.SubcollectionManager.Flags_Tooltip"));
    218211
    219212        JPanel inclusive_pane = new JPanel();
    220         JLabel inclusive_label = new JLabel();
    221         Dictionary.registerText(inclusive_label, "CDM.SubcollectionManager.Inclusive");
    222 
    223         JLabel match_label = new JLabel();
    224         Dictionary.registerText(match_label, "CDM.SubcollectionManager.Match");
     213        JLabel inclusive_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Inclusive"));
     214       
     215        JLabel match_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Match"));
     216       
    225217        match_field = new JTextField();
    226         Dictionary.registerTooltip(match_field, "CDM.SubcollectionManager.Match_Tooltip");
    227 
    228         JLabel name_label = new JLabel();
    229         Dictionary.registerText(name_label, "CDM.SubcollectionManager.Name");
     218        match_field.setToolTipText(Dictionary.get("CDM.SubcollectionManager.Match_Tooltip"));
     219       
     220        JLabel name_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Name"));
     221       
    230222        name_field = new NonWhitespaceField();
    231         Dictionary.registerTooltip(name_field, "CDM.SubcollectionManager.Name_Tooltip");
    232 
    233         JLabel source_label = new JLabel();
    234         Dictionary.registerText(source_label, "CDM.SubcollectionManager.Source");
     223        name_field.setToolTipText(Dictionary.get("CDM.SubcollectionManager.Name_Tooltip"));
     224       
     225        JLabel source_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Source"));
     226       
    235227        ArrayList every_metadata_set_element = MetadataSetManager.getEveryMetadataSetElement();
    236228        Vector source_model = new Vector(every_metadata_set_element);
    237229        source_model.add(0, StaticStrings.FILENAME_STR);
    238230        source_combobox = new JComboBox(source_model);
    239         Dictionary.registerTooltip(source_combobox, "CDM.SubcollectionManager.Source_Tooltip");
    240 
     231        source_combobox.setToolTipText(Dictionary.get("CDM.SubcollectionManager.Source_Tooltip"));
     232       
    241233        subcollection_list = new JList(model);
    242234        subcollection_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    247239        include_button.setSelected(true);
    248240        JPanel subcollection_list_pane = new JPanel();
    249         JLabel subcollection_list_label = new JLabel();
    250         Dictionary.registerText(subcollection_list_label, "CDM.SubcollectionManager.Assigned");
    251 
     241        JLabel subcollection_list_label = new JLabel(Dictionary.get("CDM.SubcollectionManager.Assigned"));
     242       
    252243        // Create a message pane which explains why these controls are not currently active
    253244        JPanel message_pane = new JPanel();
     
    256247        args[1] = Dictionary.get("Preferences.Mode.Systems");
    257248        args[2] = Dictionary.get("Preferences.Mode.Expert");
    258         JTextArea message_textarea = new JTextArea();
    259         Dictionary.registerText(message_textarea, "CDM.SubcollectionManager.Partitions_Disabled", args);
     249        JTextArea message_textarea = new JTextArea(Dictionary.get("CDM.SubcollectionManager.Partitions_Disabled", args));
     250       
    260251        message_textarea.setEditable(false);
    261252        message_textarea.setHighlighter(null); // Prevent highlighting
Note: See TracChangeset for help on using the changeset viewer.