Changeset 12115
- Timestamp:
- 2006-07-10T14:42:54+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/GAuthenticator.java
r10581 r12115 83 83 JLabel title_label = new JLabel(getMessageString()); 84 84 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")); 87 86 JTextField username = new JTextField(); 88 Dictionary.setTooltip(username, "GAuthenticator.Username_Tooltip");87 username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip")); 89 88 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")); 92 90 password = new JPasswordField(); 93 91 password.setEchoChar('*'); 94 Dictionary.setTooltip(password, "GAuthenticator.Password_Tooltip");92 password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip")); 95 93 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 103 97 // Connection 104 98 cancel_button.addActionListener(new AuthenticationActionListener(true)); -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r11625 r12115 75 75 DebugStream.println("FileQueue started."); 76 76 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")); 79 78 progress = new GProgressBar(); 80 79 progress.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); -
trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java
r10877 r12115 220 220 setDefaultCloseOperation(DISPOSE_ON_CLOSE); 221 221 setSize(SIZE); 222 setTitle(Dictionary.get("GEMS.Title")); 222 223 setJMenuBar(new GEMSMenuBar()); 223 Dictionary.setText(this, "GEMS.Title"); 224 224 225 225 JPanel content_pane = (JPanel) getContentPane(); 226 226 content_pane.setBackground(config.getColor("coloring.collection_heading_background", false)); … … 305 305 remove_set_action_listener = new RemoveSetActionListener(); 306 306 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 307 329 // Layout 308 330 mds_tree_pane.setLayout(new BorderLayout()); … … 331 353 332 354 element_inner_pane.setLayout(new BorderLayout()); 355 //element_inner_pane.setLayout(new GridLayout(2,1)); 333 356 element_inner_pane.add(element_attributes_pane); 357 //element_inner_pane.add(element_values_pane); 334 358 335 359 element_details_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(Dictionary.get("GEMS.Element_Details")), BorderFactory.createEmptyBorder(2,2,2,2))); … … 424 448 { 425 449 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")); 430 453 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")); 435 456 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")); 440 459 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")); 445 462 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")); 450 465 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")); 455 468 file_preferences.addActionListener(this); 456 file_preferences.setMnemonic(KeyEvent.VK_S); 457 Dictionary.registerText(file_preferences, "Menu.File_Options"); 458 469 459 470 // Layout (file menu) 460 471 file.add(file_new); … … 469 480 // Edit menu 470 481 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")); 475 485 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")); 480 488 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")); 485 491 edit_paste.addActionListener(this); 486 edit_paste.setMnemonic(KeyEvent.VK_V); 487 Dictionary.registerText(edit_paste, "Menu.Edit_Paste"); 488 492 489 493 // Layout (edit menu) 490 494 edit.add(edit_cut); … … 778 782 target.setOpaque(false); 779 783 780 JLabel name_label = new JLabel( );784 JLabel name_label = new JLabel(Dictionary.get("GEMS.Name")); 781 785 name_label.setOpaque(false); 782 Dictionary.setText(name_label, "GEMS.Name");783 786 name = new GComboBox(); 784 787 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")); 788 791 language_label.setOpaque(false); 789 Dictionary.setText(language_label, "GEMS.Language");790 792 language_box = new JComboBox(); 791 793 language_box.setToolTipText(Dictionary.get("GEMS.Attribute_Language_Tooltip")); 792 794 for(int n = 0; n < attributeLists.size(); n++){ 793 795 name.add(attributeLists.get(n)); 794 796 } 795 797 796 Dictionary.setTooltip(language_box, "GEMS.Attribute_Language_Tooltip");797 798 798 JPanel center_pane = new JPanel(); 799 799 center_pane.setOpaque(false); … … 806 806 v_text_area.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 807 807 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 810 810 JPanel button_pane = new JPanel(); 811 811 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")); 814 813 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 820 816 // Connection 821 817 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); … … 899 895 { 900 896 target.setText(current_element.getName()); 901 Dictionary.setText(target_label, "GEMS.Target");897 target_label.setText(Dictionary.get("GEMS.Target")); 902 898 } 903 899 else if(current_set != null) 904 900 { 905 Dictionary.setText(target_label, "GEMS.Set");906 901 target.setText(current_set.toString()); 907 Dictionary.setText(target_label, "GEMS.Target");902 target_label.setText(Dictionary.get("GEMS.Set")); 908 903 } 909 904 … … 960 955 else if (source == popupListener.menuAddAttributeAttribute || source == popupListener.menuAddAttributeSet || source == popupListener.menuAddAttributeElement){ 961 956 962 Dictionary.setText(this, "GEMS.Add_Attribute");963 957 for(int i = 0; i < attributeLists.size(); i++) { 964 958 name.add(attributeLists.get(i).toString()); … … 966 960 } 967 961 name.setEnabled(true); 962 setTitle(Dictionary.get("GEMS.Add_Attribute")); 968 963 setVisible(true); 969 964 } … … 1034 1029 //System.err.println("just entered editAttribute"); //debug 1035 1030 AttributeTableModel model = null; 1036 Dictionary.setText(this, "GEMS.Edit_Attribute");1031 setTitle(Dictionary.get("GEMS.Edit_Attribute")); 1037 1032 1038 1033 switch(current_attribute_type) { … … 1173 1168 1174 1169 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")); 1177 1172 } 1178 1173 … … 1256 1251 setModal(true); 1257 1252 setSize(ADD_ELEMENT_SIZE); 1253 setTitle(Dictionary.get("GEMS.Add_Element")); 1258 1254 // Creation 1259 1255 JPanel content_pane = (JPanel) getContentPane(); … … 1261 1257 JPanel center_pane = new JPanel(); 1262 1258 center_pane.setOpaque(false); 1263 Dictionary.setText(this, "GEMS.Add_Element"); 1264 1259 1265 1260 JPanel labels_pane = new JPanel(); 1266 1261 labels_pane.setOpaque(false); 1267 JLabel set_label = new JLabel( );1262 JLabel set_label = new JLabel(Dictionary.get("GEMS.Set")); 1268 1263 set_label.setOpaque(false); 1269 Dictionary.setText(set_label, "GEMS.Set");1270 1264 set_field = new JLabel(); 1271 1265 set_field.setOpaque(false); … … 1273 1267 JPanel values_pane = new JPanel(); 1274 1268 values_pane.setOpaque(false); 1275 JLabel name_label = new JLabel( );1269 JLabel name_label = new JLabel(Dictionary.get("GEMS.Name")); 1276 1270 name_label.setOpaque(false); 1277 Dictionary.setText(name_label, "GEMS.Name");1278 1271 name_field = new NonWhitespaceField(); 1279 1272 name_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 1281 1274 name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 1282 1275 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 1285 1278 JPanel button_pane = new JPanel(); 1286 1279 button_pane.setOpaque(false); 1287 1280 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")); 1290 1282 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 1296 1285 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); 1297 1286 … … 1414 1403 setModal(true); 1415 1404 setSize(ADD_SET_SIZE); 1416 Dictionary.setText(this, "GEMS.Add_Set");1417 1405 setTitle(Dictionary.get("GEMS.Add_Set")); 1406 1418 1407 // Creation 1419 1408 JPanel content_pane = (JPanel) getContentPane(); … … 1425 1414 JPanel boxes_pane = new JPanel(); 1426 1415 1427 JLabel namespace_label = new JLabel( );1416 JLabel namespace_label = new JLabel(Dictionary.get("GEMS.Namespace")); 1428 1417 namespace_label.setOpaque(false); 1429 Dictionary.setText(namespace_label, "GEMS.Namespace");1430 1418 namespace_field = TransformCharacterTextField.createNamespaceTextField(); 1431 1419 namespace_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 1433 1421 namespace_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 1434 1422 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")); 1438 1426 name_label.setOpaque(false); 1439 Dictionary.setText(name_label, "GEMS.Name");1440 1427 name_field = new JTextField(); 1441 1428 name_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 1443 1430 name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 1444 1431 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")); 1446 1433 1447 1434 JPanel button_pane = new JPanel(); 1448 1435 button_pane.setOpaque(false); 1449 1436 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")); 1452 1438 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 1457 1441 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); 1458 1442 … … 1471 1455 boxes_pane.add(namespace_field); 1472 1456 1473 JLabel inheritJLabel = new JLabel(); 1474 Dictionary.setText(inheritJLabel, "GEMS.inheritMetadataSet"); 1475 1457 JLabel inheritJLabel = new JLabel(Dictionary.get("GEMS.inheritMetadataSet")); 1458 1476 1459 label_pane.add(inheritJLabel); 1477 1460 … … 1487 1470 //add sets to existingSetJComboBox 1488 1471 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 1492 1474 existingSetJComboBox.addItem(DO_NOT_INHERIT); 1493 1475 existingSetJComboBox.setSelectedIndex(getSetsLen); … … 1636 1618 setModal(true); 1637 1619 setSize(OPEN_SETS_SIZE); 1638 Dictionary.setText(this, "GEMS.Open_Set");1639 1620 setTitle(Dictionary.get("GEMS.Open_Set")); 1621 1640 1622 // Creation 1641 1623 JPanel content_pane = (JPanel) getContentPane(); … … 1649 1631 button_pane.setOpaque(false); 1650 1632 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")); 1653 1634 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 1659 1637 // Connection 1660 1638 cancel_button.addActionListener(this); … … 1664 1642 boxes_pane.setLayout(new GridLayout(4,1)); 1665 1643 1666 JLabel inheritJLabel = new JLabel(); 1667 Dictionary.setText(inheritJLabel, "GEMS.inheritMetadataSet"); 1668 1644 JLabel inheritJLabel = new JLabel(Dictionary.get("GEMS.inheritMetadataSet")); 1645 1669 1646 File[] col_dir = new File(Configuration.gsdl_path + File.separator + "collect").listFiles(); 1670 1647 … … 1672 1649 1673 1650 for(int k = 0; k < col_dir.length; k++){ 1674 1651 if(col_dir[k].isDirectory() && col_dir[k].getName().compareTo("CVS") != 0) { 1675 1652 1676 1653 File metadir = new File(col_dir[k].toString() + File.separator + "metadata"); 1677 1654 if(metadir.exists()) 1678 1655 existingSetJComboBox.addItem(new String(col_dir[k].getName() + " Collection Sets #% " + col_dir[k].toString() + File.separator + "metadata")); 1679 1656 1680 1657 } 1681 1658 1682 1659 } … … 1684 1661 1685 1662 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 1689 1665 boxes_pane.add(new JLabel("Select which group of metadata sets you wish to edit:\n\n\n\n")); 1690 1666 boxes_pane.add(new JLabel("\n")); … … 1875 1851 setModal(true); 1876 1852 setSize(RENAME_SET_SIZE); 1877 Dictionary.setText(this, "GEMS.Rename_Set");1878 1853 setTitle(Dictionary.get("GEMS.Rename_Set")); 1854 1879 1855 // Creation 1880 1856 JPanel content_pane = (JPanel) getContentPane(); … … 1886 1862 JPanel boxes_pane = new JPanel(); 1887 1863 1888 JLabel namespace_label = new JLabel( );1864 JLabel namespace_label = new JLabel(Dictionary.get("GEMS.Namespace")); 1889 1865 namespace_label.setOpaque(false); 1890 Dictionary.setText(namespace_label, "GEMS.Namespace");1891 1866 namespace_field = TransformCharacterTextField.createNamespaceTextField(); 1892 1867 namespace_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 1894 1869 namespace_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 1895 1870 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")); 1899 1874 name_label.setOpaque(false); 1900 Dictionary.setText(name_label, "GEMS.Name");1901 1875 name_field = new JTextField(); 1902 1876 name_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 1904 1878 name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 1905 1879 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 1908 1882 JPanel button_pane = new JPanel(); 1909 1883 button_pane.setOpaque(false); 1910 1884 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")); 1913 1886 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 1918 1889 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); 1919 1890 … … 2045 2016 setModal(true); 2046 2017 setSize(RENAME_ELEMENT_SIZE); 2018 setTitle(Dictionary.get("GEMS.Rename_Element")); 2019 2047 2020 // Creation 2048 2021 JPanel content_pane = (JPanel) getContentPane(); … … 2056 2029 JPanel values_pane = new JPanel(); 2057 2030 values_pane.setOpaque(false); 2058 JLabel name_label = new JLabel( );2031 JLabel name_label = new JLabel(Dictionary.get("GEMS.New_Name")); 2059 2032 name_label.setOpaque(false); 2060 Dictionary.setText(name_label, "GEMS.New_Name");2033 2061 2034 name_field = new NonWhitespaceField(); 2062 2035 name_field.setBackground(config.getColor("coloring.collection_tree_background", false)); … … 2064 2037 name_field.setSelectionColor(config.getColor("coloring.collection_selection_background", false)); 2065 2038 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 2068 2041 JPanel button_pane = new JPanel(); 2069 2042 button_pane.setOpaque(false); 2070 2043 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")); 2073 2045 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 2079 2048 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); 2080 2049 2081 Dictionary.setText(this, "GEMS.Rename_Element");2082 2083 2050 // Connection 2084 2051 cancel_button.addActionListener(this); … … 2462 2429 2463 2430 //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")); 2438 menuRemoveSet.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 2489 2456 //Associate the menu items with the appropriate popups: 2490 2457 setPopup.add(menuAddAttributeSet); -
trunk/gli/src/org/greenstone/gatherer/gems/GEMSPreferences.java
r10462 r12115 67 67 this.self = this; 68 68 setSize(SIZE); 69 Dictionary.registerText(this, "Preferences");69 setTitle(Dictionary.get("Preferences")); 70 70 setJMenuBar(new SimpleMenuBar("preferences")); 71 71 … … 74 74 tab_pane = new JTabbedPane(); 75 75 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 80 78 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 92 83 // Connection 93 84 ok_button.addActionListener(new OKButtonListener(true)); … … 148 139 // Users email 149 140 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")); 151 142 interface_language_label.setPreferredSize(LABEL_SIZE); 152 143 153 Dictionary.registerText(interface_language_label, "GEMS.Preferences.Selected_Languages_Tooltip");154 155 144 // Language 156 145 JPanel language_pane = new JPanel(); 157 language_label = new JLabel( );146 language_label = new JLabel(Dictionary.get("Preferences.General.Interface_Language")); 158 147 language_label.setPreferredSize(LABEL_SIZE); 159 148 160 Dictionary.registerText(language_label, "Preferences.General.Interface_Language");161 149 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 163 152 // Try to locate and select the current language 164 153 String language_code = Configuration.getLanguage(); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java
r9367 r12115 111 111 setJMenuBar(new SimpleMenuBar("reviewingmetadata")); 112 112 setSize(SIZE); 113 Dictionary.setText(this, "Autofilter.Title");114 113 setTitle(Dictionary.get("Autofilter.Title")); 114 115 115 // Creation 116 116 JPanel content_pane = (JPanel) getContentPane(); 117 117 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")); 120 119 JTextField name_template = new JTextField(); 121 120 name = new JLabel(); … … 124 123 JPanel value_pane = new JPanel(); 125 124 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")); 128 126 value = new JComboBox(); 129 127 value.setEditable(false); … … 136 134 first_value.addItem(""); 137 135 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")); 140 137 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")); 143 139 ButtonGroup operator_group = new ButtonGroup(); 144 and_radiobutton = new JRadioButton( );140 and_radiobutton = new JRadioButton(Dictionary.get("Autofilter.AND")); 145 141 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")); 148 143 none_radiobutton.setOpaque(false); 149 144 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")); 152 146 or_radiobutton.setOpaque(false); 153 Dictionary.setText(or_radiobutton, "Autofilter.OR");154 147 operator_group.add(none_radiobutton); 155 148 operator_group.add(and_radiobutton); … … 164 157 second_value.addItem(""); 165 158 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")); 168 160 JPanel lower_pane = new JPanel(); 169 161 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 174 165 ButtonGroup order_group = new ButtonGroup(); 175 ascending_radiobutton = new JRadioButton( );166 ascending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Ascending")); 176 167 ascending_radiobutton.setOpaque(false); 177 168 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")); 180 170 descending_radiobutton.setOpaque(false); 181 Dictionary.setText(descending_radiobutton, "Autofilter.Descending");182 171 order_group.add(ascending_radiobutton); 183 172 order_group.add(descending_radiobutton); … … 189 178 } 190 179 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 201 184 // Connection 202 185 and_radiobutton.addActionListener(new CheckListener(true)); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java
r11629 r12115 111 111 setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); 112 112 setSize(SIZE); 113 setTitle(Dictionary.get("MetaAudit.Title")); 113 114 setJMenuBar(new SimpleMenuBar("reviewingmetadata")); 114 Dictionary.registerText(this, "MetaAudit.Title");115 115 116 JPanel content_pane = (JPanel) getContentPane(); 116 117 JPanel button_pane = new JPanel(); 117 118 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 122 121 // Connection 123 122 close_button.addActionListener(new CloseListener());
Note:
See TracChangeset
for help on using the changeset viewer.