Class AbstractDatabaseSelectionPanel<T>

    • Field Detail

      • m_ButtonRefresh

        protected BaseButton m_ButtonRefresh
        the button for refreshing the fields.
      • m_DataDisplayed

        protected boolean m_DataDisplayed
        whether data has been displayed already.
    • Constructor Detail

      • AbstractDatabaseSelectionPanel

        public AbstractDatabaseSelectionPanel()
    • Method Detail

      • getDefaultDatabaseConnection

        protected abstract AbstractDatabaseConnection getDefaultDatabaseConnection()
        Returns the default database connection.
        Returns:
        the default connection
      • setEnabled

        public void setEnabled​(boolean value)
        Sets the enabled state of the panel.
        Overrides:
        setEnabled in class AbstractTableBasedSelectionPanel<T>
        Parameters:
        value - if true then the components will be enabled
      • refreshIfNecessary

        public abstract void refreshIfNecessary()
        Simulates a click on the refresh button, if necessary.
        See Also:
        refresh()
      • preRefresh

        protected void preRefresh()
        Performs actions before the refresh, like disabling buttons and changing mouse cursor to waiting one.
      • doRefresh

        protected abstract void doRefresh()
        Performs the actual refresh.
      • postRefresh

        protected void postRefresh​(T[] items)
        Performs actions after the refresh, like enabling buttons, updating counts and changing mouse cursor back to normal one.
      • refresh

        public void refresh()
        Refreshes the items.
      • refresh

        protected void refresh​(T[] items)
        Refreshes the items.
      • setVisible

        public void setVisible​(boolean value)
        closes/shows the dialog.
        Overrides:
        setVisible in class BasePanel
        Parameters:
        value - if true then display the dialog, otherwise close it
      • addRefreshActionListener

        public void addRefreshActionListener​(ActionListener l)
        Adds the given listener to the Refresh button.
        Parameters:
        l - the listener to add
      • removeRefreshActionListener

        public void removeRefreshActionListener​(ActionListener l)
        Removes the given listener from the Refresh button.
        Parameters:
        l - the listener to remove
      • databaseConnected

        protected void databaseConnected()
        Gets called when the database connection gets established.
      • databaseDisconnected

        protected abstract void databaseDisconnected()
        Gets called when the database connection gets disconnected.