Package weka.gui.sql

Class SqlViewer

    • Constructor Detail

      • SqlViewer

        public SqlViewer​(JFrame parent)
        initializes the SqlViewer.
        Parameters:
        parent - the parent of this panel
    • Method Detail

      • connectionChange

        public void connectionChange​(ConnectionEvent evt)
        This method gets called when the connection is either established or disconnected.
        Specified by:
        connectionChange in interface ConnectionListener
        Parameters:
        evt - the event
      • historyChanged

        public void historyChanged​(HistoryChangedEvent evt)
        This method gets called when a history is modified. It saves the history immediately to the users home directory.
        Specified by:
        historyChanged in interface HistoryChangedListener
        Parameters:
        evt - the event
      • saveSize

        public void saveSize()
        obtains the size of the panel and saves it in the history.
        See Also:
        saveHistory()
      • clear

        public void clear()
        calls the clear method of all sub-panels to set back to default values and free up memory.
      • getURL

        public String getURL()
        returns the database URL from the currently active tab in the ResultPanel, otherwise an empty string.
        Returns:
        the currently selected tab's URL
        See Also:
        ResultPanel
      • getUser

        public String getUser()
        returns the user from the currently active tab in the ResultPanel, otherwise an empty string.
        Returns:
        the currently selected tab's user
        See Also:
        ResultPanel
      • getPassword

        public String getPassword()
        returns the password from the currently active tab in the ResultPanel, otherwise an empty string.
        Returns:
        the currently selected tab's password
        See Also:
        ResultPanel
      • getQuery

        public String getQuery()
        returns the query from the currently active tab in the ResultPanel, otherwise an empty string.
        Returns:
        the currently selected tab's query
        See Also:
        ResultPanel
      • 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
      • addQueryExecuteListener

        public void addQueryExecuteListener​(QueryExecuteListener l)
        adds the given listener to the list of listeners.
        Parameters:
        l - the listener to add to the list
      • removeQueryExecuteListener

        public void removeQueryExecuteListener​(QueryExecuteListener l)
        removes the given listener from the list of listeners.
        Parameters:
        l - the listener to remove
      • addResultChangedListener

        public void addResultChangedListener​(ResultChangedListener l)
        adds the given listener to the list of listeners.
        Parameters:
        l - the listener to add to the list
      • removeResultChangedListener

        public void removeResultChangedListener​(ResultChangedListener 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
      • main

        public static void main​(String[] args)
        starts the SQL-Viewer interface.
        Parameters:
        args - the commandline arguments - ignored