com.isti.util.gui
Class UrlAuthenticatorDialog

java.lang.Object
  extended by java.net.Authenticator
      extended by com.isti.util.UrlAuthenticator
          extended by com.isti.util.gui.UrlAuthenticatorDialog
All Implemented Interfaces:
PasswordAuthenticator

public class UrlAuthenticatorDialog
extends UrlAuthenticator

URL Authenticator Dialog

This class can handle URL password authentication whenever a password protected URL is encountered. All the program needs to do is call UrlAuthenticatorDialog.createDefaultAuthenticator(Component) and after that all URL's requiring password authentication will cause a dialog popup to appear as needed.

See Also:
createDefaultAuthenticator(Component)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.Authenticator
java.net.Authenticator.RequestorType
 
Constructor Summary
UrlAuthenticatorDialog(java.awt.Component component)
          Create the URL authenticator dialog.
UrlAuthenticatorDialog(java.awt.Component component, java.lang.String titleStr)
          Create the URL authenticator dialog.
 
Method Summary
static UrlAuthenticatorDialog createDefaultAuthenticator(java.awt.Component component)
          Create the URL authenticator dialog and set it as the default authenticator.
static PasswordAuthenticator createPasswordAuthenticator(java.awt.Component component, java.lang.String titleStr)
          Create a password authenticator.
 
Methods inherited from class com.isti.util.UrlAuthenticator
getPasswordAuthentication, setDefaultAuthenticator
 
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlAuthenticatorDialog

public UrlAuthenticatorDialog(java.awt.Component component)
Create the URL authenticator dialog.

Parameters:
component - the parent component for the password dialog.

UrlAuthenticatorDialog

public UrlAuthenticatorDialog(java.awt.Component component,
                              java.lang.String titleStr)
Create the URL authenticator dialog.

Parameters:
component - the parent component for the password dialog.
titleStr - the title string for popup window.
Method Detail

createDefaultAuthenticator

public static UrlAuthenticatorDialog createDefaultAuthenticator(java.awt.Component component)
Create the URL authenticator dialog and set it as the default authenticator.

Parameters:
component - the parent component for the password dialog.
Returns:
the URL authenticator dialog.

createPasswordAuthenticator

public static PasswordAuthenticator createPasswordAuthenticator(java.awt.Component component,
                                                                java.lang.String titleStr)
Create a password authenticator.

Parameters:
component - the parent component for the password dialog.
titleStr - the title string for popup window.
Returns:
the password authenticator.