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

    r12091 r12123  
    255255        // Creation
    256256        JPanel assigned_indexes_pane = new JPanel();
    257         JLabel index_label = new JLabel();
    258         Dictionary.registerText(index_label, "CDM.SubcollectionIndexManager.Subindexes");
    259         subcollection_index_list = new JList(model);
     257        JLabel index_label = new JLabel(Dictionary.get("CDM.SubcollectionIndexManager.Subindexes"));
     258        subcollection_index_list = new JList(model);
    260259        subcollection_index_list.setCellRenderer(new SubcollectionIndexListCellRenderer());
    261260        subcollection_index_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    263262
    264263        JPanel movement_pane = new JPanel();
    265         move_up_button = new GLIButton("", JarTools.getImage("arrow-up.gif"));
     264        move_up_button = new GLIButton(Dictionary.get("CDM.Move.Move_Up"), JarTools.getImage("arrow-up.gif"), Dictionary.get("CDM.Move.Move_Up_Tooltip"));
    266265        move_up_button.setEnabled(false);
    267         move_up_button.setMnemonic(KeyEvent.VK_U);
    268         Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    269 
    270         move_down_button = new GLIButton("", JarTools.getImage("arrow-down.gif"));
     266       
     267        move_down_button = new GLIButton(Dictionary.get("CDM.Move.Move_Down"), JarTools.getImage("arrow-down.gif"), Dictionary.get("CDM.Move.Move_Down_Tooltip"));
    271268        move_down_button.setEnabled(false);
    272         move_down_button.setMnemonic(KeyEvent.VK_D);
    273         Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    274 
    275         set_default_button = new GLIButton();
     269       
     270        set_default_button = new GLIButton(Dictionary.get("CDM.SubcollectionIndexManager.Set_Default_Subindex"), Dictionary.get("CDM.SubcollectionIndexManager.Set_Default_Subindex_Tooltip"));
    276271        set_default_button.setEnabled(false);
    277         set_default_button.setMnemonic(KeyEvent.VK_S);
    278         Dictionary.registerBoth(set_default_button, "CDM.SubcollectionIndexManager.Set_Default_Subindex", "CDM.SubcollectionIndexManager.Set_Default_Subindex_Tooltip");
    279 
     272       
    280273        JPanel index_pane = new JPanel();
    281274        JPanel details_pane = new JPanel();
     
    284277        JPanel content_pane = new JPanel();
    285278
    286         JLabel source_label = new JLabel();
    287         Dictionary.registerText(source_label, "CDM.SubcollectionIndexManager.Source");
     279        JLabel source_label = new JLabel(Dictionary.get("CDM.SubcollectionIndexManager.Source"));
     280       
    288281        source_list = new CheckList(false);
    289282        source_list.setListData(sources);
    290         Dictionary.registerTooltip(source_list, "CDM.SubcollectionIndexManager.Source_Tooltip");
    291 
     283        source_list.setToolTipText(Dictionary.get("CDM.SubcollectionIndexManager.Source_Tooltip"));
     284       
    292285        JPanel button_pane = new JPanel();
    293         add_button = new GLIButton();
     286        add_button = new GLIButton(Dictionary.get("CDM.SubcollectionIndexManager.Add_Subindex"), Dictionary.get("CDM.SubcollectionIndexManager.Add_Subindex_Tooltip"));
    294287        add_button.setEnabled(false);
    295         add_button.setMnemonic(KeyEvent.VK_A);
    296         Dictionary.registerBoth(add_button, "CDM.SubcollectionIndexManager.Add_Subindex", "CDM.SubcollectionIndexManager.Add_Subindex_Tooltip");
    297 
    298         remove_button = new GLIButton();
     288       
     289        remove_button = new GLIButton(Dictionary.get("CDM.SubcollectionIndexManager.Remove_Subindex"), Dictionary.get("CDM.SubcollectionIndexManager.Remove_Subindex_Tooltip"));
    299290        remove_button.setEnabled(false);
    300         remove_button.setMnemonic(KeyEvent.VK_R);
    301         Dictionary.registerBoth(remove_button, "CDM.SubcollectionIndexManager.Remove_Subindex", "CDM.SubcollectionIndexManager.Remove_Subindex_Tooltip");
    302 
    303         replace_button = new GLIButton();
     291       
     292        replace_button = new GLIButton(Dictionary.get("CDM.SubcollectionIndexManager.Replace_Subindex"), Dictionary.get("CDM.SubcollectionIndexManager.Replace_Subindex_Tooltip"));
    304293        replace_button.setEnabled(false);
    305         replace_button.setMnemonic(KeyEvent.VK_P);
    306         Dictionary.registerBoth(replace_button, "CDM.SubcollectionIndexManager.Replace_Subindex", "CDM.SubcollectionIndexManager.Replace_Subindex_Tooltip");
    307 
     294       
    308295        // Listeners
    309296        add_button.addActionListener(new AddListener());
Note: See TracChangeset for help on using the changeset viewer.