Package weka.gui

Class DatabaseConnectionDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class DatabaseConnectionDialog extends JDialog
A dialog to enter URL, username and password for a database connection.
Version:
$Revision: 8034 $
Author:
Dale Fletcher (dale@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • DatabaseConnectionDialog

      public DatabaseConnectionDialog(Frame parentFrame)
      Create database connection dialog.
      Parameters:
      parentFrame - the parent frame of the dialog
    • DatabaseConnectionDialog

      public DatabaseConnectionDialog(Frame parentFrame, String url, String uname)
      Create database connection dialog.
      Parameters:
      parentFrame - the parent frame of the dialog
      url - initial text for URL field
      uname - initial text for username field
    • DatabaseConnectionDialog

      public DatabaseConnectionDialog(Frame parentFrame, String url, String uname, boolean debug)
      Create database connection dialog.
      Parameters:
      parentFrame - the parent frame of the dialog
      url - initial text for URL field
      uname - initial text for username field
      debug - whether to display the debug checkbox
  • Method Details

    • getURL

      public String getURL()
      Returns URL from dialog
      Returns:
      URL string
    • getUsername

      public String getUsername()
      Returns Username from dialog
      Returns:
      Username string
    • getPassword

      public String getPassword()
      Returns password from dialog
      Returns:
      Password string
    • getDebug

      public boolean getDebug()
      Returns the debug flag
      Returns:
      true if debugging should be enabled
    • getReturnValue

      public int getReturnValue()
      Returns which of OK or cancel was clicked from dialog
      Returns:
      either JOptionPane.OK_OPTION or JOptionPane.CLOSED_OPTION
    • DbConnectionDialog

      public void DbConnectionDialog(String url, String uname)
      Display the database connection dialog
      Parameters:
      url - initial text for URL field
      uname - initial text for username field
    • DbConnectionDialog

      public void DbConnectionDialog(String url, String uname, boolean debug)
      Display the database connection dialog
      Parameters:
      url - initial text for URL field
      uname - initial text for username field
      debug - whether to display the debug checkbox
    • main

      public static void main(String[] args)
      for testing only