iglu.jdbc
Class Login

java.lang.Object
  |
  +--iglu.jdbc.Login

public class Login
extends java.lang.Object

a generic login screen for a JDBC database. returns a Connection to a database. Can handle the parameters sent to it as a commandline parser class. It looks for the following parameters:

Author:
Travis Bauer trbauer@indiana.edu

Field Summary
protected static PTextField fDriver
          the text field for the database.
protected static javax.swing.JPasswordField fPassword
          the text field for the password.
protected static PTextField fUrl
          the text field for the url.
static PTextField fUsername
          the text field for the username.
static java.lang.String sDriver
           
static java.lang.String sPassword
           
static java.lang.String sUrl
           
static java.lang.String sUsername
           
 
Constructor Summary
Login()
           
 
Method Summary
private static java.sql.Connection connect()
          Connect to the database
private static java.awt.Component createPane()
          Create the window for showing the login screen.
static java.sql.Connection doLogin(CommandLineParser clp, boolean showDialog, java.lang.String welcomeString)
           
static java.sql.Connection doTextLogin(CommandLineParser clp, boolean showDialog, java.lang.String welcomeString)
           
private static void sortOutArgs(CommandLineParser clp)
          assume that everything is null, then fill in what is given on the command line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fUsername

public static PTextField fUsername
the text field for the username. It't global so we can get at it after it's been put in the window


sUsername

public static java.lang.String sUsername

fPassword

protected static javax.swing.JPasswordField fPassword
the text field for the password. It't global so we can get at it after it's been put in the window


sPassword

public static java.lang.String sPassword

fUrl

protected static PTextField fUrl
the text field for the url. It't global so we can get at it after it's been put in the window


sUrl

public static java.lang.String sUrl

fDriver

protected static PTextField fDriver
the text field for the database. It't global so we can get at it after it's been put in the window


sDriver

public static java.lang.String sDriver
Constructor Detail

Login

public Login()
Method Detail

sortOutArgs

private static void sortOutArgs(CommandLineParser clp)
assume that everything is null, then fill in what is given on the command line


createPane

private static java.awt.Component createPane()
Create the window for showing the login screen.


connect

private static java.sql.Connection connect()
Connect to the database


doLogin

public static java.sql.Connection doLogin(CommandLineParser clp,
                                          boolean showDialog,
                                          java.lang.String welcomeString)

doTextLogin

public static java.sql.Connection doTextLogin(CommandLineParser clp,
                                              boolean showDialog,
                                              java.lang.String welcomeString)