public class ConnectorAction
extends javax.swing.AbstractAction
Connector object.
This action can be put into a button whose text will read "Log In"
and "Log Out" as appropriate. It has a property with the
key CONNECTION_PROPERTY which contains the active
Connection object, so that PropertyChangeListeners may be
configured to watch when a connection is established or broken.
A log in attempt will pop up a modal dialogue asking for the
various authorization information required to attempt the connection.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONNECTION_PROPERTY
Key for the property which stores a
Connection object. |
| Constructor and Description |
|---|
ConnectorAction(Connector connector)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
protected javax.swing.JDialog |
createDialog(java.awt.Component parent)
Constructs the dialogue which is used to ask the user for
authorization information.
|
Connection |
getConnection()
Returns the currently active connection.
|
Connector |
getConnector()
Returns the connector used by this action.
|
void |
setEnabled(boolean enabled) |
public static final java.lang.String CONNECTION_PROPERTY
Connection object.public ConnectorAction(Connector connector)
connector - connector describing the service this action
can connect topublic void actionPerformed(java.awt.event.ActionEvent evt)
protected javax.swing.JDialog createDialog(java.awt.Component parent)
parent - parent componentpublic void setEnabled(boolean enabled)
setEnabled in interface javax.swing.ActionsetEnabled in class javax.swing.AbstractActionpublic Connector getConnector()
public Connection getConnection()