Ignore:
Timestamp:
2003-10-07T15:35:23+13:00 (21 years ago)
Author:
mdewsnip
Message:

Changed calls to the Dictionary.

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
10 edited

Legend:

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

    r5590 r5593  
    540540                String args[] = new String[1];
    541541                args[0] = argument.getName();
    542                 JOptionPane.showMessageDialog(self, Dictionary.newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
     542                JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
    543543                args = null;
    544544                return false;
     
    563563                args[0] = argument.getName();
    564564                args[1] = result;
    565                 JOptionPane.showMessageDialog(self, Dictionary.newget("CDM.ArgumentConfiguration.Bad_Integer", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
     565                JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Bad_Integer", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
    566566                args = null;
    567567                return false;
     
    573573                String args[] = new String[1];
    574574                args[0] = argument.getName();
    575                 JOptionPane.showMessageDialog(self, Dictionary.newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
     575                JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
    576576                args = null;
    577577                return false;
     
    612612                String args[] = new String[1];
    613613                args[0] = argument.getName();
    614                 JOptionPane.showMessageDialog(self, Dictionary.newget("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.newget("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
     614                JOptionPane.showMessageDialog(self, Dictionary.get("CDM.ArgumentConfiguration.Required_Argument", args), Dictionary.get("CDM.ArgumentConfiguration.Error_Title"), JOptionPane.ERROR_MESSAGE);
    615615                return false;
    616616            }
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r5590 r5593  
    200200        if(index < 0) {
    201201            String args[] = new String[2];
    202             args[0] = Dictionary.newget("CDM.ClassifierManager.Classifier");
     202            args[0] = Dictionary.get("CDM.ClassifierManager.Classifier");
    203203            args[1] = classifier.getName();
    204             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.At_Top", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     204            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Top", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    205205            return;
    206206        }
     
    213213        if(index >= getSize()) {
    214214            String args[] = new String[2];
    215             args[0] = Dictionary.newget("CDM.ClassifierManager.Classifier_Str");
     215            args[0] = Dictionary.get("CDM.ClassifierManager.Classifier_Str");
    216216            args[1] = classifier.getName();
    217             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.At_Bottom", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     217            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Bottom", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    218218            return;
    219219        }
     
    337337        String classifier_name = getClassifierName(classifier);
    338338        Gatherer.println("Zero length argument xml detected for: " + classifier_name);
    339         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.ClassifierManager.Classifier_XML_Parse_Failed", classifier_name), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     339        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_XML_Parse_Failed", classifier_name), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    340340        classifier_name = null;
    341341        }
     
    370370        if(files != null) {
    371371        // Create a progress indicator.
    372         ParsingProgress progress = new ParsingProgress(Dictionary.newget("CDM.ClassifierManager.Parsing.Title"), Dictionary.newget("CDM.ClassifierManager.Parsing.Message"), files.length);
     372        ParsingProgress progress = new ParsingProgress(Dictionary.get("CDM.ClassifierManager.Parsing.Title"), Dictionary.get("CDM.ClassifierManager.Parsing.Message"), files.length);
    373373        for(int i = 0; i < files.length; i++) {
    374374            // We only want to check Perl Modules.
     
    516516        // Create
    517517        add = new JButton();
    518         Dictionary.setBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip");
     518        Dictionary.registerBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip");
    519519        JPanel button_pane = new JPanel();
    520520        JPanel central_pane = new JPanel();
    521521        configure = new JButton();
    522522        configure.setEnabled(false);
    523         Dictionary.setBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip");
     523        Dictionary.registerBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip");
    524524        JPanel header_pane = new JPanel();
    525525        instructions = new JTextArea();
     
    528528        instructions.setRows(6);
    529529        instructions.setWrapStyleWord(true);
    530         Dictionary.setText(instructions, "CDM.ClassifierManager.Instructions");
     530        Dictionary.registerText(instructions, "CDM.ClassifierManager.Instructions");
    531531
    532532        classifier = new GComboBox(getAvailable());
     
    537537        classifier.setTextNonSelectionColor(Gatherer.config.getColor("coloring.workspace_tree_foreground", false));
    538538        classifier.setTextSelectionColor(Gatherer.config.getColor("coloring.collection_selection_foreground", false));
    539         Dictionary.setTooltip(classifier, "CDM.ClassifierManager.Classifier_Tooltip");
     539        Dictionary.registerTooltip(classifier, "CDM.ClassifierManager.Classifier_Tooltip");
    540540
    541541        JLabel classifier_label = new JLabel();
    542         Dictionary.setText(classifier_label, "CDM.ClassifierManager.Classifier");
     542        Dictionary.registerText(classifier_label, "CDM.ClassifierManager.Classifier");
    543543        classifier_list = new JList(model);
    544544        classifier_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    546546        classifier_list_label.setHorizontalAlignment(JLabel.CENTER);
    547547        classifier_list_label.setOpaque(true);
    548         Dictionary.setText(classifier_list_label, "CDM.ClassifierManager.Assigned");
     548        Dictionary.registerText(classifier_list_label, "CDM.ClassifierManager.Assigned");
    549549        JPanel classifier_list_pane = new JPanel();
    550550        JPanel classifier_pane = new JPanel();
    551551        remove = new JButton();
    552552        remove.setEnabled(false);
    553         Dictionary.setBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip");
     553        Dictionary.registerBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip");
    554554
    555555        JLabel title = new JLabel();
    556556        title.setHorizontalAlignment(JLabel.CENTER);
    557557        title.setOpaque(true);
    558         Dictionary.setText(title, "CDM.ClassifierManager.Title");
     558        Dictionary.registerText(title, "CDM.ClassifierManager.Title");
    559559
    560560        JPanel temp = new JPanel(new BorderLayout());
     
    635635
    636636        // Scope these mad bordering skillz.
    637         temp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,0,5,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.newget("CDM.ClassifierManager.Controls")), BorderFactory.createEmptyBorder(2,2,2,2))));
     637        temp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,0,5,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("CDM.ClassifierManager.Controls")), BorderFactory.createEmptyBorder(2,2,2,2))));
    638638        temp.add(classifier_pane, BorderLayout.NORTH);
    639639        temp.add(button_pane, BorderLayout.SOUTH);
     
    712712            }
    713713            else {
    714                 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.ClassifierManager.Classifier_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     714                JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    715715            }
    716716            }
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r5590 r5593  
    369369        button_pane.add(remove_button);
    370370
    371         center_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.newget("CDM.FormatManager.Editing_Controls")), BorderFactory.createEmptyBorder(2,2,2,2)));
     371        center_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("CDM.FormatManager.Editing_Controls")), BorderFactory.createEmptyBorder(2,2,2,2)));
    372372        center_pane.setLayout(new BorderLayout());
    373373        center_pane.add(selection_pane, BorderLayout.NORTH);
  • trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java

    r5536 r5593  
    356356     */
    357357    public void setSelectedView(String type) {
    358         type = Dictionary.newget(type);
     358        type = Dictionary.get(type);
    359359        for(int i = 0; i < root.getChildCount(); i++) {
    360360        DesignNode child = (DesignNode) root.getChildAt(i);
     
    379379     */
    380380    public String toString() {
    381         return Dictionary.newget("CDM.GUI." + (String)getUserObject());
     381        return Dictionary.get("CDM.GUI." + (String)getUserObject());
    382382    }
    383383    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r5590 r5593  
    107107    }
    108108    else {
    109         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.IndexManager.Index_Exists"), Dictionary.newget("General.Warning"), JOptionPane.WARNING_MESSAGE);
     109        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.IndexManager.Index_Exists"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE);
    110110    }
    111111    }
     
    125125    }
    126126    else {
    127         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.IndexManager.Level_Exists"), Dictionary.newget("General.Warning"), JOptionPane.WARNING_MESSAGE);
     127        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.IndexManager.Level_Exists"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE);
    128128    }
    129129    }
     
    587587        Dictionary.registerText(level_label, "CDM.IndexManager.Level");
    588588        level_combobox = new JComboBox();
    589         level_combobox.addItem(Dictionary.newget("CDM.IndexManager.Document"));
    590         level_combobox.addItem(Dictionary.newget("CDM.IndexManager.Paragraph"));
    591         level_combobox.addItem(Dictionary.newget("CDM.IndexManager.Section"));
     589        level_combobox.addItem(Dictionary.get("CDM.IndexManager.Document"));
     590        level_combobox.addItem(Dictionary.get("CDM.IndexManager.Paragraph"));
     591        level_combobox.addItem(Dictionary.get("CDM.IndexManager.Section"));
    592592        level_combobox.setEditable(false);
    593593        Dictionary.registerTooltip(level_combobox, "CDM.IndexManager.Level_Tooltip");
     
    800800        JLabel component = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    801801        if(default_index != null && default_index.equals(value)) {
    802             component.setText(component.getText() + " " + Dictionary.newget("CDM.IndexManager.Default_Index_Indicator"));
     802            component.setText(component.getText() + " " + Dictionary.get("CDM.IndexManager.Default_Index_Indicator"));
    803803        }
    804804        return component;
     
    11991199        header_panel.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER);
    12001200
    1201         tabbed_pane.add(Dictionary.newget("CDM.IndexManager.MGPP.Indexes"), indexes_panel);
    1202         tabbed_pane.add(Dictionary.newget("CDM.IndexManager.MGPP.Levels"), levels_panel);
     1201        tabbed_pane.add(Dictionary.get("CDM.IndexManager.MGPP.Indexes"), indexes_panel);
     1202        tabbed_pane.add(Dictionary.get("CDM.IndexManager.MGPP.Levels"), levels_panel);
    12031203
    12041204        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  • trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java

    r5590 r5593  
    195195        element_label.setHorizontalAlignment(JLabel.CENTER);
    196196        element_label.setOpaque(true);
    197         Dictionary.setText(element_label, "CDM.MetadataSetManager.Elements");
     197        Dictionary.registerText(element_label, "CDM.MetadataSetManager.Elements");
    198198        element_list = new JList();
    199199        element_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r5590 r5593  
    146146    }
    147147    if(plugin.getName().equals(StaticStrings.ARCPLUG_STR) || plugin.getName().equals(StaticStrings.RECPLUG_STR)) {
    148         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.Fixed"), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     148        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.Fixed"), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    149149        return;
    150150    }
     
    183183        if(index < 0) {
    184184            String args[] = new String[2];
    185             args[0] = Dictionary.newget("CDM.PlugInManager.PlugIn_Str");
     185            args[0] = Dictionary.get("CDM.PlugInManager.PlugIn_Str");
    186186            args[1] = plugin.getName();
    187             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.At_Top", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     187            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.At_Top", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    188188            return;
    189189        }
     
    198198            String args[] = new String[1];
    199199            args[0] = plugin.getName();
    200             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.Move.Cannot", args), Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     200            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.Move.Cannot", args), Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    201201            // Still not going to move RecPlug or ArcPlug.
    202202            return;
     
    376376        String[] margs = new String[1];
    377377        margs[0] = plugin_name;
    378         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.PlugInManager.PlugIn_XML_Parse_Failed", margs), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     378        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", margs), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    379379        }
    380380    }
     
    413413    if(files != null) {
    414414        // Create a progress indicator.
    415         ParsingProgress progress = new ParsingProgress(Dictionary.newget("CDM.PlugInManager.Parsing.Title"), Dictionary.newget("CDM.PlugInManager.Parsing.Message"), files.length);
     415        ParsingProgress progress = new ParsingProgress(Dictionary.get("CDM.PlugInManager.Parsing.Title"), Dictionary.get("CDM.PlugInManager.Parsing.Message"), files.length);
    416416        for(int i = 0; i < files.length; i++) {
    417417        // We only want to check Perl Modules.
     
    696696         (BorderFactory.createEmptyBorder(5,0,5,0),
    697697          BorderFactory.createCompoundBorder
    698           (BorderFactory.createTitledBorder(Dictionary.newget("CDM.PlugInManager.Controls")),
     698          (BorderFactory.createTitledBorder(Dictionary.get("CDM.PlugInManager.Controls")),
    699699           BorderFactory.createEmptyBorder(2,2,2,2))));
    700700
     
    771771            }
    772772            else {
    773             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CDM.PlugInManager.PlugIn_Exists"), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     773            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    774774            }
    775775            base_plugin = null;
  • trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java

    r5590 r5593  
    102102    if((direction && index < 0) || (!direction && index >= getSize())) {
    103103        String args[] = new String[2];
    104         args[0] = Dictionary.newget("CDM.SearchTypeManager.SearchType");
     104        args[0] = Dictionary.get("CDM.SearchTypeManager.SearchType");
    105105        args[1] = search_type.toString();
    106106        String message = null;
    107107        if (direction) {
    108         message = Dictionary.newget("CDM.Move.At_Top", args);
     108        message = Dictionary.get("CDM.Move.At_Top", args);
    109109        }
    110110        else {
    111         message = Dictionary.newget("CDM.Move.At_Bottom", args);
    112         }
    113         JOptionPane.showMessageDialog(Gatherer.g_man, message, Dictionary.newget("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
     111        message = Dictionary.get("CDM.Move.At_Bottom", args);
     112        }
     113        JOptionPane.showMessageDialog(Gatherer.g_man, message, Dictionary.get("CDM.Move.Title"), JOptionPane.ERROR_MESSAGE);
    114114        return;
    115115    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java

    r5590 r5593  
    311311        subcollection_pane.add(button_pane, BorderLayout.SOUTH);
    312312
    313         tabbed_pane.addTab(Dictionary.newget("CDM.SubcollectionManager.Subcollection_Controls"), subcollection_pane);
    314         tabbed_pane.addTab(Dictionary.newget("CDM.SubcollectionManager.Subindex_Controls"), (JPanel) CollectionDesignManager.subcollectionindex_manager.getControls());
    315         tabbed_pane.addTab(Dictionary.newget("CDM.SubcollectionManager.Language_Controls"), (JPanel) CollectionDesignManager.language_manager.getControls());
     313        tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subcollection_Controls"), subcollection_pane);
     314        tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subindex_Controls"), (JPanel) CollectionDesignManager.subcollectionindex_manager.getControls());
     315        tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Language_Controls"), (JPanel) CollectionDesignManager.language_manager.getControls());
    316316
    317317        border_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5));
  • trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java

    r5590 r5593  
    520520        }
    521521        public String getColumnName(int column) {
    522         return Dictionary.newget("CDM.TranslationManager.Column_Name_" + column);
     522        return Dictionary.get("CDM.TranslationManager.Column_Name_" + column);
    523523        }
    524524
Note: See TracChangeset for help on using the changeset viewer.