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) ActionListener
protected JPasswordField
protected JTextField
static final String
static final String
static final String
static final String
static final String
static final String
protected JLabel
protected JLabel
(package private) final Object
protected JButton
(package private) ActionListener
private char[]
private boolean
static final String
Internationalization message stringprivate String
private boolean
protected JDialog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JComponent
protected JComponent
This is called by the protocol stack when authentication is required.protected void
Methods 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:
getPasswordAuthentication
in classAuthenticator
-