Changeset 6322
- Timestamp:
- 2003-12-19T14:49:39+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java
r6155 r6322 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 Project, NZDL, University of Waikato 9 * 10 * Copyright (C) 2003 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 … … 7 33 import org.greenstone.gatherer.Dictionary; 8 34 import org.greenstone.gatherer.Gatherer; 35 import org.greenstone.gatherer.gui.GLIButton; 9 36 import org.greenstone.gatherer.util.Utility; 10 37 … … 93 120 Dictionary.setText(show_check, "WarningDialog.Dont_Show_Again"); 94 121 JPanel control_pane = new JPanel(); 95 ok_button = new JButton(); 122 ok_button = new GLIButton(); 123 ok_button.setMnemonic(KeyEvent.VK_O); 96 124 Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip"); 97 cancel_button = new JButton(); 125 cancel_button = new GLIButton(); 126 cancel_button.setMnemonic(KeyEvent.VK_C); 98 127 Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip"); 99 128 … … 186 215 } 187 216 188 189 217 /** Gives notification of key events on the buttons */ 190 218 public void keyPressed(KeyEvent e) { … … 204 232 205 233 public int display() { 206 ///ystem.err.println("Show " + full_property + ": " + Gatherer.config.get(full_property, false));207 234 if(Gatherer.config == null || Gatherer.config.get(full_property, false)) { 208 // Create and run the shortlived move focus thread209 //FocusChangerTask task = null;210 //if(affected_property != null) {211 // task = new FocusChangerTask(value_field);212 //}213 //else {214 // task = new FocusChangerTask(ok_button);215 //}216 //task.start();217 //show();218 235 setVisible(true); 219 236 } … … 223 240 } 224 241 return result; 242 } 243 244 /** Allows you to specify whether this dialog is a warning dialog, or only a message dialog. 245 * @param message_only true if this dialog shows a message, false for a warning 246 */ 247 public void setMessageOnly(boolean message_only) { 248 // If this is a message then change the checkbox 249 if(message_only) { 250 Dictionary.setText(show_check, "WarningDialog.Dont_Show_Again_Message"); 251 } 252 // And if its a warning, change them back 253 else { 254 Dictionary.setText(show_check, "WarningDialog.Dont_Show_Again"); 255 } 225 256 } 226 257
Note:
See TracChangeset
for help on using the changeset viewer.