Changeset 6319 for trunk/gli/src/org/greenstone/gatherer/gui
- Timestamp:
- 2003-12-19T14:47:38+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r6051 r6319 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 … … 14 40 import org.greenstone.gatherer.checklist.Entry; 15 41 import org.greenstone.gatherer.gui.EmailField; 42 import org.greenstone.gatherer.gui.GLIButton; 16 43 import org.greenstone.gatherer.gui.ModalDialog; 17 44 import org.greenstone.gatherer.gui.SimpleMenuBar; … … 47 74 private JLabel proxy_host_label; 48 75 private JLabel proxy_port_label; 76 private JLabel recursion_depth_label; 49 77 private JLabel title_label; 50 78 private JTabbedPane tab_pane; … … 52 80 private JTextField proxy_host_field; 53 81 private JSpinner proxy_port_field; 82 private JSpinner recursion_depth_spinner; 54 83 private Preferences self; 55 84 … … 78 107 79 108 JPanel button_pane = new JPanel(); 80 ok_button = new JButton(); 109 ok_button = new GLIButton(); 110 ok_button.setMnemonic(KeyEvent.VK_O); 81 111 Dictionary.registerBoth(ok_button, "General.OK", "General.OK_Tooltip"); 82 apply_button = new JButton(); 112 apply_button = new GLIButton(); 113 apply_button.setMnemonic(KeyEvent.VK_A); 83 114 Dictionary.registerBoth(apply_button, "General.Apply", "General.Apply_Tooltip"); 84 cancel_button = new JButton(); 115 cancel_button = new GLIButton(); 116 cancel_button.setMnemonic(KeyEvent.VK_C); 85 117 Dictionary.registerBoth(cancel_button, "General.Cancel", "General.Cancel_Tooltip"); 86 118 … … 263 295 Dictionary.registerTooltip(language_combobox, "Preferences.General.Interface_Language_Tooltip"); 264 296 297 // Recursion 298 JPanel recursion_depth_pane = new JPanel(); 299 recursion_depth_label = new JLabel(); 300 recursion_depth_label.setPreferredSize(LABEL_SIZE); 301 Dictionary.registerText(recursion_depth_label, "Preferences.General.Recursion_Depth"); 302 recursion_depth_spinner = new JSpinner(new SpinnerNumberModel(Gatherer.config.getInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC), 0, Integer.MAX_VALUE, 1)); 303 Dictionary.registerTooltip(recursion_depth_spinner, "Preferences.General.Recursion_Depth_Tooltip"); 304 265 305 // Connect 266 306 language_combobox.addActionListener(new LanguageComboboxListener()); … … 275 315 language_pane.add(language_combobox, BorderLayout.CENTER); 276 316 317 recursion_depth_pane.setLayout(new BorderLayout()); 318 recursion_depth_pane.add(recursion_depth_label, BorderLayout.WEST); 319 recursion_depth_pane.add(recursion_depth_spinner, BorderLayout.CENTER); 320 277 321 general_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 278 322 general_pane.setLayout(new GridLayout(5,1,0,5)); 279 323 general_pane.add(email_pane); 280 324 general_pane.add(language_pane); 325 general_pane.add(recursion_depth_pane); 281 326 general_pane.add(view_extracted_metadata_checkbox); 282 327 general_pane.add(show_file_size_checkbox); … … 456 501 457 502 Gatherer.config.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry)language_combobox.getSelectedItem()).getLocale()); 503 504 Gatherer.config.setInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC, ((Integer)recursion_depth_spinner.getValue()).intValue()); 458 505 459 506 // Warning preferences
Note:
See TracChangeset
for help on using the changeset viewer.