Changeset 12115


Ignore:
Timestamp:
2006-07-10T14:42:54+12:00 (18 years ago)
Author:
kjdon
Message:

Changed text handling to use Dictionary.get rather than Dictionary.setText or Dictionary.registerBoth etc

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
6 edited

Legend:

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

    r10581 r12115  
    8383    JLabel title_label = new JLabel(getMessageString());
    8484    JPanel user_panel = new JPanel();
    85     JLabel username_label = new JLabel();
    86     Dictionary.setText(username_label, "GAuthenticator.Username");
     85    JLabel username_label = new JLabel(Dictionary.get("GAuthenticator.Username"));
    8786    JTextField username = new JTextField();
    88     Dictionary.setTooltip(username, "GAuthenticator.Username_Tooltip");
     87    username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip"));
    8988    JPanel password_panel = new JPanel();
    90     JLabel password_label = new JLabel();
    91     Dictionary.setText(password_label, "GAuthenticator.Password");
     89    JLabel password_label = new JLabel(Dictionary.get("GAuthenticator.Password"));
    9290    password = new JPasswordField();
    9391    password.setEchoChar('*');
    94     Dictionary.setTooltip(password, "GAuthenticator.Password_Tooltip");
     92    password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip"));
    9593    JPanel button_panel = new JPanel();
    96     ok_button = new GLIButton();
    97     ok_button.setMnemonic(KeyEvent.VK_O);
    98     Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    99     cancel_button = new GLIButton();
    100     cancel_button.setMnemonic(KeyEvent.VK_C);
    101     Dictionary.setBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip");
    102 
     94    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
     95    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Cancel_Tooltip"));
     96   
    10397    // Connection
    10498    cancel_button.addActionListener(new AuthenticationActionListener(true));
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r11625 r12115  
    7575    DebugStream.println("FileQueue started.");
    7676    this.queue = new ArrayList();
    77     file_status = new JLabel();
    78     Dictionary.setText(file_status, "FileActions.No_Activity");
     77    file_status = new JLabel(Dictionary.get("FileActions.No_Activity"));
    7978    progress = new GProgressBar();
    8079    progress.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java

    r10877 r12115  
    220220    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    221221    setSize(SIZE);
     222    setTitle(Dictionary.get("GEMS.Title"));
    222223    setJMenuBar(new GEMSMenuBar());
    223     Dictionary.setText(this, "GEMS.Title");
    224 
     224   
    225225    JPanel content_pane = (JPanel) getContentPane();
    226226    content_pane.setBackground(config.getColor("coloring.collection_heading_background", false));     
     
    305305    remove_set_action_listener = new RemoveSetActionListener();
    306306
     307//  JPanel element_values_pane = new JPanel();
     308//  element_values_pane.setOpaque(false);
     309   
     310//  JTree element_values_tree = new JTree();
     311//  element_values_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
     312//  element_values_tree.setModel(null);
     313//  element_values_tree.setRootVisible(false);
     314//  element_values_tree.putClientProperty("JTree.lineStyle", "Angled");
     315
     316//  JPanel element_value_edit_panel = new JPanel();
     317//  JButton add_button = new JButton();
     318//  add_button.setText("add value");
     319//  JTextField value_field = new JTextField();
     320//  element_value_edit_panel.setLayout(new BorderLayout());
     321//  element_value_edit_panel.add(value_field, BorderLayout.CENTER);
     322//  element_value_edit_panel.add(add_button, BorderLayout.EAST);
     323   
     324//  element_values_pane.setLayout(new BorderLayout());
     325//  element_values_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("GEMS.ElementValues")), BorderFactory.createEmptyBorder(2,2,2,2)));
     326//  element_values_pane.add(new JScrollPane(element_values_tree), BorderLayout.CENTER);
     327//  element_values_pane.add(element_value_edit_panel, BorderLayout.SOUTH);
     328
    307329    // Layout
    308330    mds_tree_pane.setLayout(new BorderLayout());
     
    331353         
    332354    element_inner_pane.setLayout(new BorderLayout());
     355    //element_inner_pane.setLayout(new GridLayout(2,1));
    333356    element_inner_pane.add(element_attributes_pane);
     357    //element_inner_pane.add(element_values_pane);
    334358         
    335359    element_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("GEMS.Element_Details")), BorderFactory.createEmptyBorder(2,2,2,2)));
     
    424448    {
    425449        file = new JMenu();
    426         file.setMnemonic(KeyEvent.VK_F);
    427         Dictionary.registerText(file, "Menu.File");
    428 
    429         file_exit = new JMenuItem();
     450        file.setText(Dictionary.get("Menu.File"));
     451       
     452        file_exit = new JMenuItem(Dictionary.get("Menu.File_Exit"));
    430453        file_exit.addActionListener(this);
    431         file_exit.setMnemonic(KeyEvent.VK_X);
    432         Dictionary.registerText(file_exit, "Menu.File_Exit");
    433 
    434         file_new = new JMenuItem();
     454       
     455        file_new = new JMenuItem(Dictionary.get("Menu.File_New"));
    435456        file_new.addActionListener(this);
    436         file_new.setMnemonic(KeyEvent.VK_N);
    437         Dictionary.registerText(file_new, "Menu.File_New");
    438 
    439         file_open = new JMenuItem();
     457       
     458        file_open = new JMenuItem(Dictionary.get("Menu.File_Open"));
    440459        file_open.addActionListener(this);
    441         file_open.setMnemonic(KeyEvent.VK_O);
    442         Dictionary.registerText(file_open, "Menu.File_Open");
    443 
    444         file_save = new JMenuItem();
     460       
     461        file_save = new JMenuItem(Dictionary.get("Menu.File_Save"));
    445462        file_save.addActionListener(this);
    446         file_save.setMnemonic(KeyEvent.VK_S);
    447             Dictionary.registerText(file_save, "Menu.File_Save");
    448            
    449             file_delete = new JMenuItem();
     463                   
     464            file_delete = new JMenuItem(Dictionary.get("Menu.File_Delete"));
    450465        file_delete.addActionListener(new KeyPressedHandler()); //KeyPressedHandler handles deleting stuff.
    451         file_delete.setMnemonic(KeyEvent.VK_S);
    452             Dictionary.registerText(file_delete, "Menu.File_Delete");
    453            
    454             file_preferences = new JMenuItem();
     466                   
     467            file_preferences = new JMenuItem(Dictionary.get("Menu.File_Options"));
    455468        file_preferences.addActionListener(this);
    456         file_preferences.setMnemonic(KeyEvent.VK_S);
    457             Dictionary.registerText(file_preferences, "Menu.File_Options");
    458 
     469       
    459470        // Layout (file menu)
    460471        file.add(file_new);
     
    469480        // Edit menu
    470481        edit = new JMenu();
    471         edit.setMnemonic(KeyEvent.VK_E);
    472         Dictionary.registerText(edit, "Menu.Edit");
    473 
    474         edit_cut = new JMenuItem();
     482        edit.setText(Dictionary.get("Menu.Edit"));
     483       
     484        edit_cut = new JMenuItem(Dictionary.get("Menu.Edit_Cut"));
    475485        edit_cut.addActionListener(this);
    476         edit_cut.setMnemonic(KeyEvent.VK_X);
    477         Dictionary.registerText(edit_cut, "Menu.Edit_Cut");
    478 
    479         edit_copy = new JMenuItem();
     486       
     487        edit_copy = new JMenuItem(Dictionary.get("Menu.Edit_Copy"));
    480488        edit_copy.addActionListener(this);
    481         edit_copy.setMnemonic(KeyEvent.VK_C);
    482         Dictionary.registerText(edit_copy, "Menu.Edit_Copy");
    483 
    484         edit_paste = new JMenuItem();
     489       
     490        edit_paste = new JMenuItem(Dictionary.get("Menu.Edit_Paste"));
    485491        edit_paste.addActionListener(this);
    486         edit_paste.setMnemonic(KeyEvent.VK_V);
    487         Dictionary.registerText(edit_paste, "Menu.Edit_Paste");
    488 
     492       
    489493        // Layout (edit menu)
    490494        edit.add(edit_cut);
     
    778782        target.setOpaque(false);
    779783
    780         JLabel name_label = new JLabel();
     784        JLabel name_label = new JLabel(Dictionary.get("GEMS.Name"));
    781785        name_label.setOpaque(false);
    782         Dictionary.setText(name_label, "GEMS.Name");
    783786        name = new GComboBox();
    784787        name.setEditable(true);
    785         Dictionary.setTooltip(name, "GEMS.Attribute_Name_Tooltip");
    786 
    787         JLabel language_label = new JLabel();
     788        name.setToolTipText(Dictionary.get("GEMS.Attribute_Name_Tooltip"));
     789       
     790        JLabel language_label = new JLabel(Dictionary.get("GEMS.Language"));
    788791        language_label.setOpaque(false);
    789         Dictionary.setText(language_label, "GEMS.Language");
    790792        language_box = new JComboBox();
    791            
     793            language_box.setToolTipText(Dictionary.get("GEMS.Attribute_Language_Tooltip"));
    792794            for(int n = 0; n < attributeLists.size(); n++){
    793795                name.add(attributeLists.get(n));
    794796            }
    795797 
    796         Dictionary.setTooltip(language_box, "GEMS.Attribute_Language_Tooltip");
    797 
    798798        JPanel center_pane = new JPanel();
    799799        center_pane.setOpaque(false);
     
    806806        v_text_area.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    807807        v_text_area.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    808         Dictionary.setTooltip(v_text_area, "GEMS.Attribute_Value_Tooltip");
    809 
     808        v_text_area.setToolTipText(Dictionary.get("GEMS.Attribute_Value_Tooltip"));
     809       
    810810        JPanel button_pane = new JPanel();
    811811        button_pane.setOpaque(false);
    812         ok_button = new GLIButton();
    813         ok_button.setMnemonic(KeyEvent.VK_O);
     812        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    814813        getRootPane().setDefaultButton(ok_button);
    815         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    816         cancel_button = new GLIButton();
    817         cancel_button.setMnemonic(KeyEvent.VK_C);
    818         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    819 
     814        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     815       
    820816        // Connection
    821817        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
     
    899895        {
    900896            target.setText(current_element.getName());
    901             Dictionary.setText(target_label, "GEMS.Target");
     897            target_label.setText(Dictionary.get("GEMS.Target"));
    902898        }
    903899        else if(current_set != null)
    904900        {
    905             Dictionary.setText(target_label, "GEMS.Set");
    906901            target.setText(current_set.toString());
    907             Dictionary.setText(target_label, "GEMS.Target");
     902            target_label.setText(Dictionary.get("GEMS.Set"));
    908903        }
    909904       
     
    960955        else if (source == popupListener.menuAddAttributeAttribute || source == popupListener.menuAddAttributeSet || source == popupListener.menuAddAttributeElement){
    961956
    962         Dictionary.setText(this, "GEMS.Add_Attribute");
    963957        for(int i = 0; i < attributeLists.size(); i++) {
    964958            name.add(attributeLists.get(i).toString());   
     
    966960        }
    967961        name.setEnabled(true);
     962        setTitle(Dictionary.get("GEMS.Add_Attribute"));
    968963        setVisible(true);
    969964            }
     
    10341029       //System.err.println("just entered editAttribute"); //debug
    10351030       AttributeTableModel model = null;
    1036        Dictionary.setText(this, "GEMS.Edit_Attribute");
     1031       setTitle(Dictionary.get("GEMS.Edit_Attribute"));
    10371032       
    10381033       switch(current_attribute_type) {
     
    11731168
    11741169    public AddSubelementActionListener() {
    1175         Dictionary.setText(this, "GEMS.Add_Subelement");
    1176         Dictionary.setTooltip(name_field, "GEMS.Subelement_Name_Tooltip");
     1170        setTitle(Dictionary.get("GEMS.Add_Subelement"));
     1171        name_field.setToolTipText(Dictionary.get("GEMS.Subelement_Name_Tooltip"));
    11771172    }
    11781173
     
    12561251        setModal(true);
    12571252        setSize(ADD_ELEMENT_SIZE);
     1253        setTitle(Dictionary.get("GEMS.Add_Element"));
    12581254        // Creation
    12591255        JPanel content_pane = (JPanel) getContentPane();
     
    12611257        JPanel center_pane = new JPanel();
    12621258        center_pane.setOpaque(false);
    1263         Dictionary.setText(this, "GEMS.Add_Element");
    1264 
     1259       
    12651260        JPanel labels_pane = new JPanel();
    12661261        labels_pane.setOpaque(false);
    1267         JLabel set_label = new JLabel();
     1262        JLabel set_label = new JLabel(Dictionary.get("GEMS.Set"));
    12681263        set_label.setOpaque(false);
    1269         Dictionary.setText(set_label, "GEMS.Set");
    12701264        set_field = new JLabel();
    12711265        set_field.setOpaque(false);
     
    12731267        JPanel values_pane = new JPanel();
    12741268        values_pane.setOpaque(false);
    1275         JLabel name_label = new JLabel();
     1269        JLabel name_label = new JLabel(Dictionary.get("GEMS.Name"));
    12761270        name_label.setOpaque(false);
    1277         Dictionary.setText(name_label, "GEMS.Name");
    12781271        name_field = new NonWhitespaceField();
    12791272        name_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    12811274        name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    12821275        name_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    1283         Dictionary.setTooltip(name_field, "GEMS.Element_Name_Tooltip");
    1284 
     1276        name_field.setToolTipText(Dictionary.get("GEMS.Element_Name_Tooltip"));
     1277       
    12851278        JPanel button_pane = new JPanel();
    12861279        button_pane.setOpaque(false);
    12871280
    1288         ok_button = new GLIButton();
    1289         ok_button.setMnemonic(KeyEvent.VK_O);
     1281        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    12901282        getRootPane().setDefaultButton(ok_button);
    1291         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1292         cancel_button = new GLIButton();
    1293         cancel_button.setMnemonic(KeyEvent.VK_C);
    1294         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    1295 
     1283        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     1284       
    12961285        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
    12971286
     
    14141403        setModal(true);
    14151404        setSize(ADD_SET_SIZE);
    1416         Dictionary.setText(this, "GEMS.Add_Set");
    1417 
     1405        setTitle(Dictionary.get("GEMS.Add_Set"));
     1406       
    14181407        // Creation
    14191408        JPanel content_pane = (JPanel) getContentPane();
     
    14251414        JPanel boxes_pane = new JPanel();
    14261415
    1427         JLabel namespace_label = new JLabel();
     1416        JLabel namespace_label = new JLabel(Dictionary.get("GEMS.Namespace"));
    14281417        namespace_label.setOpaque(false);
    1429         Dictionary.setText(namespace_label, "GEMS.Namespace");
    14301418        namespace_field = TransformCharacterTextField.createNamespaceTextField();
    14311419        namespace_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    14331421        namespace_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    14341422        namespace_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    1435         Dictionary.setTooltip(namespace_field, "GEMS.Set_Namespace_Tooltip");
    1436 
    1437         JLabel name_label = new JLabel();
     1423        namespace_field.setToolTipText(Dictionary.get("GEMS.Set_Namespace_Tooltip"));
     1424       
     1425        JLabel name_label = new JLabel(Dictionary.get("GEMS.Name"));
    14381426        name_label.setOpaque(false);
    1439         Dictionary.setText(name_label, "GEMS.Name");
    14401427        name_field = new JTextField();
    14411428        name_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    14431430        name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    14441431        name_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    1445         Dictionary.setTooltip(name_field, "GEMS.Set_Name_Tooltip");
     1432        name_field.setToolTipText(Dictionary.get("GEMS.Set_Name_Tooltip"));
    14461433
    14471434        JPanel button_pane = new JPanel();
    14481435        button_pane.setOpaque(false);
    14491436
    1450         ok_button = new GLIButton();
    1451         ok_button.setMnemonic(KeyEvent.VK_O);
     1437        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    14521438        getRootPane().setDefaultButton(ok_button);
    1453         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1454         cancel_button = new GLIButton();
    1455         cancel_button.setMnemonic(KeyEvent.VK_C);
    1456         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
     1439        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     1440       
    14571441        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
    14581442
     
    14711455        boxes_pane.add(namespace_field);
    14721456           
    1473             JLabel inheritJLabel = new JLabel();
    1474             Dictionary.setText(inheritJLabel, "GEMS.inheritMetadataSet");
    1475        
     1457            JLabel inheritJLabel = new JLabel(Dictionary.get("GEMS.inheritMetadataSet"));
     1458                   
    14761459            label_pane.add(inheritJLabel);
    14771460       
     
    14871470            //add sets to existingSetJComboBox
    14881471           
    1489             JLabel dummyl = new JLabel();
    1490             Dictionary.setText(dummyl, "GEMS.Add_Set.No_Inherit");
    1491            
     1472            JLabel dummyl = new JLabel(Dictionary.get("GEMS.Add_Set.No_Inherit"));
     1473                       
    14921474        existingSetJComboBox.addItem(DO_NOT_INHERIT);
    14931475            existingSetJComboBox.setSelectedIndex(getSetsLen);
     
    16361618        setModal(true);
    16371619        setSize(OPEN_SETS_SIZE);
    1638         Dictionary.setText(this, "GEMS.Open_Set");
    1639 
     1620        setTitle(Dictionary.get("GEMS.Open_Set"));
     1621       
    16401622        // Creation
    16411623        JPanel content_pane = (JPanel) getContentPane();
     
    16491631        button_pane.setOpaque(false);
    16501632
    1651         ok_button = new GLIButton();
    1652         ok_button.setMnemonic(KeyEvent.VK_O);
     1633        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    16531634        getRootPane().setDefaultButton(ok_button);
    1654         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1655         cancel_button = new GLIButton();
    1656         cancel_button.setMnemonic(KeyEvent.VK_C);
    1657         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    1658 
     1635        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     1636       
    16591637        // Connection
    16601638        cancel_button.addActionListener(this);
     
    16641642            boxes_pane.setLayout(new GridLayout(4,1));
    16651643
    1666             JLabel inheritJLabel = new JLabel();
    1667             Dictionary.setText(inheritJLabel, "GEMS.inheritMetadataSet");
    1668        
     1644            JLabel inheritJLabel = new JLabel(Dictionary.get("GEMS.inheritMetadataSet"));
     1645                   
    16691646            File[] col_dir = new File(Configuration.gsdl_path + File.separator + "collect").listFiles();
    16701647           
     
    16721649               
    16731650            for(int k = 0; k < col_dir.length; k++){
    1674                   if(col_dir[k].isDirectory() && col_dir[k].getName().compareTo("CVS") != 0) {
     1651        if(col_dir[k].isDirectory() && col_dir[k].getName().compareTo("CVS") != 0) {
    16751652                   
    1676                        File metadir = new File(col_dir[k].toString() + File.separator + "metadata");
     1653            File metadir = new File(col_dir[k].toString() + File.separator + "metadata");
    16771654                    if(metadir.exists())   
    16781655                        existingSetJComboBox.addItem(new String(col_dir[k].getName() + " Collection Sets                                                                                                     #% " + col_dir[k].toString() + File.separator + "metadata"));
    16791656                 
    1680                   }
     1657        }
    16811658               
    16821659            }
     
    16841661           
    16851662            existingSetJComboBox.setSelectedIndex(0);
    1686             JLabel dummyl = new JLabel();
    1687             Dictionary.setText(dummyl, "GEMS.Add_Set.No_Inherit");
    1688            
     1663            JLabel dummyl = new JLabel(Dictionary.get("GEMS.Add_Set.No_Inherit"));
     1664       
    16891665            boxes_pane.add(new JLabel("Select which group of metadata sets you wish to edit:\n\n\n\n"));
    16901666            boxes_pane.add(new JLabel("\n"));
     
    18751851        setModal(true);
    18761852        setSize(RENAME_SET_SIZE);
    1877         Dictionary.setText(this, "GEMS.Rename_Set");
    1878 
     1853        setTitle(Dictionary.get("GEMS.Rename_Set"));
     1854       
    18791855        // Creation
    18801856        JPanel content_pane = (JPanel) getContentPane();
     
    18861862        JPanel boxes_pane = new JPanel();
    18871863
    1888         JLabel namespace_label = new JLabel();
     1864        JLabel namespace_label = new JLabel(Dictionary.get("GEMS.Namespace"));
    18891865        namespace_label.setOpaque(false);
    1890         Dictionary.setText(namespace_label, "GEMS.Namespace");
    18911866        namespace_field = TransformCharacterTextField.createNamespaceTextField();
    18921867        namespace_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    18941869        namespace_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    18951870        namespace_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    1896         Dictionary.setTooltip(namespace_field, "GEMS.Rename_Namespace_Tooltip");
    1897 
    1898         JLabel name_label = new JLabel();
     1871        namespace_field.setToolTipText(Dictionary.get("GEMS.Rename_Namespace_Tooltip"));
     1872       
     1873        JLabel name_label = new JLabel(Dictionary.get("GEMS.Name"));
    18991874        name_label.setOpaque(false);
    1900         Dictionary.setText(name_label, "GEMS.Name");
    19011875        name_field = new JTextField();
    19021876        name_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    19041878        name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    19051879        name_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    1906         Dictionary.setTooltip(name_field, "GEMS.Rename_Name_Tooltip");
    1907 
     1880        name_field.setToolTipText(Dictionary.get("GEMS.Rename_Name_Tooltip"));
     1881       
    19081882        JPanel button_pane = new JPanel();
    19091883        button_pane.setOpaque(false);
    19101884
    1911         ok_button = new GLIButton();
    1912         ok_button.setMnemonic(KeyEvent.VK_O);
     1885        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    19131886        getRootPane().setDefaultButton(ok_button);
    1914         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1915         cancel_button = new GLIButton();
    1916         cancel_button.setMnemonic(KeyEvent.VK_C);
    1917         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
     1887        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     1888       
    19181889        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
    19191890
     
    20452016        setModal(true);
    20462017        setSize(RENAME_ELEMENT_SIZE);
     2018        setTitle(Dictionary.get("GEMS.Rename_Element"));
     2019       
    20472020        // Creation
    20482021        JPanel content_pane = (JPanel) getContentPane();
     
    20562029        JPanel values_pane = new JPanel();
    20572030        values_pane.setOpaque(false);
    2058         JLabel name_label = new JLabel();
     2031        JLabel name_label = new JLabel(Dictionary.get("GEMS.New_Name"));
    20592032        name_label.setOpaque(false);
    2060         Dictionary.setText(name_label, "GEMS.New_Name");
     2033       
    20612034        name_field = new NonWhitespaceField();
    20622035        name_field.setBackground(config.getColor("coloring.collection_tree_background", false));
     
    20642037        name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false));
    20652038        name_field.setSelectedTextColor(config.getColor("coloring.collection_selection_foreground", false));
    2066         Dictionary.setTooltip(name_field, "GEMS.Rename_Element_Tooltip");
    2067 
     2039        name_field.setToolTipText(Dictionary.get("GEMS.Rename_Element_Tooltip"));
     2040       
    20682041        JPanel button_pane = new JPanel();
    20692042        button_pane.setOpaque(false);
    20702043
    2071         ok_button = new GLIButton();
    2072         ok_button.setMnemonic(KeyEvent.VK_O);
     2044        ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    20732045        getRootPane().setDefaultButton(ok_button);
    2074         Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    2075         cancel_button = new GLIButton();
    2076         cancel_button.setMnemonic(KeyEvent.VK_C);
    2077         Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    2078 
     2046        cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     2047       
    20792048        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
    20802049
    2081         Dictionary.setText(this, "GEMS.Rename_Element");
    2082        
    20832050        // Connection
    20842051        cancel_button.addActionListener(this);
     
    24622429       
    24632430        //Create the menu items
    2464         menuAddAttributeSet = new JMenuItem();
    2465         Dictionary.setBoth(menuAddAttributeSet, "GEMS.Add_Attribute", "GEMS.Add_Attribute_Tooltip");
    2466         menuAddElement =new JMenuItem();
    2467         Dictionary.setBoth(menuAddElement,"GEMS.Add_Element","GEMS.Add_Element_Tooltip");
    2468         menuRenameSet = new JMenuItem();
    2469         Dictionary.setBoth(menuRenameSet,"GEMS.Rename_Set", "GEMS.Rename_Set_Tooltip");
    2470             menuRemoveSet = new JMenuItem();
    2471         Dictionary.setBoth(menuRemoveSet, "GEMS.Remove_Set","GEMS.Remove_Set_Tooltip");
    2472            
    2473             menuAddAttributeElement=new JMenuItem();
    2474             Dictionary.setBoth(menuAddAttributeElement,"GEMS.Add_Attribute", "GEMS.Add_Attribute_Tooltip");
    2475         menuAddSubelement=new JMenuItem();
    2476             Dictionary.setBoth(menuAddSubelement,"GEMS.Add_Subelement", "GEMS.Add_Subelement_Tooltip");
    2477             menuRenameElement=new JMenuItem();
    2478             Dictionary.setBoth(menuRenameElement,"GEMS.Rename_Element", "GEMS.Rename_Element_Tooltip");
    2479             menuDeleteElement=new JMenuItem();
    2480         Dictionary.setBoth(menuDeleteElement,"GEMS.Remove_Element", "GEMS.Remove_Element_Tooltip" );
    2481 
    2482         menuAddAttributeAttribute=new JMenuItem();
    2483         Dictionary.setBoth(menuAddAttributeAttribute,"GEMS.Add_Attribute", "GEMS.Add_Attribute_Tooltip");
    2484             menuEditValue=new JMenuItem();
    2485             Dictionary.setBoth(menuEditValue,"GEMS.Edit_Value", "GEMS.Edit_Value_Tooltip");
    2486             menuDeleteAttribute=new JMenuItem();
    2487         Dictionary.setBoth(menuDeleteAttribute,"GEMS.Remove_Attribute", "GEMS.Remove_Attribute_Tooltip");
    2488             
     2431        menuAddAttributeSet = new JMenuItem(Dictionary.get("GEMS.Add_Attribute"));
     2432        menuAddAttributeSet.setToolTipText(Dictionary.get("GEMS.Add_Attribute_Tooltip"));
     2433        menuAddElement =new JMenuItem(Dictionary.get("GEMS.Add_Element"));
     2434        menuAddElement.setToolTipText(Dictionary.get("GEMS.Add_Element_Tooltip"));
     2435        menuRenameSet = new JMenuItem(Dictionary.get("GEMS.Rename_Set"));
     2436        menuRenameSet.setToolTipText(Dictionary.get("GEMS.Rename_Set_Tooltip"));
     2437            menuRemoveSet = new JMenuItem(Dictionary.get("GEMS.Remove_Set"));
     2438menuRemoveSet.setToolTipText(Dictionary.get("GEMS.Remove_Set_Tooltip"));
     2439
     2440            menuAddAttributeElement=new JMenuItem(Dictionary.get("GEMS.Add_Attribute"));
     2441        menuAddAttributeElement.setToolTipText(Dictionary.get("GEMS.Add_Attribute_Tooltip"));
     2442        menuAddSubelement=new JMenuItem(Dictionary.get("GEMS.Add_Subelement"));
     2443        menuAddSubelement.setToolTipText(Dictionary.get("GEMS.Add_Subelement_Tooltip"));
     2444        menuRenameElement=new JMenuItem(Dictionary.get("GEMS.Rename_Element"));
     2445        menuRenameElement.setToolTipText(Dictionary.get("GEMS.Rename_Element_Tooltip"));
     2446        menuDeleteElement=new JMenuItem(Dictionary.get("GEMS.Remove_Element"));
     2447        menuDeleteElement.setToolTipText(Dictionary.get("GEMS.Remove_Element_Tooltip"));
     2448       
     2449        menuAddAttributeAttribute=new JMenuItem(Dictionary.get("GEMS.Add_Attribute"));
     2450        menuAddAttributeAttribute.setToolTipText(Dictionary.get("GEMS.Add_Attribute_Tooltip"));
     2451            menuEditValue=new JMenuItem(Dictionary.get("GEMS.Edit_Value"));
     2452        menuEditValue.setToolTipText(Dictionary.get("GEMS.Edit_Value_Tooltip"));
     2453        menuDeleteAttribute=new JMenuItem(Dictionary.get("GEMS.Remove_Attribute"));
     2454        menuDeleteAttribute.setToolTipText(Dictionary.get("GEMS.Remove_Attribute_Tooltip"));
     2455       
    24892456        //Associate the menu items with the appropriate popups:
    24902457        setPopup.add(menuAddAttributeSet);
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMSPreferences.java

    r10462 r12115  
    6767    this.self = this;
    6868    setSize(SIZE);
    69     Dictionary.registerText(this, "Preferences");
     69    setTitle(Dictionary.get("Preferences"));
    7070    setJMenuBar(new SimpleMenuBar("preferences"));
    7171
     
    7474    tab_pane = new JTabbedPane();
    7575    JPanel general_preferences = createGeneralPreferences();
    76     tab_pane.add("Preferences.General", general_preferences);
    77        
    78     Dictionary.register(tab_pane);
    79 
     76    tab_pane.addTab(Dictionary.get("Preferences.General"), null, general_preferences, Dictionary.get("Preferences.General_Tooltip"));
     77       
    8078    JPanel button_pane = new JPanel();
    81     ok_button = new GLIButton();
    82     ok_button.setMnemonic(KeyEvent.VK_O);
    83    
    84     Dictionary.registerBoth(ok_button, "General.OK", "General.OK_Tooltip");
    85     apply_button = new GLIButton();
    86     apply_button.setMnemonic(KeyEvent.VK_A);
    87     Dictionary.registerBoth(apply_button, "General.Apply", "General.Apply_Tooltip");
    88     cancel_button = new GLIButton();
    89     cancel_button.setMnemonic(KeyEvent.VK_C);
    90     Dictionary.registerBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip");
    91 
     79    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
     80    apply_button = new GLIButton(Dictionary.get("General.Apply"), Dictionary.get("General.Apply_Tooltip"));
     81    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Cancel_Tooltip"));
     82   
    9283    // Connection
    9384    ok_button.addActionListener(new OKButtonListener(true));
     
    148139    // Users email
    149140    JPanel lang_limited_pane = new JPanel();
    150     interface_language_label = new JLabel();
     141    interface_language_label = new JLabel(Dictionary.get("GEMS.Preferences.Selected_Languages_Tooltip"));
    151142    interface_language_label.setPreferredSize(LABEL_SIZE);
    152143       
    153     Dictionary.registerText(interface_language_label, "GEMS.Preferences.Selected_Languages_Tooltip");
    154 
    155144    // Language
    156145    JPanel language_pane = new JPanel();
    157     language_label = new JLabel();
     146    language_label = new JLabel(Dictionary.get("Preferences.General.Interface_Language"));
    158147    language_label.setPreferredSize(LABEL_SIZE);
    159148   
    160     Dictionary.registerText(language_label, "Preferences.General.Interface_Language");
    161149    language_combobox = new JComboBox(dictionary_model.toArray());
    162     Dictionary.registerTooltip(language_combobox, "Preferences.General.Interface_Language_Tooltip");
     150    language_combobox.setToolTipText(Dictionary.get("Preferences.General.Interface_Language_Tooltip"));
     151   
    163152    // Try to locate and select the current language
    164153    String language_code = Configuration.getLanguage();
  • trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java

    r9367 r12115  
    111111    setJMenuBar(new SimpleMenuBar("reviewingmetadata"));
    112112    setSize(SIZE);
    113     Dictionary.setText(this, "Autofilter.Title");
    114 
     113    setTitle(Dictionary.get("Autofilter.Title"));
     114   
    115115    // Creation
    116116    JPanel content_pane = (JPanel) getContentPane();
    117117    JPanel name_pane = new JPanel();
    118     JLabel name_label = new JLabel();
    119     Dictionary.setText(name_label, "Autofilter.Name");
     118    JLabel name_label = new JLabel(Dictionary.get("Autofilter.Name"));
    120119    JTextField name_template = new JTextField();
    121120    name = new JLabel();
     
    124123    JPanel value_pane = new JPanel();
    125124    JPanel inner_value_pane = new JPanel();
    126     JLabel value_label = new JLabel();
    127     Dictionary.setText(value_label, "Autofilter.eqeq");
     125    JLabel value_label = new JLabel(Dictionary.get("Autofilter.eqeq"));
    128126    value = new JComboBox();
    129127    value.setEditable(false);
     
    136134    first_value.addItem("");
    137135    first_value.setSelectedItem("");
    138     first_case = new JCheckBox();
    139     Dictionary.setText(first_case, "Autofilter.Case_Sensitive");
     136    first_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive"));
    140137    JPanel operator_pane = new JPanel();
    141     JLabel operator_label = new JLabel();
    142     Dictionary.setText(operator_label, "Autofilter.Operator");
     138    JLabel operator_label = new JLabel(Dictionary.get("Autofilter.Operator"));
    143139    ButtonGroup operator_group = new ButtonGroup();
    144     and_radiobutton = new JRadioButton();
     140    and_radiobutton = new JRadioButton(Dictionary.get("Autofilter.AND"));
    145141    and_radiobutton.setOpaque(false);
    146     Dictionary.setText(and_radiobutton, "Autofilter.AND");
    147     none_radiobutton = new JRadioButton();
     142    none_radiobutton = new JRadioButton(Dictionary.get("Autofilter.None"));
    148143    none_radiobutton.setOpaque(false);
    149144    none_radiobutton.setSelected(true);
    150     Dictionary.setText(none_radiobutton, "Autofilter.None");
    151     or_radiobutton = new JRadioButton();
     145    or_radiobutton = new JRadioButton(Dictionary.get("Autofilter.OR"));
    152146    or_radiobutton.setOpaque(false);
    153     Dictionary.setText(or_radiobutton, "Autofilter.OR");
    154147    operator_group.add(none_radiobutton);
    155148    operator_group.add(and_radiobutton);
     
    164157    second_value.addItem("");
    165158    second_value.setSelectedItem("");
    166     second_case = new JCheckBox();
    167     Dictionary.setText(second_case, "Autofilter.Case_Sensitive");
     159    second_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive"));
    168160    JPanel lower_pane = new JPanel();
    169161    JPanel order_pane = new JPanel();
    170     Dictionary.setTooltip(order_pane, "Autofilter.Order_Tooltip");
    171     JLabel order_label = new JLabel();
    172     Dictionary.setText(order_label, "Autofilter.Order");
    173 
     162    order_pane.setToolTipText(Dictionary.get("Autofilter.Order_Tooltip"));
     163    JLabel order_label = new JLabel(Dictionary.get("Autofilter.Order"));
     164   
    174165    ButtonGroup order_group = new ButtonGroup();
    175     ascending_radiobutton = new JRadioButton();
     166    ascending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Ascending"));
    176167    ascending_radiobutton.setOpaque(false);
    177168    ascending_radiobutton.setSelected(true);
    178     Dictionary.setText(ascending_radiobutton, "Autofilter.Ascending");
    179     descending_radiobutton = new JRadioButton();
     169    descending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Descending"));
    180170    descending_radiobutton.setOpaque(false);
    181     Dictionary.setText(descending_radiobutton, "Autofilter.Descending");
    182171    order_group.add(ascending_radiobutton);
    183172    order_group.add(descending_radiobutton);
     
    189178    }
    190179    JPanel button_pane = new JPanel();
    191     cancel_button = new GLIButton();
    192     cancel_button.setMnemonic(KeyEvent.VK_C);
    193     Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    194     remove_button = new GLIButton();
    195     remove_button.setMnemonic(KeyEvent.VK_R);
    196     Dictionary.setBoth(remove_button, "Autofilter.Remove", "Autofilter.Remove_Tooltip");
    197     set_button = new GLIButton();
    198     set_button.setMnemonic(KeyEvent.VK_S);
    199     Dictionary.setBoth(set_button, "Autofilter.Set", "Autofilter.Set_Tooltip");
    200 
     180    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     181    remove_button = new GLIButton(Dictionary.get("Autofilter.Remove"), Dictionary.get("Autofilter.Remove_Tooltip"));
     182    set_button = new GLIButton(Dictionary.get("Autofilter.Set"), Dictionary.get("Autofilter.Set_Tooltip"));
     183   
    201184    // Connection
    202185    and_radiobutton.addActionListener(new CheckListener(true));
  • trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java

    r11629 r12115  
    111111    setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
    112112    setSize(SIZE);
     113    setTitle(Dictionary.get("MetaAudit.Title"));
    113114    setJMenuBar(new SimpleMenuBar("reviewingmetadata"));
    114     Dictionary.registerText(this, "MetaAudit.Title");
     115   
    115116    JPanel content_pane = (JPanel) getContentPane();
    116117    JPanel button_pane = new JPanel();
    117118
    118     JButton close_button = new GLIButton();
    119     close_button.setMnemonic(KeyEvent.VK_C);
    120     Dictionary.registerBoth(close_button, "MetaAudit.Close", "MetaAudit.Close_Tooltip");
    121 
     119    JButton close_button = new GLIButton(Dictionary.get("MetaAudit.Close"), Dictionary.get("MetaAudit.Close_Tooltip"));
     120   
    122121    // Connection
    123122    close_button.addActionListener(new CloseListener());
Note: See TracChangeset for help on using the changeset viewer.