Ignore:
Timestamp:
2008-02-12T16:13:13+13:00 (16 years ago)
Author:
davidb
Message:

Changes to GLI to support export into Fedora. New utility called flisvn diff gems/MetadataSetManager.java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java

    r14567 r14974  
    4242import java.util.*;
    4343import javax.swing.*;
     44
     45
    4446import org.greenstone.gatherer.gui.GLIButton;
     47
    4548
    4649/** Provides a graphic authenticator for network password requests.
     
    7578     * @see org.greenstone.gatherer.GAuthenticator.RequestFocusListener
    7679     */
    77     protected PasswordAuthentication getPasswordAuthentication() {
     80    protected PasswordAuthentication getPasswordAuthentication(String username_str, String password_str) {
    7881    // Component definition.
    7982    dialog = new JDialog (Gatherer.g_man, Dictionary.get("GAuthenticator.Title"), true);
     
    8285    JPanel content_pane = (JPanel) dialog.getContentPane();
    8386    JLabel title_label = new JLabel(getMessageString());
     87
    8488    JPanel user_panel = new JPanel();
    8589    JLabel username_label = new JLabel(Dictionary.get("GAuthenticator.Username"));
    8690    JTextField username = new JTextField();
    8791    username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip"));
     92    if (username_str != null) {
     93        username.setText(username_str);
     94    }
     95
    8896    JPanel password_panel = new JPanel();
    8997    JLabel password_label = new JLabel(Dictionary.get("GAuthenticator.Password"));
     
    9199    password.setEchoChar('*');
    92100    password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip"));
     101    if (password_str != null) {
     102        password.setText(password_str);
     103    }
     104
    93105    JPanel button_panel = new JPanel();
    94106    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
     
    134146    }
    135147
     148    protected PasswordAuthentication getPasswordAuthentication() {
     149    return getPasswordAuthentication(null,null);
     150    }
    136151
    137152    /** This is defined so it can be overridden by subclasses (getRequestingPrompt is final). */
Note: See TracChangeset for help on using the changeset viewer.