Class SwingAuthenticator

java.lang.Object
uk.ac.starlink.table.jdbc.SwingAuthenticator
All Implemented Interfaces:
JDBCAuthenticator

public class SwingAuthenticator extends Object implements JDBCAuthenticator
Implements JDBCAuthenticator using a GUI.
  • Constructor Details

    • SwingAuthenticator

      public SwingAuthenticator()
  • Method Details

    • setParentComponent

      public void setParentComponent(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 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 String[] authenticate() throws 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:
      IOException - if there is some error