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

    r12072 r12123  
    537537        Collections.sort(library);
    538538        // Create
    539         add = new GLIButton();
    540         add.setMnemonic(KeyEvent.VK_A);
    541         Dictionary.registerBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip");
     539        add = new GLIButton(Dictionary.get("CDM.ClassifierManager.Add"), Dictionary.get("CDM.ClassifierManager.Add_Tooltip"));
     540       
    542541        JPanel button_pane = new JPanel();
    543542        JPanel central_pane = new JPanel();
    544         configure = new GLIButton();
     543       
     544configure = new GLIButton(Dictionary.get("CDM.ClassifierManager.Configure"), Dictionary.get("CDM.ClassifierManager.Configure_Tooltip"));
    545545        configure.setEnabled(false);
    546         configure.setMnemonic(KeyEvent.VK_C);
    547         Dictionary.registerBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip");
     546       
    548547        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Classifiers", "classifiers");
    549548
     
    560559        }
    561560
    562         JLabel classifier_label = new JLabel();
    563         Dictionary.registerText(classifier_label, "CDM.ClassifierManager.Classifier");
     561        JLabel classifier_label = new JLabel(Dictionary.get("CDM.ClassifierManager.Classifier"));
     562       
    564563        classifier_list = new JList(model);
    565564        classifier_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    566         JLabel classifier_list_label = new JLabel();
    567         //      classifier_list_label.setHorizontalAlignment(JLabel.CENTER);
     565        JLabel classifier_list_label = new JLabel(Dictionary.get("CDM.ClassifierManager.Assigned"));
     566       
    568567        classifier_list_label.setOpaque(true);
    569         Dictionary.registerText(classifier_list_label, "CDM.ClassifierManager.Assigned");
     568       
    570569        JPanel classifier_list_pane = new JPanel();
    571570        JPanel classifier_pane = new JPanel();
    572         remove = new GLIButton();
     571        remove = new GLIButton(Dictionary.get("CDM.ClassifierManager.Remove"), Dictionary.get("CDM.ClassifierManager.Remove_Tooltip"));
    573572        remove.setEnabled(false);
    574         remove.setMnemonic(KeyEvent.VK_R);
    575         Dictionary.registerBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip");
    576 
     573       
    577574        JPanel temp = new JPanel(new BorderLayout());
    578575
    579576        JPanel move_button_pane = new JPanel();
    580577
    581         move_up_button = new GLIButton("", JarTools.getImage("arrow-up.gif"));
     578        move_up_button = new GLIButton(Dictionary.get("CDM.Move.Move_Up"), JarTools.getImage("arrow-up.gif"), Dictionary.get("CDM.Move.Move_Up_Tooltip"));
    582579        move_up_button.setEnabled(false);
    583         move_up_button.setMnemonic(KeyEvent.VK_U);
    584         Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    585 
    586         move_down_button = new GLIButton("", JarTools.getImage("arrow-down.gif"));
     580       
     581        move_down_button = new GLIButton(Dictionary.get("CDM.Move.Move_Down"), JarTools.getImage("arrow-down.gif"), Dictionary.get("CDM.Move.Move_Down_Tooltip"));
    587582        move_down_button.setEnabled(false);
    588         move_down_button.setMnemonic(KeyEvent.VK_D);
    589         Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    590 
     583       
    591584        // Listeners
    592585        add.addActionListener(new AddListener());
     
    724717                // And reset the tooltip. If the plugin is null or is a string, then go back to the default message
    725718                if(current_selection == null || current_selection instanceof String) {
    726                     Dictionary.registerTooltip(classifier, "CDM.ClassifierManager.Classifier_Tooltip");
     719            classifier.setToolTipText(Dictionary.get("CDM.ClassifierManager.Classifier_Tooltip"));
    727720                }
    728721                else {
    729722                    Classifier current_classifier = (Classifier) current_selection;
    730                     Dictionary.registerTooltipText(classifier, Utility.formatHTMLWidth(current_classifier.getDescription(), 40));
     723            classifier.setToolTipText(Utility.formatHTMLWidth(current_classifier.getDescription(), 40));
    731724                    current_classifier = null;
    732725                }
Note: See TracChangeset for help on using the changeset viewer.