Package weka.gui.sql

Class QueryPanel

    • Constructor Detail

      • QueryPanel

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

      • setFocus

        public void setFocus()
        sets the focus in a designated control.
      • 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
      • execute

        public void execute()
        executes the current query.
      • clear

        public void clear()
        clears the textarea.
      • 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.
      • setQuery

        public void setQuery​(String query)
        sets the query in the textarea.
        Parameters:
        query - the query to display
      • getQuery

        public String getQuery()
        returns the currently displayed query.
        Returns:
        the query
      • setMaxRows

        public void setMaxRows​(int rows)
        sets the maximum number of rows to display. 0 means unlimited.
        Parameters:
        rows - the maximum number of rows
      • getMaxRows

        public int getMaxRows()
        returns the current value for the maximum number of rows. 0 means unlimited.
        Returns:
        the maximum number of rows
      • 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
      • 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