Package org.apache.batik.apps.svgbrowser
Class JAuthenticator
java.lang.Object
java.net.Authenticator
org.apache.batik.apps.svgbrowser.JAuthenticator
This class is resposible for providing authentication information
when needed by network protocols. It does this by poping up a small
window that asks for User ID and password for the system.
- Version:
- $Id: JAuthenticator.java 1733416 2016-03-03 07:07:13Z gadams $
-
Nested Class Summary
Nested classes/interfaces inherited from class java.net.Authenticator
Authenticator.RequestorType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JButton(package private) ActionListenerprotected JPasswordFieldprotected JTextFieldstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected JLabelprotected JLabel(package private) final Objectprotected JButton(package private) ActionListenerprivate char[]private booleanstatic final StringInternationalization message stringprivate Stringprivate booleanprotected JDialog -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JComponentprotected JComponentThis is called by the protocol stack when authentication is required.protected voidMethods inherited from class java.net.Authenticator
getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
-
Field Details
-
TITLE
Internationalization message string- See Also:
-
LABEL_SITE
- See Also:
-
LABEL_REQ
- See Also:
-
LABEL_USERID
- See Also:
-
LABEL_PASSWORD
- See Also:
-
LABEL_CANCEL
- See Also:
-
LABEL_OK
- See Also:
-
window
-
cancelButton
-
okButton
-
label1
-
label2
-
JUserID
-
JPassword
-
lock
-
result
private boolean result -
wasNotified
private volatile boolean wasNotified -
userID
-
password
private char[] password -
okListener
ActionListener okListener -
cancelListener
ActionListener cancelListener
-
-
Constructor Details
-
JAuthenticator
public JAuthenticator()
-
-
Method Details
-
initWindow
protected void initWindow() -
buildAuthPanel
-
buildButtonPanel
-
getPasswordAuthentication
This is called by the protocol stack when authentication is required. We then show the dialog in the Swing event thread, and block waiting for the user to select either cancel or ok, at which point we get notified.- Overrides:
getPasswordAuthenticationin classAuthenticator
-