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

    r12089 r12123  
    315315        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Formats", "formatstatements");
    316316
    317         JLabel format_label = new JLabel();
    318         Dictionary.registerText(format_label, "CDM.FormatManager.Assigned_Formats");
     317        JLabel format_label = new JLabel(Dictionary.get("CDM.FormatManager.Assigned_Formats"));
    319318        format_list = new JList(model);
    320319
    321320        selection_pane = new JPanel();
    322321        JPanel feature_pane = new JPanel();
    323         JLabel feature_label = new JLabel();
    324         Dictionary.registerText(feature_label, "CDM.FormatManager.Feature");
     322        JLabel feature_label = new JLabel(Dictionary.get("CDM.FormatManager.Feature"));
     323
    325324        feature_combobox = new JComboBox(feature_model.toArray());
    326325        feature_combobox.setPreferredSize(FIELD_SIZE);
    327326        feature_combobox.setEditable(false);
    328         Dictionary.registerTooltip(feature_combobox, "CDM.FormatManager.Feature_Tooltip");
    329 
     327        feature_combobox.setToolTipText(Dictionary.get("CDM.FormatManager.Feature_Tooltip"));
     328       
    330329        part_pane = new JPanel();
    331         JLabel part_label = new JLabel();
    332         Dictionary.registerText(part_label, "CDM.FormatManager.Part");
    333 
     330        JLabel part_label = new JLabel(Dictionary.get("CDM.FormatManager.Part"));
    334331        part_combobox = new JComboBox(part_model.toArray());
    335332        part_combobox.setPreferredSize(FIELD_SIZE);
    336333        part_combobox.setEditable(false);
    337         Dictionary.registerTooltip(part_combobox, "CDM.FormatManager.Part_Tooltip");
    338 
     334        part_combobox.setToolTipText(Dictionary.get("CDM.FormatManager.Part_Tooltip"));
     335       
    339336        blank_pane = new JPanel();
    340337       
     
    348345        JPanel editor_pane = new JPanel();
    349346        JPanel editor_header_pane = new JPanel();
    350         JLabel editor_label = new JLabel();
    351         Dictionary.registerText(editor_label, "CDM.FormatManager.Editor");
    352 
     347        JLabel editor_label = new JLabel(Dictionary.get("CDM.FormatManager.Editor"));
     348       
    353349        editor_textarea = new JTextArea();
    354350        editor_textarea.setBackground(Configuration.getColor("coloring.editable_background", false));
     
    357353        editor_textarea.setRows(6);
    358354        editor_textarea.setWrapStyleWord(false);
    359         Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Add_Tooltip");
    360 
     355        editor_textarea.setToolTipText(Dictionary.get("CDM.FormatManager.Add_Tooltip"));
     356       
    361357        JPanel variable_pane = new JPanel();
    362         JLabel variable_label = new JLabel();
    363         Dictionary.registerText(variable_label, "CDM.FormatManager.Variable");
     358        JLabel variable_label = new JLabel(Dictionary.get("CDM.FormatManager.Variable"));
     359       
    364360        variable_combobox = new JComboBox(variable_model.toArray());
    365         Dictionary.registerTooltip(variable_combobox, "CDM.FormatManager.Variable_Tooltip");
    366 
    367         insert_button = new GLIButton();
    368         insert_button.setMnemonic(KeyEvent.VK_I);
    369         Dictionary.registerBoth(insert_button, "CDM.FormatManager.Insert", "CDM.FormatManager.Insert_Tooltip");
    370      
    371             default_button = new GLIButton();
    372         default_button.setMnemonic(KeyEvent.VK_D);
    373         Dictionary.registerBoth(default_button, "CDM.FormatManager.Default", "CDM.FormatManager.Default_Tooltip");
    374      
     361        variable_combobox.setToolTipText(Dictionary.get("CDM.FormatManager.Variable_Tooltip"));
     362       
     363        insert_button = new GLIButton(Dictionary.get("CDM.FormatManager.Insert"), Dictionary.get("CDM.FormatManager.Insert_Tooltip"));
     364             
     365            default_button = new GLIButton(Dictionary.get("CDM.FormatManager.Default"), Dictionary.get("CDM.FormatManager.Default_Tooltip"));
     366             
    375367        JPanel flag_pane = new JPanel();
    376         enabled_checkbox = new JCheckBox();
    377         Dictionary.registerText(enabled_checkbox, "CDM.FormatManager.Enabled");
    378 
     368        enabled_checkbox = new JCheckBox(Dictionary.get("CDM.FormatManager.Enabled"));
     369       
    379370        JPanel button_pane = new JPanel();
    380         add_button = new GLIButton();
     371        add_button = new GLIButton(Dictionary.get("CDM.FormatManager.Add"), Dictionary.get("CDM.FormatManager.Add_Tooltip"));
    381372        add_button.setEnabled(false);
    382         add_button.setMnemonic(KeyEvent.VK_A);
    383         Dictionary.registerBoth(add_button, "CDM.FormatManager.Add", "CDM.FormatManager.Add_Tooltip");
    384 
    385        
    386         remove_button = new GLIButton();
     373               
     374        remove_button = new GLIButton(Dictionary.get("CDM.FormatManager.Remove"), Dictionary.get("CDM.FormatManager.Remove_Tooltip"));
    387375        remove_button.setEnabled(false);
    388         remove_button.setMnemonic(KeyEvent.VK_R);
    389         Dictionary.registerBoth(remove_button, "CDM.FormatManager.Remove", "CDM.FormatManager.Remove_Tooltip");
    390 
    391             undo_button = new GLIButton();
     376       
     377            undo_button = new GLIButton(Dictionary.get("CDM.FormatManager.Undo"), Dictionary.get("CDM.FormatManager.Undo_Tooltip"));
    392378        undo_button.setEnabled(false);
    393         undo_button.setMnemonic(KeyEvent.VK_U);
    394         Dictionary.registerBoth(undo_button, "CDM.FormatManager.Undo", "CDM.FormatManager.Undo_Tooltip");
    395 
    396             redo_button = new GLIButton();
     379       
     380            redo_button = new GLIButton(Dictionary.get("CDM.FormatManager.Redo"), Dictionary.get("CDM.FormatManager.Redo_Tooltip"));
    397381        redo_button.setEnabled(false);
    398         redo_button.setMnemonic(KeyEvent.VK_O);
    399         Dictionary.registerBoth(redo_button, "CDM.FormatManager.Redo", "CDM.FormatManager.Redo_Tooltip");
    400 
    401 
     382       
    402383        // Connect
    403384        add_button.addActionListener(new AddListener());
     
    833814        editor_textarea.setEditable(false);
    834815        editor_textarea.setBackground(Color.lightGray);
    835         Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Editor_Disabled_Tooltip");
    836 
     816        editor_textarea.setToolTipText(Dictionary.get("CDM.FormatManager.Editor_Disabled_Tooltip"));
     817       
    837818        enabled_checkbox.setEnabled(false);
    838819            undo_button.setEnabled(false);
     
    848829        editor_textarea.setEditable(true);
    849830        editor_textarea.setBackground(Color.white);
    850         Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Editor_Tooltip");
     831        editor_textarea.setToolTipText(Dictionary.get("CDM.FormatManager.Editor_Tooltip"));
    851832        enabled_checkbox.setEnabled(true);
    852833            variable_combobox.setEnabled(true); 
Note: See TracChangeset for help on using the changeset viewer.