uk.ac.starlink.table.jdbc

## Class SwingAuthenticator

- java.lang.Object
- - uk.ac.starlink.table.jdbc.SwingAuthenticator

- All Implemented Interfaces:
    JDBCAuthenticator

      public class SwingAuthenticator
      extends java.lang.Object
      implements JDBCAuthenticator

  Implements JDBCAuthenticator using a GUI.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwingAuthenticator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `authenticate()` This implementation of `authenticate` takes care to execute any GUI interactions on the AWT event dipatch thread, so it may be called from any thread.
    `java.awt.Component` | `getParentComponent()` Returns the parent component for this authenticator; this may affect the positioning of the dialog box.
    `void` | `setParentComponent(java.awt.Component parent)` Sets the parent component for this authenticator; this may affect the positioning of the dialog box.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SwingAuthenticator

          public SwingAuthenticator()

  - ### Method Detail

    - #### setParentComponent

          public void setParentComponent(java.awt.Component parent)

      Sets the parent component for this authenticator; this may affect the positioning of the dialog box.
      Parameters:
        `parent` - the parent component for the dialog box - may be `null`

    - #### getParentComponent

          public java.awt.Component getParentComponent()

      Returns the parent component for this authenticator; this may affect the positioning of the dialog box.
      Returns:
        the parent component for the dialog box - may be `null`

    - #### authenticate

          public java.lang.String[] authenticate()
                                          throws java.io.IOException

      This implementation of `authenticate` takes care to execute any GUI interactions on the AWT event dipatch thread, so it may be called from any thread.
      Specified by:
        `authenticate` in interface `JDBCAuthenticator`
      Returns:
        `String[]{username,password}`
      Throws:
        `java.io.IOException` - if there is some error