Changeset 9101


Ignore:
Timestamp:
2005-02-18T14:19:24+13:00 (19 years ago)
Author:
kjdon
Message:

made the strings come from the dictionary, changed replace to merge

File:
1 edited

Legend:

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

    r9024 r9101  
    1919{
    2020    final static public int ADD_BUTTON_PRESSED = 0;
    21     final static public int REPLACE_BUTTON_PRESSED = 1;
     21    final static public int MERGE_BUTTON_PRESSED = 1;
    2222    final static public int IGNORE_BUTTON_PRESSED = 2;
    2323    final static private Dimension DIALOG_SIZE = new Dimension(640, 180);
     
    2828    private GComboBox metadata_elements_combobox = null;
    2929    private JButton add_button = null;
    30     private JButton replace_button = null;
     30    private JButton merge_button = null;
    3131    private JButton ignore_button = null;
    3232    private JDialog on_screen = null;
     
    4242    dialog.setSize(DIALOG_SIZE);
    4343    dialog.setJMenuBar(new SimpleMenuBar("importingpreviouslyassignedmetadata"));
    44     Dictionary.setText(dialog, "MSMPrompt.Merge_MDS");
     44    Dictionary.setText(dialog, "MIMP.Title");
    4545
    4646    // All the loaded metadata sets except the extracted metadata set are applicable
     
    5555    add_button.addActionListener(this);
    5656    add_button.setMnemonic(KeyEvent.VK_A);
    57     add_button.setText("Add");
    58     // Dictionary.registerBoth(add_button, "MSMPrompt.Add", "MSMPrompt.Add_Tooltip");
     57    Dictionary.registerBoth(add_button, "MIMP.Add", "MIMP.Add_Tooltip");
    5958
    60     replace_button = new GLIButton();
    61     replace_button.addActionListener(this);
    62     replace_button.setEnabled(true);
    63     replace_button.setMnemonic(KeyEvent.VK_M);
    64     replace_button.setText("Replace");
    65     // Dictionary.registerBoth(merge, "MSMPrompt.Merge", "MSMPrompt.Merge_Tooltip");
     59    merge_button = new GLIButton();
     60    merge_button.addActionListener(this);
     61    merge_button.setEnabled(true);
     62    merge_button.setMnemonic(KeyEvent.VK_M);
     63    Dictionary.registerBoth(merge_button, "MIMP.Merge", "MIMP.Merge_Tooltip");
    6664
    6765    ignore_button = new GLIButton();
     
    6967    ignore_button.setEnabled(true);
    7068    ignore_button.setMnemonic(KeyEvent.VK_S);
    71     ignore_button.setText("Ignore");
    72     // Dictionary.registerBoth(ignore_button, "MSMPrompt.Ignore", "MSMPrompt.Ignore_Tooltip");
     69    Dictionary.registerBoth(ignore_button, "MIMP.Ignore", "MIMP.Ignore_Tooltip");
    7370
     71    // add instructions!!!
     72    // "MIMP.Instructions", args: source elem
    7473    metadata_elements_combobox = new GComboBox();
    7574
     
    8180    JPanel left_pane = new JPanel();
    8281    left_pane.setLayout(new GridLayout(3,1));
    83     left_pane.add(new JLabel("Source metadata element:"));
    84     left_pane.add(new JLabel("Target metadata set:"));
    85     left_pane.add(new JLabel("Target metadata element:"));
     82    left_pane.add(new JLabel(Dictionary.get("MIMP.Source_Element")));
     83    left_pane.add(new JLabel(Dictionary.get("MIMP.Target_Set")));
     84    left_pane.add(new JLabel(Dictionary.get("MIMP.Target_Element")));
    8685
    8786    JPanel right_pane = new JPanel();
     
    9594    button_pane.setLayout(new GridLayout(1,3));
    9695    button_pane.add(add_button);
    97     button_pane.add(replace_button);
     96    button_pane.add(merge_button);
    9897    button_pane.add(ignore_button);
    9998
     
    101100    content_pane.setLayout(new BorderLayout());
    102101    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    103     content_pane.add(left_pane, BorderLayout.CENTER);
    104     content_pane.add(right_pane, BorderLayout.EAST);
     102    content_pane.add(left_pane, BorderLayout.WEST);
     103    content_pane.add(right_pane, BorderLayout.CENTER);
    105104    content_pane.add(button_pane, BorderLayout.SOUTH);
    106105
     
    125124        result = ADD_BUTTON_PRESSED;
    126125    }
    127     if (esrc == replace_button) {
    128         result = REPLACE_BUTTON_PRESSED;
     126    if (esrc == merge_button) {
     127        result = MERGE_BUTTON_PRESSED;
    129128    }
    130129    if (esrc == ignore_button) {
Note: See TracChangeset for help on using the changeset viewer.