Changeset 6318
- Timestamp:
- 2003-12-19T14:45:12+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/GAuthenticator.java
r5593 r6318 41 41 import java.net.*; 42 42 import javax.swing.*; 43 import org.greenstone.gatherer.gui.GLIButton; 43 44 44 45 /** Provides a graphic authenticator for network password requests. … … 89 90 Dictionary.setTooltip(password, "GAuthenticator.Password_Tooltip"); 90 91 JPanel button_panel = new JPanel(); 91 ok_button = new JButton(); 92 ok_button = new GLIButton(); 93 ok_button.setMnemonic(KeyEvent.VK_O); 92 94 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 93 cancel_button = new JButton(); 95 cancel_button = new GLIButton(); 96 cancel_button.setMnemonic(KeyEvent.VK_C); 94 97 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip"); 95 98 -
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r6087 r6318 52 52 import org.greenstone.gatherer.gui.DoubleImageButton; 53 53 import org.greenstone.gatherer.gui.GComboBox; 54 import org.greenstone.gatherer.gui.GLIButton; 54 55 import org.greenstone.gatherer.msm.MSMEvent; 55 56 import org.greenstone.gatherer.msm.MSMListener; … … 571 572 Collections.sort(library); 572 573 // Create 573 add = new JButton(); 574 add = new GLIButton(); 575 add.setMnemonic(KeyEvent.VK_A); 574 576 Dictionary.registerBoth(add, "CDM.ClassifierManager.Add", "CDM.ClassifierManager.Add_Tooltip"); 575 577 JPanel button_pane = new JPanel(); 576 578 JPanel central_pane = new JPanel(); 577 configure = new JButton();579 configure = new GLIButton(); 578 580 configure.setEnabled(false); 581 configure.setMnemonic(KeyEvent.VK_C); 579 582 Dictionary.registerBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip"); 580 583 JPanel header_pane = new JPanel(); … … 608 611 JPanel classifier_list_pane = new JPanel(); 609 612 JPanel classifier_pane = new JPanel(); 610 remove = new JButton();613 remove = new GLIButton(); 611 614 remove.setEnabled(false); 615 remove.setMnemonic(KeyEvent.VK_R); 612 616 Dictionary.registerBoth(remove, "CDM.ClassifierManager.Remove", "CDM.ClassifierManager.Remove_Tooltip"); 613 617 -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r6051 r6318 34 34 import org.greenstone.gatherer.Gatherer; 35 35 import org.greenstone.gatherer.cdm.CommandTokenizer; 36 import org.greenstone.gatherer.gui.GLIButton; 36 37 import org.greenstone.gatherer.msm.MSMUtils; 37 38 import org.greenstone.gatherer.util.DOMTree; … … 337 338 JPanel content_pane = (JPanel) dialog.getContentPane(); 338 339 final DOMTree tree = new DOMTree(document); 339 JButton refresh_button = new JButton("Refresh Tree"); 340 JButton refresh_button = new GLIButton("Refresh Tree"); 341 refresh_button.setMnemonic(KeyEvent.VK_R); 340 342 refresh_button.addActionListener(new ActionListener() { 341 343 public void actionPerformed(ActionEvent event) { … … 1228 1230 Element command_element = null; 1229 1231 boolean use_metadata_files = false; 1230 boolean show_progress = false;1231 1232 try { 1232 1233 CommandTokenizer tokenizer = new CommandTokenizer(command_str); … … 1250 1251 use_metadata_files = true; 1251 1252 } 1252 else if(name.substring(1).equals(SHOW_PROGRESS_ARGUMENT)) {1253 show_progress = true;1254 }1255 1253 option_element.setAttribute(NAME_ATTRIBUTE, name.substring(1)); 1256 1254 option_element.setAttribute(ASSIGNED_ATTRIBUTE, TRUE_STR); … … 1277 1275 // We must have some RecPlug options: use_metadata_files, and show_progress 1278 1276 if (type.equals(RECPLUG_STR)) { 1279 1277 if (!use_metadata_files) { 1280 1278 Element option_element = document.createElement(OPTION_ELEMENT); 1281 1279 option_element.setAttribute(NAME_ATTRIBUTE, USE_METADATA_FILES_ARGUMENT); … … 1284 1282 command_element.appendChild(option_element); 1285 1283 option_element = null; 1286 } 1287 if(!show_progress) { 1288 Element option_element = document.createElement(OPTION_ELEMENT); 1289 option_element.setAttribute(NAME_ATTRIBUTE, SHOW_PROGRESS_ARGUMENT); 1290 option_element.setAttribute(ASSIGNED_ATTRIBUTE, TRUE_STR); 1291 option_element.setAttribute(CUSTOM_ATTRIBUTE, TRUE_STR); 1292 command_element.appendChild(option_element); 1293 option_element = null; 1294 } 1284 } 1295 1285 } 1296 1286 type = null; -
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r5755 r6318 47 47 import org.greenstone.gatherer.cdm.DOMProxyListModel; 48 48 import org.greenstone.gatherer.cdm.Format; 49 import org.greenstone.gatherer.gui.GLIButton; 49 50 import org.greenstone.gatherer.msm.ElementWrapper; 50 51 import org.greenstone.gatherer.util.StaticStrings; … … 305 306 Dictionary.registerText(editor_label, "CDM.FormatManager.Editor"); 306 307 307 //default_button = new JButton();308 //default_button = new GLIButton(); 308 309 //default_button.setEnabled(false); 309 310 //default_button.setMnemonic(KeyEvent.VK_D); … … 324 325 Dictionary.registerTooltip(variable_combobox, "CDM.FormatManager.Variable_Tooltip"); 325 326 326 insert_button = new JButton();327 insert_button = new GLIButton(); 327 328 insert_button.setMnemonic(KeyEvent.VK_I); 328 329 Dictionary.registerBoth(insert_button, "CDM.FormatManager.Insert", "CDM.FormatManager.Insert_Tooltip"); … … 333 334 334 335 JPanel button_pane = new JPanel(); 335 add_button = new JButton();336 add_button = new GLIButton(); 336 337 add_button.setEnabled(false); 337 338 add_button.setMnemonic(KeyEvent.VK_A); 338 339 Dictionary.registerBoth(add_button, "CDM.FormatManager.Add", "CDM.FormatManager.Add_Tooltip"); 339 replace_button = new JButton();340 replace_button = new GLIButton(); 340 341 replace_button.setEnabled(false); 341 342 replace_button.setMnemonic(KeyEvent.VK_C); 342 343 Dictionary.registerBoth(replace_button, "CDM.FormatManager.Replace", "CDM.FormatManager.Replace_Tooltip"); 343 remove_button = new JButton();344 remove_button = new GLIButton(); 344 345 remove_button.setEnabled(false); 345 346 remove_button.setMnemonic(KeyEvent.VK_R); -
trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java
r6051 r6318 42 42 import org.greenstone.gatherer.gui.DoubleImageButton; 43 43 import org.greenstone.gatherer.gui.GComboBox; 44 import org.greenstone.gatherer.gui.GLIButton; 44 45 import org.greenstone.gatherer.msm.ElementWrapper; 45 46 import org.greenstone.gatherer.msm.MSMUtils; … … 596 597 597 598 JPanel button_pane = new JPanel(); 598 add_button = new JButton();599 add_button = new GLIButton(); 599 600 add_button.setEnabled(false); 600 601 add_button.setMnemonic(KeyEvent.VK_A); 601 602 Dictionary.registerBoth(add_button, "CDM.IndexManager.Add_Index", "CDM.IndexManager.Add_Index_Tooltip"); 602 set_default_button = new JButton();603 set_default_button = new GLIButton(); 603 604 set_default_button.setEnabled(false); 604 605 set_default_button.setMnemonic(KeyEvent.VK_S); 605 606 Dictionary.registerBoth(set_default_button, "CDM.IndexManager.Set_Default", "CDM.IndexManager.Set_Default_Tooltip"); 606 remove_button = new JButton();607 remove_button = new GLIButton(); 607 608 remove_button.setEnabled(false); 608 609 remove_button.setMnemonic(KeyEvent.VK_R); … … 981 982 JPanel index_button_panel = new JPanel(); 982 983 983 add_index_button = new JButton();984 add_index_button = new GLIButton(); 984 985 add_index_button.setEnabled(false); 985 986 add_index_button.setMnemonic(KeyEvent.VK_A); 986 987 Dictionary.registerBoth(add_index_button, "CDM.IndexManager.Add_Index", "CDM.IndexManager.Add_Index_Tooltip"); 987 988 988 add_all_button = new JButton();989 add_all_button = new GLIButton(); 989 990 add_all_button.setEnabled(true); 990 991 add_all_button.setMnemonic(KeyEvent.VK_L); 991 992 Dictionary.registerBoth(add_all_button, "CDM.IndexManager.MGPP.Add_All_Metadata", "CDM.IndexManager.MGPP.Add_All_Metadata_Tooltip"); 992 993 993 replace_button = new JButton();994 replace_button = new GLIButton(); 994 995 replace_button.setEnabled(false); 995 996 replace_button.setMnemonic(KeyEvent.VK_C); 996 997 Dictionary.registerBoth(replace_button, "CDM.IndexManager.MGPP.Replace_Index", "CDM.IndexManager.MGPP.Replace_Index_Tooltip"); 997 998 998 remove_index_button = new JButton();999 remove_index_button = new GLIButton(); 999 1000 remove_index_button.setEnabled(false); 1000 1001 remove_index_button.setMnemonic(KeyEvent.VK_A); … … 1115 1116 JPanel level_button_panel = new JPanel(); 1116 1117 1117 add_level_button = new JButton("CDM.IndexManager.MGPP.Add_Level");1118 add_level_button = new GLIButton("CDM.IndexManager.MGPP.Add_Level"); 1118 1119 add_level_button.setEnabled(false); 1119 1120 add_level_button.setMnemonic(KeyEvent.VK_A); 1120 1121 Dictionary.registerBoth(add_level_button, "CDM.IndexManager.MGPP.Add_Level", "CDM.IndexManager.MGPP.Add_Level_Tooltip"); 1121 1122 1122 remove_level_button = new JButton("CDM.IndexManager.MGPP.Remove_Level");1123 remove_level_button = new GLIButton("CDM.IndexManager.MGPP.Remove_Level"); 1123 1124 remove_level_button.setEnabled(false); 1124 1125 remove_level_button.setMnemonic(KeyEvent.VK_A); -
trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java
r5902 r6318 46 46 import org.greenstone.gatherer.cdm.Language; 47 47 import org.greenstone.gatherer.cdm.LanguageListCellRenderer; 48 import org.greenstone.gatherer.gui.GLIButton; 48 49 import org.w3c.dom.*; 49 50 … … 294 295 JPanel button_panel = new JPanel(); 295 296 296 add_button = new JButton();297 add_button = new GLIButton(); 297 298 add_button.setMnemonic(KeyEvent.VK_A); 298 299 Dictionary.registerBoth(add_button, "CDM.LanguageManager.Add", "CDM.LanguageManager.Add_Tooltip"); 299 300 300 remove_button = new JButton();301 remove_button = new GLIButton(); 301 302 remove_button.setMnemonic(KeyEvent.VK_R); 302 303 remove_button.setEnabled(false); 303 304 Dictionary.registerBoth(remove_button, "CDM.LanguageManager.Remove", "CDM.LanguageManager.Remove_Tooltip"); 304 305 305 clear_button = new JButton();306 clear_button = new GLIButton(); 306 307 clear_button.setMnemonic(KeyEvent.VK_C); 307 308 // If there is a default language, then this is enabled … … 309 310 Dictionary.registerBoth(clear_button, "CDM.LanguageManager.Clear_Default", "CDM.LanguageManager.Clear_Default_Tooltip"); 310 311 311 set_button = new JButton();312 set_button = new GLIButton(); 312 313 set_button.setMnemonic(KeyEvent.VK_S); 313 314 set_button.setEnabled(false); -
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r6254 r6318 46 46 import org.greenstone.gatherer.gui.DoubleImageButton; 47 47 import org.greenstone.gatherer.gui.GComboBox; 48 import org.greenstone.gatherer.gui.GLIButton; 48 49 import org.greenstone.gatherer.msm.MSMUtils; 49 50 import org.greenstone.gatherer.util.StaticStrings; … … 590 591 public PlugInControl() { 591 592 // Create 592 add = new JButton();593 add = new GLIButton(); 593 594 add.setMnemonic(KeyEvent.VK_A); 594 595 Dictionary.registerBoth(add, "CDM.PlugInManager.Add", "CDM.PlugInManager.Add_Tooltip"); … … 597 598 central_pane = new JPanel(); 598 599 599 configure = new JButton();600 configure = new GLIButton(); 600 601 configure.setEnabled(false); 601 602 configure.setMnemonic(KeyEvent.VK_C); … … 662 663 plugin_pane = new JPanel(); 663 664 664 remove = new JButton();665 remove = new GLIButton(); 665 666 remove.setEnabled(false); 666 667 remove.setMnemonic(KeyEvent.VK_R); -
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r6051 r6318 45 45 import org.greenstone.gatherer.gui.DoubleImageButton; 46 46 import org.greenstone.gatherer.gui.GComboBox; 47 import org.greenstone.gatherer.gui.GLIButton; 47 48 import org.greenstone.gatherer.msm.MSMUtils; 48 49 import org.greenstone.gatherer.util.Utility; … … 219 220 220 221 JPanel button_panel = new JPanel(); 221 add_button = new JButton();222 add_button = new GLIButton(); 222 223 add_button.setEnabled(false); 223 224 add_button.setMnemonic(KeyEvent.VK_A); 224 225 Dictionary.registerBoth(add_button, "CDM.SearchTypeManager.Add", "CDM.SearchTypeManager.Add_Tooltip"); 225 226 226 remove_button = new JButton();227 remove_button = new GLIButton(); 227 228 remove_button.setEnabled(false); 228 229 remove_button.setMnemonic(KeyEvent.VK_R); -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java
r5903 r6318 40 40 import org.greenstone.gatherer.cdm.Subcollection; 41 41 import org.greenstone.gatherer.cdm.SubcollectionIndex; 42 import org.greenstone.gatherer.gui.GLIButton; 42 43 import org.greenstone.gatherer.msm.ElementWrapper; 43 44 import org.greenstone.gatherer.util.ExclusiveListSelectionListener; … … 223 224 JPanel button_pane = new JPanel(); 224 225 225 add_index_button = new JButton();226 add_index_button = new GLIButton(); 226 227 add_index_button.setMnemonic(KeyEvent.VK_A); 227 228 add_index_button.setEnabled(false); 228 229 Dictionary.registerBoth(add_index_button, "CDM.SubcollectionIndexManager.Add_Subindex", "CDM.SubcollectionIndexManager.Add_Subindex_Tooltip"); 229 230 230 clear_default_button = new JButton();231 clear_default_button = new GLIButton(); 231 232 clear_default_button.setMnemonic(KeyEvent.VK_C); 232 233 clear_default_button.setEnabled(default_index != null); … … 247 248 default_value_field.setEditable(false); 248 249 249 remove_index_button = new JButton();250 remove_index_button = new GLIButton(); 250 251 remove_index_button.setMnemonic(KeyEvent.VK_R); 251 252 remove_index_button.setEnabled(false); 252 253 Dictionary.registerBoth(remove_index_button, "CDM.SubcollectionIndexManager.Remove_Subindex", "CDM.SubcollectionIndexManager.Remove_Subindex_Tooltip"); 253 254 254 set_default_button = new JButton();255 set_default_button = new GLIButton(); 255 256 set_default_button.setMnemonic(KeyEvent.VK_S); 256 257 set_default_button.setEnabled(false); -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r5785 r6318 43 43 import org.greenstone.gatherer.cdm.DOMProxyListModel; 44 44 import org.greenstone.gatherer.cdm.Subcollection; 45 import org.greenstone.gatherer.gui.GLIButton; 45 46 import org.greenstone.gatherer.gui.NonWhitespaceField; 46 47 import org.greenstone.gatherer.msm.ElementWrapper; … … 192 193 193 194 JPanel button_pane_3 = new JPanel(); 194 add_button = new JButton();195 add_button = new GLIButton(); 195 196 add_button.setMnemonic(KeyEvent.VK_A); 196 197 add_button.setEnabled(false); 197 198 Dictionary.registerBoth(add_button, "CDM.SubcollectionManager.Add", "CDM.SubcollectionManager.Add_Tooltip"); 198 remove_button = new JButton();199 remove_button = new GLIButton(); 199 200 remove_button.setMnemonic(KeyEvent.VK_R); 200 201 remove_button.setEnabled(false); 201 202 Dictionary.registerBoth(remove_button, "CDM.SubcollectionManager.Remove", "CDM.SubcollectionManager.Remove_Tooltip"); 202 update_button = new JButton();203 update_button = new GLIButton(); 203 204 update_button.setMnemonic(KeyEvent.VK_U); 204 205 update_button.setEnabled(false); -
trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java
r5901 r6318 42 42 import org.greenstone.gatherer.cdm.LanguageListCellRenderer; 43 43 import org.greenstone.gatherer.cdm.SubcollectionIndex; 44 import org.greenstone.gatherer.gui.GLIButton; 44 45 45 46 /** This class provides a graphical interface to allow a user to quickly and conviently (ie all in one place) translate the text fragments associated with general metadata and indexes into each of the assigned languages in the collection. It should provide clear controls for the editing of these text fragments, plus clear indicate what languages still need further translation, which it will do through a combination of coloring and other visual indicators. … … 260 261 261 262 JPanel button_pane = new JPanel(); 262 add_button = new JButton();263 add_button = new GLIButton(); 263 264 add_button.setEnabled(false); 264 265 add_button.setMnemonic(KeyEvent.VK_A); 265 266 Dictionary.registerBoth(add_button, "CDM.TranslationManager.Add", "CDM.TranslationManager.Add_Tooltip"); 266 replace_button = new JButton();267 replace_button = new GLIButton(); 267 268 replace_button.setEnabled(false); 268 269 replace_button.setMnemonic(KeyEvent.VK_C); 269 270 Dictionary.registerBoth(replace_button, "CDM.TranslationManager.Replace", "CDM.TranslationManager.Replace_Tooltip"); 270 remove_button = new JButton();271 remove_button = new GLIButton(); 271 272 remove_button.setEnabled(false); 272 273 remove_button.setMnemonic(KeyEvent.VK_R); -
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r6146 r6318 46 46 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 47 47 import org.greenstone.gatherer.collection.Collection; 48 import org.greenstone.gatherer.gui.GLIButton; 48 49 import org.greenstone.gatherer.gui.ModalDialog; 49 50 import org.greenstone.gatherer.gui.SimpleMenuBar; … … 95 96 public DeleteCollectionPrompt() { 96 97 super(Gatherer.g_man); 97 close_button = new JButton();98 close_button = new GLIButton(); 98 99 close_button.setMnemonic(KeyEvent.VK_C); 99 100 Dictionary.setBoth(close_button, "General.Close", "General.Close_Tooltip"); … … 110 111 Dictionary.setText(list_label, "DeleteCollectionPrompt.Collection_List"); 111 112 list_model = new DefaultListModel(); 112 ok_button = new JButton();113 ok_button = new GLIButton(); 113 114 ok_button.setMnemonic(KeyEvent.VK_D); 114 115 Dictionary.setBoth(ok_button, "DeleteCollectionPrompt.Delete", "DeleteCollectionPrompt.Delete_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/collection/ExportCollectionPrompt.java
r6149 r6318 49 49 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 50 50 import org.greenstone.gatherer.collection.Collection; 51 import org.greenstone.gatherer.gui.GLIButton; 51 52 import org.greenstone.gatherer.gui.ModalDialog; 52 53 import org.greenstone.gatherer.gui.SimpleMenuBar; … … 114 115 public ExportCollectionPrompt() { 115 116 super(Gatherer.g_man, true); 116 cancel_button = new JButton();117 cancel_button = new GLIButton(); 117 118 cancel_button.setMnemonic(KeyEvent.VK_C); 118 119 Dictionary.setBoth(cancel_button, "General.Close", "General.Close_Tooltip"); … … 138 139 list_label = new JLabel(); 139 140 Dictionary.setText(list_label, "DeleteCollectionPrompt.Collection_List"); 140 ok_button = new JButton();141 ok_button = new GLIButton(); 141 142 ok_button.setMnemonic(KeyEvent.VK_D); 142 143 Dictionary.setBoth(ok_button, "ExportCollectionPrompt.Export", "ExportCollectionPrompt.Export_Tooltip"); … … 545 546 546 547 JPanel button_pane = new JPanel(); 547 JButton close_button = new JButton("Close"); 548 JButton close_button = new GLIButton("Close"); 549 close_button.setMnemonic(KeyEvent.VK_C); 548 550 close_button.addActionListener(new CloseButtonListener()); 549 551 -
trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionBox.java
r5581 r6318 42 42 import org.greenstone.gatherer.Dictionary; 43 43 import org.greenstone.gatherer.Gatherer; 44 import org.greenstone.gatherer.gui.GLIButton; 44 45 45 46 /** Provides a prompt allowing the user some choice in whether a collection saves. */ … … 115 116 content_pane.add(button_pane); 116 117 // We add both mnemonics and key listener so that the 'y' of yes is underlined, but pressing just [Y] (rather than [CTL]-[Y]) performs a systematic click. 117 yes = new JButton();118 yes = new GLIButton(); 118 119 yes.addActionListener(this); 119 120 KeyListenerImpl key_listener = new KeyListenerImpl(); … … 122 123 Dictionary.setBoth(yes, "General.Yes", "General.Yes_Tooltip"); 123 124 button_pane.add(yes); 124 no = new JButton();125 no = new GLIButton(); 125 126 no.addActionListener(this); 126 127 no.addKeyListener(key_listener); … … 128 129 Dictionary.setBoth(no, "General.No", "General.No_Tooltip"); 129 130 button_pane.add(no); 130 cancel = new JButton();131 cancel = new GLIButton(); 131 132 cancel.addActionListener(this); 132 133 cancel.addKeyListener(key_listener); -
trunk/gli/src/org/greenstone/gatherer/gui/AboutDialog.java
r6206 r6318 42 42 import org.greenstone.gatherer.Dictionary; 43 43 import org.greenstone.gatherer.Gatherer; 44 import org.greenstone.gatherer.gui.GLIButton; 44 45 import org.greenstone.gatherer.util.Utility; 45 46 … … 84 85 85 86 JPanel button_pane = new JPanel(); 86 close_button = new JButton(); 87 close_button = new GLIButton(); 88 close_button.setMnemonic(KeyEvent.VK_C); 87 89 Dictionary.setBoth(close_button, "General.Close", "General.Close_Tooltip"); 88 90 -
trunk/gli/src/org/greenstone/gatherer/gui/BrowsingPane.java
r5571 r6318 45 45 import org.greenstone.gatherer.Dictionary; 46 46 import org.greenstone.gatherer.Gatherer; 47 import org.greenstone.gatherer.gui.GLIButton; 47 48 import org.greenstone.gatherer.util.GURL; 48 49 import org.greenstone.gatherer.util.Utility; … … 87 88 JPanel left_button_pane = new JPanel(); 88 89 89 back_button = new JButton(Utility.getImage("back.gif"));90 back_button = new GLIButton(Utility.getImage("back.gif")); 90 91 back_button.setEnabled(false); 92 back_button.setMnemonic(KeyEvent.VK_BACK_SPACE); 91 93 Dictionary.registerTooltip(back_button, "Browser.Back_Tooltip"); 92 94 93 // refresh_button = new JButton(Utility.getImage("reload.gif"));95 // refresh_button = new GLIButton(Utility.getImage("reload.gif")); 94 96 // refresh_button.setEnabled(false); 97 // refresh_button.setMnemonic(KeyEvent.VK_R); 95 98 // Dictionary.registerTooltip(refresh_button, "Browser.Reload"); 96 99 97 bookmarks_button = new JButton(Utility.getImage("bookmark.gif"));100 bookmarks_button = new GLIButton(Utility.getImage("bookmark.gif")); 98 101 bookmarks_button.setEnabled(false); 102 bookmarks_button.setMnemonic(KeyEvent.VK_M); 99 103 Dictionary.registerTooltip(bookmarks_button, "Browser.Bookmarks"); 100 104 101 home_button = new JButton(Utility.getImage("home.gif")); 105 home_button = new GLIButton(Utility.getImage("home.gif")); 106 home_button.setMnemonic(KeyEvent.VK_H); 102 107 Dictionary.registerTooltip(home_button, "Browser.Home_Tooltip"); 103 108 … … 107 112 108 113 JPanel right_button_pane = new JPanel(); 109 go_button = new JButton(Utility.getImage("go.gif")); 114 go_button = new GLIButton(Utility.getImage("go.gif")); 115 go_button.setMnemonic(KeyEvent.VK_ENTER); 110 116 Dictionary.registerTooltip(go_button, "Browser.Go_Tooltip"); 111 117 112 stop_button = new JButton(Utility.getImage("stop.gif"));118 stop_button = new GLIButton(Utility.getImage("stop.gif")); 113 119 stop_button.setEnabled(false); 120 stop_button.setMnemonic(KeyEvent.VK_S); 114 121 Dictionary.registerTooltip(stop_button, "Browser.Stop_Tooltip"); 115 122 116 forward_button = new JButton(Utility.getImage("forward.gif"));123 forward_button = new GLIButton(Utility.getImage("forward.gif")); 117 124 forward_button.setEnabled(false); 125 forward_button.setMnemonic(KeyEvent.VK_F); 118 126 Dictionary.registerTooltip(forward_button, "Browser.Forward_Tooltip"); 119 127 -
trunk/gli/src/org/greenstone/gatherer/gui/CollectionPane.java
r6219 r6318 52 52 import org.greenstone.gatherer.gui.Filter; 53 53 import org.greenstone.gatherer.gui.GComboBox; 54 import org.greenstone.gatherer.gui.GLIButton; 54 55 import org.greenstone.gatherer.gui.tree.DragTree; 55 56 import org.greenstone.gatherer.gui.tree.WorkspaceTree; … … 138 139 139 140 // Create components. 140 stop_action = new JButton();141 stop_action = new GLIButton(); 141 142 stop_action.addActionListener(this); 142 143 stop_action.setEnabled(false); 144 stop_action.setMnemonic(KeyEvent.VK_S); 143 145 file_queue.registerStopButton(stop_action); 144 146 Dictionary.registerBoth(stop_action, "Collection.Stop", "Collection.Stop_Tooltip"); 145 147 146 new_folder = new JButton(Utility.getImage("folder.gif"));148 new_folder = new GLIButton(Utility.getImage("folder.gif")); 147 149 new_folder.addActionListener(this); 148 150 new_folder.setEnabled(false); 149 151 new_folder.setMinimumSize(MIN_SIZE); 152 new_folder.setMnemonic(KeyEvent.VK_N); 150 153 new_folder.setPreferredSize(MIN_SIZE); 151 154 Dictionary.registerTooltip(new_folder, "Collection.New_Folder_Tooltip"); … … 735 738 name_field = new JTextField(file.getName()); 736 739 JPanel button_pane = new JPanel(); 737 ok_button = new JButton();740 ok_button = new GLIButton(); 738 741 ok_button.setEnabled(name_field.getText().length() > 0); 742 ok_button.setMnemonic(KeyEvent.VK_O); 739 743 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 740 cancel_button = new JButton(); 744 cancel_button = new GLIButton(); 745 cancel_button.setMnemonic(KeyEvent.VK_C); 741 746 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip"); 742 747 -
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r6180 r6318 49 49 import org.greenstone.gatherer.collection.BuildOptions; 50 50 import org.greenstone.gatherer.collection.Collection; 51 import org.greenstone.gatherer.gui.GLIButton; 51 52 import org.greenstone.gatherer.gui.OptionsPane; 52 53 import org.greenstone.gatherer.shell.GBasicProgressMonitor; … … 205 206 206 207 // Buttons 207 build_button = new JButton();208 build_button = new GLIButton(); 208 209 build_button.addActionListener(new BuildButtonListener()); 210 build_button.setMnemonic(KeyEvent.VK_B); 209 211 build_button.setPreferredSize(BUTTON_SIZE); 210 212 Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip"); 211 213 212 cancel_button = new JButton();214 cancel_button = new GLIButton(); 213 215 cancel_button.addActionListener(new CancelButtonListener()); 214 216 cancel_button.setEnabled(false); 217 cancel_button.setMnemonic(KeyEvent.VK_C); 215 218 cancel_button.setPreferredSize(BUTTON_SIZE); 216 219 Dictionary.registerBoth(cancel_button, "CreatePane.Cancel_Build", "CreatePane.Cancel_Build_Tooltip"); 217 220 218 preview_button = new JButton();221 preview_button = new GLIButton(); 219 222 preview_button.addActionListener(new PreviewButtonListener()); 220 223 preview_button.setEnabled(false); 224 preview_button.setMnemonic(KeyEvent.VK_P); 221 225 preview_button.setPreferredSize(BUTTON_SIZE); 222 226 Dictionary.registerBoth(preview_button, "CreatePane.Preview_Collection", "CreatePane.Preview_Collection_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/DoubleImageButton.java
r5166 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: John Thompson, Greenstone Digital Library, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 1999 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.gui; 2 38 3 39 import java.awt.*; 4 40 import javax.swing.*; 41 import org.greenstone.gatherer.util.Utility; 5 42 6 43 /** A button that allows for an icon at both the left and right sides. */ … … 17 54 public DoubleImageButton(String title, ImageIcon enabled_icon, ImageIcon disabled_icon) { 18 55 super(title); 19 56 setOpaque(!Utility.isMac()); 20 57 setPreferredSize(SIZE); 21 58 -
trunk/gli/src/org/greenstone/gatherer/gui/EditorDialog.java
r5718 r6318 42 42 import org.greenstone.gatherer.Dictionary; 43 43 import org.greenstone.gatherer.Gatherer; 44 import org.greenstone.gatherer.gui.GLIButton; 44 45 import org.greenstone.gatherer.gui.SimpleMenuBar; 45 46 import org.greenstone.gatherer.gui.ModalDialog; … … 98 99 Dictionary.setTooltip(text, "MetaEdit.Value_Field_Tooltip"); 99 100 100 cancel = new JButton();101 cancel = new GLIButton(); 101 102 cancel.setMnemonic(KeyEvent.VK_C); 102 103 Dictionary.setBoth(cancel, "General.Cancel", "General.Pure_Cancel_Tooltip"); 103 ok = new JButton();104 ok = new GLIButton(); 104 105 ok.setMnemonic(KeyEvent.VK_O); 105 106 Dictionary.setBoth(ok, "General.OK", "General.OK_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/ExternalCollectionPrompt.java
r5795 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: John Thompson, Greenstone Project, NZDL, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 2003 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.gui; 2 38 … … 11 47 import org.greenstone.gatherer.checklist.CheckList; 12 48 import org.greenstone.gatherer.checklist.Entry; 49 import org.greenstone.gatherer.gui.GLIButton; 13 50 import org.greenstone.gatherer.gui.SimpleMenuBar; 14 51 import org.greenstone.gatherer.gui.ModalDialog; … … 80 117 */ 81 118 JPanel button_pane = new JPanel(); 82 JButton ok_button = new JButton();119 JButton ok_button = new GLIButton(); 83 120 ok_button.setMnemonic(KeyEvent.VK_O); 84 121 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 85 JButton cancel_button = new JButton();122 JButton cancel_button = new GLIButton(); 86 123 cancel_button.setMnemonic(KeyEvent.VK_C); 87 124 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/FileAssociationDialog.java
r6253 r6318 49 49 import org.greenstone.gatherer.file.FileAssociationManager; 50 50 import org.greenstone.gatherer.gui.GComboBox; 51 import org.greenstone.gatherer.gui.GLIButton; 51 52 import org.greenstone.gatherer.gui.ModalDialog; 52 53 import org.greenstone.gatherer.gui.NonWhitespaceField; … … 120 121 JPanel command_pane = new JPanel(); 121 122 command_field = new JTextField(); 122 browse_button = new JButton();123 browse_button = new GLIButton(); 123 124 browse_button.setEnabled(!Utility.isMac()); 124 125 browse_button.setMnemonic(KeyEvent.VK_B); 125 browse_button.setOpaque(false); 126 127 JPanel button_pane = new JPanel(); 126 128 127 128 JPanel button_pane = new JPanel(); 129 add_button = new JButton(); 129 add_button = new GLIButton(); 130 130 add_button.setEnabled(false); 131 131 add_button.setMnemonic(KeyEvent.VK_A); 132 add_button.setOpaque(false); 133 replace_button = new JButton();132 133 replace_button = new GLIButton(); 134 134 replace_button.setEnabled(false); 135 135 replace_button.setMnemonic(KeyEvent.VK_P); 136 replace_button.setOpaque(false); 137 remove_button = new JButton();136 137 remove_button = new GLIButton(); 138 138 remove_button.setEnabled(false); 139 139 remove_button.setMnemonic(KeyEvent.VK_R); 140 remove_button.setOpaque(false); 141 close_button = new JButton();140 141 close_button = new GLIButton(); 142 142 close_button.setMnemonic(KeyEvent.VK_C); 143 close_button.setOpaque(false);144 143 145 144 // Connection -
trunk/gli/src/org/greenstone/gatherer/gui/GProgressBar.java
r5595 r6318 44 44 import org.greenstone.gatherer.Gatherer; 45 45 import org.greenstone.gatherer.collection.Job; 46 import org.greenstone.gatherer.gui.GLIButton; 46 47 import org.greenstone.gatherer.util.Utility; 47 48 … … 101 102 inner_pane.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); 102 103 103 action = new JButton(Utility.getImage("vcrplay.gif"));104 action = new GLIButton(Utility.getImage("vcrplay.gif")); 104 105 action.addActionListener(this); 105 106 action.addActionListener(owner); 107 action.setMnemonic(KeyEvent.VK_ENTER); 106 108 Dictionary.setTooltip(action, "Mirroring.Job.Start_Tooltip"); 107 109 … … 126 128 center_pane.add(results_status); 127 129 128 cancel = new JButton(Utility.getImage("vcrstop.gif"));130 cancel = new GLIButton(Utility.getImage("vcrstop.gif")); 129 131 cancel.addActionListener(owner); 130 132 cancel.addActionListener(this); 133 cancel.setMnemonic(KeyEvent.VK_BACK_SPACE); 131 134 Dictionary.setTooltip(cancel, "Mirroring.Job.Stop_Tooltip"); 132 135 -
trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java
r6090 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: John Thompson, Greenstone Digital Library, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 1999 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.gui; 2 38 … … 7 43 import org.greenstone.gatherer.Dictionary; 8 44 import org.greenstone.gatherer.Gatherer; 45 import org.greenstone.gatherer.gui.GLIButton; 9 46 import org.greenstone.gatherer.gui.SimpleMenuBar; 10 47 import org.greenstone.gatherer.gui.ModalDialog; … … 92 129 Dictionary.setText(central_label, "LockFileDialog.Lockfile_Message_Two"); 93 130 JPanel button_pane = new JPanel(); 94 ok_button = new JButton();131 ok_button = new GLIButton(); 95 132 ok_button.setMnemonic(KeyEvent.VK_O); 96 133 Dictionary.setBoth(ok_button, "General.OK", "LockFileDialog.OK_Tooltip"); 97 cancel_button = new JButton();134 cancel_button = new GLIButton(); 98 135 cancel_button.setMnemonic(KeyEvent.VK_C); 99 136 Dictionary.setBoth(cancel_button, "General.Cancel", "LockFileDialog.Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java
r6216 r6318 51 51 import org.greenstone.gatherer.gui.Filter; 52 52 import org.greenstone.gatherer.gui.GComboBox; 53 import org.greenstone.gatherer.gui.GLIButton; 53 54 import org.greenstone.gatherer.gui.MetaEditPrompt; 54 55 import org.greenstone.gatherer.gui.TransformCharacterTextField; … … 147 148 this.tree_sync = tree_sync; 148 149 149 add = new JButton();150 add = new GLIButton(); 150 151 add.addActionListener(this); 151 152 add.setEnabled(false); … … 154 155 Dictionary.registerBoth(add, "MetaEdit.Accumulate", "MetaEdit.Accumulate_Tooltip"); 155 156 156 update = new JButton();157 update = new GLIButton(); 157 158 update.addActionListener(this); 158 159 update.setEnabled(false); … … 161 162 Dictionary.registerBoth(update, "MetaEdit.Overwrite", "MetaEdit.Overwrite_Tooltip"); 162 163 163 remove = new JButton();164 remove = new GLIButton(); 164 165 remove.addActionListener(this); 165 166 remove.setEnabled(false); … … 168 169 Dictionary.registerBoth(remove, "MetaEdit.Remove", "MetaEdit.Remove_Tooltip"); 169 170 170 expand = new JButton();171 expand = new GLIButton(); 171 172 expand.addActionListener(this); 172 173 expand.setEnabled(true); … … 175 176 Dictionary.registerBoth(expand, "MetaEdit.Expand", "MetaEdit.Expand_Tooltip"); 176 177 177 expand_for_extracted = new JButton();178 expand_for_extracted = new GLIButton(); 178 179 expand_for_extracted.addActionListener(this); 179 180 expand_for_extracted.setEnabled(true); -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPrompt.java
r5536 r6318 33 33 import org.greenstone.gatherer.Dictionary; 34 34 import org.greenstone.gatherer.Gatherer; 35 import org.greenstone.gatherer.gui.GLIButton; 35 36 import org.greenstone.gatherer.gui.SimpleMenuBar; 36 37 import org.greenstone.gatherer.gui.ModalDialog; … … 128 129 JPanel buttons_pane = new JPanel(); 129 130 130 accumulate = new JButton();131 accumulate = new GLIButton(); 131 132 accumulate.setEnabled(type == ADD_PROMPT); 132 133 accumulate.setMnemonic(KeyEvent.VK_A); 133 134 Dictionary.setBoth(accumulate, "MetaEdit.Accumulate", "MetaEdit.Accumulate_Tooltip"); 134 135 135 accumulate_all = new JButton();136 accumulate_all = new GLIButton(); 136 137 accumulate_all.setEnabled(type == ADD_PROMPT && multiple_selection); 137 138 accumulate_all.setMnemonic(KeyEvent.VK_L); 138 139 Dictionary.setBoth(accumulate_all, "MetaEditPrompt.Accumulate_All", "MetaEditPrompt.Accumulate_All_Tooltip"); 139 140 140 overwrite = new JButton();141 overwrite = new GLIButton(); 141 142 overwrite.setEnabled(type == UPDATE_PROMPT); 142 143 overwrite.setMnemonic(KeyEvent.VK_R); 143 144 Dictionary.setBoth(overwrite, "MetaEdit.Overwrite", "MetaEdit.Overwrite_Tooltip"); 144 145 145 overwrite_all = new JButton();146 overwrite_all = new GLIButton(); 146 147 overwrite_all.setEnabled(type == UPDATE_PROMPT && multiple_selection); 147 148 overwrite_all.setMnemonic(KeyEvent.VK_P); 148 149 Dictionary.setBoth(overwrite_all, "MetaEditPrompt.Overwrite_All", "MetaEditPrompt.Overwrite_All_Tooltip"); 149 150 150 remove = new JButton();151 remove = new GLIButton(); 151 152 remove.setEnabled(type == REMOVE_PROMPT); 152 153 remove.setMnemonic(KeyEvent.VK_R); 153 154 Dictionary.setBoth(remove, "MetaEdit.Remove", "MetaEdit.Remove_Tooltip"); 154 155 155 remove_all = new JButton();156 remove_all = new GLIButton(); 156 157 remove_all.setEnabled(type == REMOVE_PROMPT && multiple_selection); 157 158 remove_all.setMnemonic(KeyEvent.VK_A); 158 159 Dictionary.setBoth(remove_all, "MetaEditPrompt.Remove_All", "MetaEditPrompt.Remove_All_Tooltip"); 159 160 160 skip = new JButton();161 skip = new GLIButton(); 161 162 skip.setEnabled(multiple_selection); 162 163 skip.setMnemonic(KeyEvent.VK_S); 163 164 Dictionary.setBoth(skip, "MetaEditPrompt.Skip", "MetaEditPrompt.Skip_Tooltip"); 164 165 165 cancel = new JButton();166 cancel = new GLIButton(); 166 167 cancel.setMnemonic(KeyEvent.VK_C); 167 168 Dictionary.setBoth(cancel, "General.Cancel", "General.Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/MirrorPane.java
r5869 r6318 49 49 import org.greenstone.gatherer.WGet; 50 50 import org.greenstone.gatherer.file.FileNode; 51 import org.greenstone.gatherer.gui.GLIButton; 51 52 import org.greenstone.gatherer.util.Utility; 52 53 … … 130 131 131 132 JPanel button_pane = new JPanel(); 132 download_button = new JButton(); 133 download_button = new GLIButton(); 134 download_button.setMnemonic(KeyEvent.VK_ENTER); 133 135 Dictionary.registerBoth(download_button, "Mirroring.Download", "Mirroring.Download_Tooltip"); 134 136 -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r6168 r6318 6 6 * University of Waikato, New Zealand. 7 7 * 8 * Author: John Thompson, Greenstone Digital Library, University of Waikato8 * Author: John Thompson, Greenstone Project, NZDL, University of Waikato 9 9 * 10 * Copyright (C) 1999New Zealand Digital Library Project10 * Copyright (C) 2003 New Zealand Digital Library Project 11 11 * 12 12 * This program is free software; you can redistribute it and/or modify … … 37 37 import org.greenstone.gatherer.Gatherer; 38 38 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 39 import org.greenstone.gatherer.gui.GLIButton; 39 40 import org.greenstone.gatherer.gui.SimpleMenuBar; 40 41 import org.greenstone.gatherer.gui.ModalDialog; … … 178 179 179 180 JPanel button_pane = new JPanel(); 180 create_button = new JButton();181 create_button = new GLIButton(); 181 182 create_button.setMnemonic(KeyEvent.VK_O); 182 183 Dictionary.setBoth(create_button, "General.OK", "General.OK_Tooltip"); 183 JButton cancel_button = new JButton();184 JButton cancel_button = new GLIButton(); 184 185 cancel_button.setMnemonic(KeyEvent.VK_C); 185 186 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionMetadataPrompt.java
r6162 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * Author: John Thompson, Greenstone Digital Library, University of Waikato 9 * 10 * Copyright (C) 1999 New Zealand Digital Library Project 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 2 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 *######################################################################## 26 */ 1 27 package org.greenstone.gatherer.gui; 2 28 … … 11 37 import org.greenstone.gatherer.checklist.CheckList; 12 38 import org.greenstone.gatherer.checklist.Entry; 39 import org.greenstone.gatherer.gui.GLIButton; 13 40 import org.greenstone.gatherer.gui.SimpleMenuBar; 14 41 import org.greenstone.gatherer.gui.ModalDialog; … … 84 111 85 112 JPanel button_pane = new JPanel(); 86 JButton ok_button = new JButton();113 JButton ok_button = new GLIButton(); 87 114 ok_button.setMnemonic(KeyEvent.VK_O); 88 115 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 89 JButton cancel_button = new JButton();116 JButton cancel_button = new GLIButton(); 90 117 cancel_button.setMnemonic(KeyEvent.VK_C); 91 118 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/NewFolderPrompt.java
r5749 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: John Thompson, Greenstone Digital Library, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 1999 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.gui; 2 38 … … 8 44 import org.greenstone.gatherer.Gatherer; 9 45 import org.greenstone.gatherer.file.FileNode; 46 import org.greenstone.gatherer.gui.GLIButton; 10 47 11 48 public class NewFolderPrompt … … 55 92 56 93 JPanel button_pane = new JPanel(); 57 ok_button = new JButton(); 94 ok_button = new GLIButton(); 95 ok_button.setMnemonic(KeyEvent.VK_O); 58 96 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 59 cancel_button = new JButton(); 97 cancel_button = new GLIButton(); 98 cancel_button.setMnemonic(KeyEvent.VK_C); 60 99 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 61 100 -
trunk/gli/src/org/greenstone/gatherer/gui/NewMetaSetPrompt.java
r5795 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: Katherine Don, Greenstone Digital Library, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 1999 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.gui; 2 38 … … 7 43 import javax.swing.*; 8 44 import javax.swing.event.*; 9 import javax.swing.*;45 import javax.swing.*; 10 46 import javax.swing.event.*; 11 47 import javax.swing.text.*; … … 14 50 import org.greenstone.gatherer.checklist.CheckList; 15 51 import org.greenstone.gatherer.checklist.Entry; 52 import org.greenstone.gatherer.gui.GLIButton; 16 53 import org.greenstone.gatherer.gui.SimpleMenuBar; 17 54 import org.greenstone.gatherer.gui.ModalDialog; … … 78 115 button_pane.setOpaque(false); 79 116 80 JButton ok_button = new JButton(); 117 JButton ok_button = new GLIButton(); 118 ok_button.setMnemonic(KeyEvent.VK_O); 81 119 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 82 120 ok_button.setEnabled(false); 83 JButton cancel_button = new JButton(); 121 JButton cancel_button = new GLIButton(); 122 cancel_button.setMnemonic(KeyEvent.VK_C); 84 123 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 85 124 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); -
trunk/gli/src/org/greenstone/gatherer/gui/PreviewPane.java
r6051 r6318 45 45 import org.greenstone.gatherer.collection.Collection; 46 46 import org.greenstone.gatherer.Gatherer; 47 import org.greenstone.gatherer.gui.GLIButton; 47 48 import org.greenstone.gatherer.util.GURL; 48 49 import org.greenstone.gatherer.util.Utility; … … 70 71 71 72 // Create components 72 back = new JButton(Utility.getImage("back.gif"));73 back = new GLIButton(Utility.getImage("back.gif")); 73 74 back.addActionListener(new BackListener()); 74 75 back.setEnabled(false); 76 back.setMnemonic(KeyEvent.VK_BACK_SPACE); 75 77 Dictionary.registerBoth(back, "Browser.Back", "Browser.Back_Tooltip"); 76 78 77 home = new JButton(Utility.getImage("home.gif"));79 home = new GLIButton(Utility.getImage("home.gif")); 78 80 home.addActionListener(new HomeListener()); 79 81 home.setEnabled(false); 82 home.setMnemonic(KeyEvent.VK_H); 80 83 Dictionary.registerBoth(home, "Browser.Home", "Browser.Home_Tooltip"); 81 84 82 forward = new JButton(Utility.getImage("forward.gif"));85 forward = new GLIButton(Utility.getImage("forward.gif")); 83 86 forward.addActionListener(new ForwardListener()); 84 87 forward.setEnabled(false); 88 forward.setMnemonic(KeyEvent.VK_F); 85 89 Dictionary.registerBoth(forward, "Browser.Forward", "Browser.Forward_Tooltip"); 86 90 87 reload = new JButton(Utility.getImage("reload.gif"));91 reload = new GLIButton(Utility.getImage("reload.gif")); 88 92 reload.addActionListener(new ReloadListener()); 89 93 reload.setEnabled(false); 94 reload.setMnemonic(KeyEvent.VK_R); 90 95 Dictionary.registerBoth(reload, "Browser.Reload", "Browser.Reload_Tooltip"); 91 96 -
trunk/gli/src/org/greenstone/gatherer/gui/SimpleOpenCollectionDialog.java
r6051 r6318 36 36 import org.greenstone.gatherer.Gatherer; 37 37 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 38 import org.greenstone.gatherer.gui.GLIButton; 38 39 import org.greenstone.gatherer.gui.ModalDialog; 39 40 import org.greenstone.gatherer.util.StaticStrings; … … 88 89 89 90 JPanel button_pane = new JPanel(); 90 open_button = new JButton();91 open_button = new GLIButton(); 91 92 open_button.setEnabled(false); 92 93 open_button.setMnemonic(KeyEvent.VK_O); 93 94 Dictionary.setBoth(open_button, "OpenCollectionDialog.Open", "OpenCollectionDialog.Open_Tooltip"); 94 advanced_button = new JButton();95 advanced_button = new GLIButton(); 95 96 advanced_button.setMnemonic(KeyEvent.VK_B); 96 97 Dictionary.setBoth(advanced_button, "OpenCollectionDialog.Browse", "OpenCollectionDialog.Browse_Tooltip"); 97 cancel_button = new JButton();98 cancel_button = new GLIButton(); 98 99 cancel_button.setMnemonic(KeyEvent.VK_C); 99 100 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java
r6221 r6318 43 43 import org.greenstone.gatherer.Dictionary; 44 44 import org.greenstone.gatherer.Gatherer; 45 import org.greenstone.gatherer.gui.GLIButton; 45 46 import org.greenstone.gatherer.gui.metaaudit.Autofilter; 46 47 import org.greenstone.gatherer.gui.metaaudit.Filter; … … 181 182 } 182 183 JPanel button_pane = new JPanel(); 183 cancel_button = new JButton();184 cancel_button = new GLIButton(); 184 185 cancel_button.setMnemonic(KeyEvent.VK_C); 185 186 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 186 remove_button = new JButton();187 remove_button = new GLIButton(); 187 188 remove_button.setMnemonic(KeyEvent.VK_R); 188 189 Dictionary.setBoth(remove_button, "Autofilter.Remove", "Autofilter.Remove_Tooltip"); 189 set_button = new JButton();190 set_button = new GLIButton(); 190 191 set_button.setMnemonic(KeyEvent.VK_S); 191 192 Dictionary.setBoth(set_button, "Autofilter.Set", "Autofilter.Set_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java
r5564 r6318 46 46 import org.greenstone.gatherer.file.FileNode; 47 47 import org.greenstone.gatherer.util.TreeSynchronizer; 48 import org.greenstone.gatherer.gui.GLIButton; 48 49 import org.greenstone.gatherer.gui.SimpleMenuBar; 49 50 import org.greenstone.gatherer.gui.ModalDialog; … … 114 115 JPanel button_pane = new JPanel(); 115 116 116 JButton close_button = new JButton();117 JButton close_button = new GLIButton(); 117 118 close_button.setMnemonic(KeyEvent.VK_C); 118 119 Dictionary.registerBoth(close_button, "MetaAudit.Close", "MetaAudit.Close_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java
r6215 r6318 49 49 import org.greenstone.gatherer.gui.ComboArea; 50 50 import org.greenstone.gatherer.gui.GComboBox; 51 import org.greenstone.gatherer.gui.GLIButton; 51 52 import org.greenstone.gatherer.gui.SmarterTable; 52 53 import org.greenstone.gatherer.gui.SmarterTree; … … 313 314 JPanel inner_button_pane = new JPanel(); 314 315 inner_button_pane.setOpaque(false); 315 add_attribute = new JButton(); 316 add_attribute = new GLIButton(); 317 add_attribute.setMnemonic(KeyEvent.VK_4); 316 318 Dictionary.setBoth(add_attribute, "MEM.Add", "MEM.Add_Attribute_Tooltip"); 317 add_element = new JButton(); 319 add_element = new GLIButton(); 320 add_element.setMnemonic(KeyEvent.VK_3); 318 321 Dictionary.setBoth(add_element, "MEM.Add", "MEM.Add_Element_Tooltip"); 319 add_file = new JButton(); 322 add_file = new GLIButton(); 323 add_file.setMnemonic(KeyEvent.VK_2); 320 324 Dictionary.setBoth(add_file, "MEM.Add", "MEM.Add_File_Tooltip"); 321 add_set = new JButton(); 325 add_set = new GLIButton(); 326 add_set.setMnemonic(KeyEvent.VK_1); 322 327 Dictionary.setBoth(add_set, "MEM.Add", "MEM.Add_Set_Tooltip"); 323 add_value = new JButton(); 328 add_value = new GLIButton(); 329 add_value.setMnemonic(KeyEvent.VK_5); 324 330 Dictionary.setBoth(add_value, "MEM.Add", "MEM.Add_Value_Tooltip"); 325 331 326 edit_attribute = new JButton(); 332 edit_attribute = new GLIButton(); 333 edit_attribute.setMnemonic(KeyEvent.VK_6); 327 334 Dictionary.setBoth(edit_attribute, "MEM.Edit", "MEM.Edit_Attribute_Tooltip"); 328 edit_value = new JButton(); 335 edit_value = new GLIButton(); 336 edit_value.setMnemonic(KeyEvent.VK_7); 329 337 Dictionary.setBoth(edit_value, "MEM.Edit", "MEM.Edit_Value_Tooltip"); 330 338 331 remove_attribute = new JButton(); 339 remove_attribute = new GLIButton(); 340 remove_attribute.setMnemonic(KeyEvent.VK_MINUS); 332 341 Dictionary.setBoth(remove_attribute, "MEM.Remove", "MEM.Remove_Attribute_Tooltip"); 333 remove_element = new JButton(); 342 remove_element = new GLIButton(); 343 remove_element.setMnemonic(KeyEvent.VK_0); 334 344 Dictionary.setBoth(remove_element, "MEM.Remove", "MEM.Remove_Element_Tooltip"); 335 remove_file = new JButton(); 345 remove_file = new GLIButton(); 346 remove_file.setMnemonic(KeyEvent.VK_9); 336 347 Dictionary.setBoth(remove_file, "MEM.Remove", "MEM.Remove_File_Tooltip"); 337 remove_set = new JButton(); 348 remove_set = new GLIButton(); 349 remove_set.setMnemonic(KeyEvent.VK_8); 338 350 Dictionary.setBoth(remove_set, "MEM.Remove", "MEM.Remove_Set_Tooltip"); 339 remove_value = new JButton(); 351 remove_value = new GLIButton(); 352 remove_value.setMnemonic(KeyEvent.VK_EQUALS); 340 353 Dictionary.setBoth(remove_value, "MEM.Remove", "MEM.Remove_Value_Tooltip"); 341 354 setControls(false, false, false, false, false, false, false, false, false, false, false, false); 342 355 343 close = new JButton(); 356 close = new GLIButton(); 357 close.setMnemonic(KeyEvent.VK_C); 344 358 Dictionary.setBoth(close, "General.Close", "General.Close_Tooltip"); 345 359 … … 616 630 JPanel button_pane = new JPanel(); 617 631 button_pane.setOpaque(false); 618 ok_button = new JButton(); 632 ok_button = new GLIButton(); 633 ok_button.setMnemonic(KeyEvent.VK_O); 619 634 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 620 cancel_button = new JButton(); 635 cancel_button = new GLIButton(); 636 cancel_button.setMnemonic(KeyEvent.VK_C); 621 637 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 622 638 … … 1013 1029 button_pane.setOpaque(false); 1014 1030 1015 ok_button = new JButton(); 1031 ok_button = new GLIButton(); 1032 ok_button.setMnemonic(KeyEvent.VK_O); 1016 1033 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 1017 cancel_button = new JButton(); 1034 cancel_button = new GLIButton(); 1035 cancel_button.setMnemonic(KeyEvent.VK_C); 1018 1036 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 1019 1037 … … 1150 1168 button_pane.setOpaque(false); 1151 1169 1152 ok_button = new JButton(); 1170 ok_button = new GLIButton(); 1171 ok_button.setMnemonic(KeyEvent.VK_O); 1153 1172 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 1154 cancel_button = new JButton(); 1173 cancel_button = new GLIButton(); 1174 cancel_button.setMnemonic(KeyEvent.VK_C); 1155 1175 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 1156 1176 … … 1275 1295 button_pane.setOpaque(false); 1276 1296 1277 ok_button = new JButton(); 1297 ok_button = new GLIButton(); 1298 ok_button.setMnemonic(KeyEvent.VK_O); 1278 1299 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 1279 cancel_button = new JButton(); 1300 cancel_button = new GLIButton(); 1301 cancel_button.setMnemonic(KeyEvent.VK_C); 1280 1302 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 1281 1303 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); … … 1404 1426 button_pane.setOpaque(false); 1405 1427 1406 ok_button = new JButton(); 1428 ok_button = new GLIButton(); 1429 ok_button.setMnemonic(KeyEvent.VK_O); 1407 1430 ok_button.setEnabled(false); 1408 1431 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 1409 cancel_button = new JButton(); 1432 cancel_button = new GLIButton(); 1433 cancel_button.setMnemonic(KeyEvent.VK_C); 1410 1434 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 1411 1435 TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button); -
trunk/gli/src/org/greenstone/gatherer/msm/ExportMDSPrompt.java
r5593 r6318 47 47 import org.greenstone.gatherer.msm.MetadataSetManager; 48 48 import org.greenstone.gatherer.util.Utility; 49 import org.greenstone.gatherer.gui.GLIButton; 49 50 import org.greenstone.gatherer.gui.SimpleMenuBar; 50 51 import org.greenstone.gatherer.gui.ModalDialog; … … 137 138 file_name = new JTextField(Utility.METADATA_DIR); 138 139 Dictionary.setTooltip(file_name, "MSMPrompt.Export_File_Tooltip"); 139 browse_button = new JButton(); 140 browse_button = new GLIButton(); 141 browse_button.setMnemonic(KeyEvent.VK_B); 140 142 Dictionary.setBoth(browse_button, "General.Browse", "General.Browse_Tooltip"); 141 143 142 144 JPanel button_pane = new JPanel(); 143 145 if(export) { 144 export_button = new JButton();146 export_button = new GLIButton(); 145 147 export_button.setEnabled(false); 146 148 export_button.setMnemonic(KeyEvent.VK_E); … … 148 150 } 149 151 else { 150 export_button = new JButton();152 export_button = new GLIButton(); 151 153 export_button.setEnabled(true); 152 154 export_button.setMnemonic(KeyEvent.VK_I); … … 154 156 } 155 157 156 cancel_button = new JButton();158 cancel_button = new GLIButton(); 157 159 cancel_button.setMnemonic(KeyEvent.VK_C); 158 160 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); -
trunk/gli/src/org/greenstone/gatherer/msm/GDMManager.java
r6259 r6318 46 46 import org.greenstone.gatherer.Gatherer; 47 47 import org.greenstone.gatherer.file.FileNode; 48 import org.greenstone.gatherer.gui.GLIButton; 48 49 import org.greenstone.gatherer.gui.MetaEditPrompt; 49 50 import org.greenstone.gatherer.msm.ElementWrapper; … … 131 132 documents_in_cache_combobox = new JComboBox(); 132 133 documents_in_cache_combobox.addItemListener(new DOMItemListener()); 133 JButton refresh_button = new JButton("Refresh Tree"); 134 JButton refresh_button = new GLIButton("Refresh Tree"); 135 refresh_button.setMnemonic(KeyEvent.VK_R); 134 136 refresh_button.addActionListener(new ActionListener() { 135 137 public void actionPerformed(ActionEvent event) { -
trunk/gli/src/org/greenstone/gatherer/msm/MSMPrompt.java
r6095 r6318 45 45 import org.greenstone.gatherer.Dictionary; 46 46 import org.greenstone.gatherer.Gatherer; 47 import org.greenstone.gatherer.gui.GLIButton; 47 48 import org.greenstone.gatherer.gui.ModalDialog; 48 49 import org.greenstone.gatherer.gui.SimpleMenuBar; … … 91 92 92 93 // Create components 93 cancel = new JButton();94 cancel = new GLIButton(); 94 95 cancel.addActionListener(this); 95 96 cancel.setEnabled(true); … … 181 182 JLabel attribute_name = new JLabel(att_new.getAttribute("name")); 182 183 183 add = new JButton();184 add = new GLIButton(); 184 185 add.addActionListener(this); 185 186 add.setEnabled(true); … … 187 188 Dictionary.registerBoth(add, "MSMPrompt.Add", "MSMPrompt.Add_Tooltip"); 188 189 189 replace = new JButton();190 replace = new GLIButton(); 190 191 replace.addActionListener(this); 191 192 replace.setEnabled(false); 192 replace.setMnemonic(KeyEvent.VK_ R);193 replace.setMnemonic(KeyEvent.VK_P); 193 194 Dictionary.registerBoth(replace, "MSMPrompt.Replace", "MSMPrompt.Replace_Tooltip"); 194 195 195 skip = new JButton();196 skip = new GLIButton(); 196 197 skip.addActionListener(this); 197 198 skip.setEnabled(true); … … 308 309 Dictionary.registerText(progress_label, "MSMPrompt.Progress"); 309 310 310 add = new JButton();311 add = new GLIButton(); 311 312 add.addActionListener(this); 312 313 add.setEnabled(false); … … 314 315 Dictionary.registerBoth(add, "MSMPrompt.Add", "MSMPrompt.Add_Tooltip"); 315 316 316 merge = new JButton();317 merge = new GLIButton(); 317 318 merge.addActionListener(this); 318 319 merge.setEnabled(true); … … 320 321 Dictionary.registerBoth(merge, "MSMPrompt.Merge", "MSMPrompt.Merge_Tooltip"); 321 322 322 rename = new JButton();323 rename = new GLIButton(); 323 324 rename.addActionListener(this); 324 325 rename.setEnabled(false); … … 326 327 Dictionary.registerBoth(rename, "MSMPrompt.Rename", "MSMPrompt.Rename_Tooltip"); 327 328 328 replace = new JButton();329 replace = new GLIButton(); 329 330 replace.addActionListener(this); 330 331 replace.setEnabled(false); 331 replace.setMnemonic(KeyEvent.VK_ R);332 replace.setMnemonic(KeyEvent.VK_P); 332 333 Dictionary.registerBoth(replace, "MSMPrompt.Replace", "MSMPrompt.Replace_Tooltip"); 333 334 334 skip = new JButton();335 skip = new GLIButton(); 335 336 skip.addActionListener(this); 336 337 skip.setEnabled(true); … … 494 495 Dictionary.setTooltip(new_name, "MSMPrompt.New_Name_Tooltip"); 495 496 496 JButton ok = new JButton();497 JButton ok = new GLIButton(); 497 498 ok.addActionListener(this); 498 499 ok.setMnemonic(KeyEvent.VK_O); … … 596 597 Dictionary.setText(dialog, "MSMPrompt.Select"); 597 598 598 JButton ok = new JButton();599 JButton ok = new GLIButton(); 599 600 ok.addActionListener(this); 600 601 ok.setMnemonic(KeyEvent.VK_O); … … 707 708 Dictionary.setTooltip(element, "MSMPrompt.Select_Element_Element_Tooltip"); 708 709 709 JButton add_button = new JButton();710 JButton add_button = new GLIButton(); 710 711 add_button.setEnabled(false); 711 712 add_button.setMnemonic(KeyEvent.VK_A); 712 713 Dictionary.setBoth(add_button, "MSMPrompt.Select_Element_Add", "MSMPrompt.Select_Element_Add_Tooltip"); 713 714 714 JButton cancel_button = new JButton();715 JButton cancel_button = new GLIButton(); 715 716 cancel_button.setMnemonic(KeyEvent.VK_C); 716 717 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip"); 717 718 718 JButton merge_button = new JButton();719 JButton merge_button = new GLIButton(); 719 720 merge_button.setEnabled(false); 720 721 merge_button.setMnemonic(KeyEvent.VK_M); 721 722 Dictionary.setBoth(merge_button, "MSMPrompt.Select_Element_Merge", "MSMPrompt.Select_Element_Merge_Tooltip"); 722 723 723 JButton ignore_button = new JButton();724 JButton ignore_button = new GLIButton(); 724 725 ignore_button.setMnemonic(KeyEvent.VK_I); 725 726 Dictionary.setBoth(ignore_button, "MSMPrompt.Select_Element_Ignore", "MSMPrompt.Select_Element_Ignore_Tooltip"); … … 857 858 } 858 859 859 /** Prompts the user to select a metadata set from the given list. Uses the name parameter to attempt to automatically select the correct collection (ie the only collection that has an element with the same name).860 * @param name The name of the metadata element whose set name is unknown.861 * @return The metadata set the user has selected or null if no set selected.862 */863 /* final private MetadataSet selectSet(String name) {864 String args[] = new String[1];865 args[0] = name;866 867 // Creation868 MSMDialog dialog = new MSMDialog();869 dialog.setModal(true);870 dialog.setSize(SELECT_SET_SIZE);871 dialog.setJMenuBar(new SimpleMenuBar("importingpreviouslyassignedmetadata"));872 Dictionary.setText(dialog, "MSMPrompt.Select_Set_Title");873 874 JPanel content_pane = (JPanel) dialog.getContentPane();875 JPanel control_pane = new JPanel();876 JTextArea instructions = new JTextArea();877 instructions.setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));878 instructions.setEditable(false);879 instructions.setLineWrap(true);880 instructions.setRows(SELECT_LINE_COUNT);881 instructions.setWrapStyleWord(true);882 Dictionary.setText(instructions, "MSMPrompt.Select_Set_Instructions", args);883 884 JComboBox set = new JComboBox();885 set.setBackground(Color.white);886 set.addItem(Dictionary.get("MSMPrompt.Select_Set_None"));887 Vector sets = manager.getSets();888 for(int i = sets.size() - 1; i >= 0; i--) {889 set.addItem(sets.get(i));890 }891 Dictionary.setTooltip(set, "MSMPrompt.Select_Element_Set_Tooltip");892 893 JButton ok = new JButton();894 ActionListener ok_listener = new IgnoreListener(dialog);895 ok.addActionListener(ok_listener); // Doesn't really ignore. Just disposes()896 Dictionary.setBoth(ok, "General.OK", "General.OK_Tooltip");897 898 // Select most likely set899 if(name.indexOf(".") != -1) {900 String set_name = name.substring(0, name.indexOf("."));901 MetadataSet metadata_set = manager.getSet(set_name);902 if(metadata_set != null) {903 set.setSelectedItem(metadata_set);904 }905 metadata_set = null;906 set_name = null;907 }908 else {909 Vector matches = manager.setsThatContain(name);910 if(matches.size() == 1) {911 set.setSelectedItem(matches.get(0));912 }913 matches = null;914 }915 916 // Layout917 control_pane.setLayout(new GridLayout(2,1));918 control_pane.add(set);919 control_pane.add(ok);920 content_pane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));921 content_pane.setLayout(new BorderLayout());922 content_pane.add(new JScrollPane(instructions), BorderLayout.CENTER);923 content_pane.add(control_pane, BorderLayout.SOUTH);924 925 // Display926 dialog.setLocation((screen_size.width - SELECT_SET_SIZE.width) / 2, (screen_size.height - SELECT_SET_SIZE.height) / 2);927 dialog.setVisible(true);928 Object value = set.getSelectedItem();929 if(value instanceof MetadataSet) {930 return (MetadataSet) value;931 }932 value = null;933 ok.removeActionListener(ok_listener);934 ok_listener = null;935 ok = null;936 content_pane = null;937 control_pane = null;938 instructions = null;939 set = null;940 dialog.destroy();941 dialog = null;942 return null;943 } */944 945 860 private class AddListener 946 861 implements ActionListener { -
trunk/gli/src/org/greenstone/gatherer/util/AppendLineOnlyFileDocument.java
r6181 r6318 8 8 import javax.swing.event.*; 9 9 import javax.swing.text.*; 10 11 10 import org.greenstone.gatherer.Gatherer; 11 import org.greenstone.gatherer.gui.GLIButton; 12 12 import org.greenstone.gatherer.util.StaticStrings; 13 13 … … 614 614 final JTextArea text_area = new JTextArea(document); 615 615 616 JButton read_button = new JButton("Read Huge File"); 616 JButton read_button = new GLIButton("Read Huge File"); 617 read_button.setMnemonic(KeyEvent.VK_R); 617 618 read_button.addActionListener(new ActionListener() { 618 619 public void actionPerformed(ActionEvent event) { -
trunk/gli/src/org/greenstone/gatherer/util/TreeModelTest.java
r5581 r6318 1 /** 2 *######################################################################### 3 * 4 * A component of the Gatherer application, part of the Greenstone digital 5 * library suite from the New Zealand Digital Library Project at the 6 * University of Waikato, New Zealand. 7 * 8 * <BR><BR> 9 * 10 * Author: John Thompson, Greenstone Digital Library, University of Waikato 11 * 12 * <BR><BR> 13 * 14 * Copyright (C) 1999 New Zealand Digital Library Project 15 * 16 * <BR><BR> 17 * 18 * This program is free software; you can redistribute it and/or modify 19 * it under the terms of the GNU General Public License as published by 20 * the Free Software Foundation; either version 2 of the License, or 21 * (at your option) any later version. 22 * 23 * <BR><BR> 24 * 25 * This program is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * <BR><BR> 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with this program; if not, write to the Free Software 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 *######################################################################## 36 */ 1 37 package org.greenstone.gatherer.util; 2 38 … … 7 43 import javax.swing.*; 8 44 import javax.swing.tree.*; 45 import org.greenstone.gatherer.gui.GLIButton; 9 46 import org.greenstone.gatherer.util.DefaultSynchronizedTreeNode; 10 47 import org.greenstone.gatherer.util.SynchronizedTreeModel; … … 109 146 110 147 JPanel button_panel = new JPanel(); 111 JButton add_button = new JButton("Add Node"); 148 JButton add_button = new GLIButton("Add Node"); 149 add_button.setMnemonic(KeyEvent.VK_A); 112 150 dangerous_button = new JToggleButton("Dangerous!"); 113 151 dangerous_button.setSelected(false); 114 JButton remove_button = new JButton("Remove Node"); 115 JButton preset_button = new JButton("Preset Structure"); 152 JButton remove_button = new GLIButton("Remove Node"); 153 remove_button.setMnemonic(KeyEvent.VK_R); 154 JButton preset_button = new GLIButton("Preset Structure"); 155 preset_button.setMnemonic(KeyEvent.VK_P); 116 156 117 157 // Connection
Note:
See TracChangeset
for help on using the changeset viewer.