Package weka.gui.sql

Class ConnectionPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CaretListener

public class ConnectionPanel extends JPanel implements CaretListener
Enables the user to insert a database URL, plus user/password to connect to this database.
Version:
$Revision: 15104 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Field Details

  • Constructor Details

    • ConnectionPanel

      public ConnectionPanel(JFrame parent)
      initializes the panel.
      Parameters:
      parent - the parent of this panel
  • Method Details

    • clear

      public void clear()
      sets the parameters back to standard.
    • setFocus

      public void setFocus()
      sets the focus in a designated control.
    • setURL

      public void setURL(String url)
      sets the URL.
      Parameters:
      url - the new value of the URL
    • getURL

      public String getURL()
      returns the current URL.
      Returns:
      the current URL
    • setUser

      public void setUser(String user)
      sets the User.
      Parameters:
      user - the new value of the User
    • getUser

      public String getUser()
      returns the current User.
      Returns:
      the current user
    • setPassword

      public void setPassword(String pw)
      sets the Password.
      Parameters:
      pw - the new value of the Password
    • getPassword

      public String getPassword()
      returns the current Password.
      Returns:
      the current password
    • setHistory

      public void setHistory(DefaultListModel history)
      sets the local history to the given one.
      Parameters:
      history - the history to use
    • getHistory

      public DefaultListModel getHistory()
      returns the history.
      Returns:
      the current history
    • showHistory

      public void showHistory()
      displays the query history.
    • switchSetup

      public void switchSetup()
      Lets the user select a props file for changing the database connection parameters.
    • addConnectionListener

      public void addConnectionListener(ConnectionListener l)
      adds the given listener to the list of listeners.
      Parameters:
      l - the listener to add to the list
    • removeConnectionListener

      public void removeConnectionListener(ConnectionListener l)
      removes the given listener from the list of listeners.
      Parameters:
      l - the listener to remove
    • addHistoryChangedListener

      public void addHistoryChangedListener(HistoryChangedListener l)
      adds the given listener to the list of listeners.
      Parameters:
      l - the listener to add to the list
    • removeHistoryChangedListener

      public void removeHistoryChangedListener(HistoryChangedListener l)
      removes the given listener from the list of listeners.
      Parameters:
      l - the listener to remove
    • caretUpdate

      public void caretUpdate(CaretEvent event)
      Called when the caret position is updated.
      Specified by:
      caretUpdate in interface CaretListener
      Parameters:
      event - the event to process