- Timestamp:
- 2008-02-12T16:13:13+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java
r14567 r14974 42 42 import java.util.*; 43 43 import javax.swing.*; 44 45 44 46 import org.greenstone.gatherer.gui.GLIButton; 47 45 48 46 49 /** Provides a graphic authenticator for network password requests. … … 75 78 * @see org.greenstone.gatherer.GAuthenticator.RequestFocusListener 76 79 */ 77 protected PasswordAuthentication getPasswordAuthentication( ) {80 protected PasswordAuthentication getPasswordAuthentication(String username_str, String password_str) { 78 81 // Component definition. 79 82 dialog = new JDialog (Gatherer.g_man, Dictionary.get("GAuthenticator.Title"), true); … … 82 85 JPanel content_pane = (JPanel) dialog.getContentPane(); 83 86 JLabel title_label = new JLabel(getMessageString()); 87 84 88 JPanel user_panel = new JPanel(); 85 89 JLabel username_label = new JLabel(Dictionary.get("GAuthenticator.Username")); 86 90 JTextField username = new JTextField(); 87 91 username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip")); 92 if (username_str != null) { 93 username.setText(username_str); 94 } 95 88 96 JPanel password_panel = new JPanel(); 89 97 JLabel password_label = new JLabel(Dictionary.get("GAuthenticator.Password")); … … 91 99 password.setEchoChar('*'); 92 100 password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip")); 101 if (password_str != null) { 102 password.setText(password_str); 103 } 104 93 105 JPanel button_panel = new JPanel(); 94 106 ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); … … 134 146 } 135 147 148 protected PasswordAuthentication getPasswordAuthentication() { 149 return getPasswordAuthentication(null,null); 150 } 136 151 137 152 /** This is defined so it can be overridden by subclasses (getRequestingPrompt is final). */
Note:
See TracChangeset
for help on using the changeset viewer.