Class SelectSpectrumPanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, adams.event.DatabaseConnectionChangeListener, ImageObserver, MenuContainer, Serializable, Accessible

    public class SelectSpectrumPanel
    extends adams.gui.selection.AbstractConditionalDatabaseSelectionPanel<Integer,​adams.db.AbstractConditions>
    A panel that lists all the spectrums currently in the database.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • SelectSpectrumPanel

        public SelectSpectrumPanel()
    • Method Detail

      • initGUI

        protected void initGUI()
        initializes the GUI elements.
        Overrides:
        initGUI in class adams.gui.selection.AbstractConditionalDatabaseSelectionPanel<Integer,​adams.db.AbstractConditions>
      • getDefaultDatabaseConnection

        protected adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
        Returns the default database connection.
        Specified by:
        getDefaultDatabaseConnection in class adams.gui.selection.AbstractDatabaseSelectionPanel<Integer>
        Returns:
        the default connection
      • newTableModel

        protected SelectSpectrumPanel.TableModel newTableModel()
        Returns an empty table model.
        Specified by:
        newTableModel in class adams.gui.selection.AbstractTableBasedSelectionPanel<Integer>
        Returns:
        the model
      • getItemClass

        protected Class getItemClass()
        Returns the class of the items displayed, same as "T".
        Specified by:
        getItemClass in class adams.gui.selection.AbstractTableBasedSelectionPanel<Integer>
        Returns:
        the class of the items
      • getDefaultConditions

        protected adams.db.AbstractConditions getDefaultConditions()
        Returns the default conditions to use.
        Specified by:
        getDefaultConditions in class adams.gui.selection.AbstractConditionalDatabaseSelectionPanel<Integer,​adams.db.AbstractConditions>
        Returns:
        the conditions
      • getApprovedConditions

        protected Class[] getApprovedConditions()
        Returns the approved conditions that can be used.
        Specified by:
        getApprovedConditions in class adams.gui.selection.AbstractConditionalDatabaseSelectionPanel<Integer,​adams.db.AbstractConditions>
        Returns:
        the approved conditions
      • updateOptions

        protected void updateOptions()
        Updates the options object used internally and refreshes the display if necessary.
      • getSpectrumTable

        protected SpectrumIntf getSpectrumTable()
        Returns the correct table object, depending whether active or store table is used.
        Returns:
        the table object
      • getSampleDataTable

        protected SampleDataIntf getSampleDataTable()
        Returns the correct table object, depending whether active or store table is used.
        Returns:
        the table object
      • refreshIfNecessary

        public void refreshIfNecessary()
        Does a refresh if data hasn't been displayed.
        Specified by:
        refreshIfNecessary in class adams.gui.selection.AbstractDatabaseSelectionPanel<Integer>
        See Also:
        AbstractDatabaseSelectionPanel.refresh()
      • doRefresh

        protected void doRefresh()
        Performs the actual refresh.
        Specified by:
        doRefresh in class adams.gui.selection.AbstractConditionalDatabaseSelectionPanel<Integer,​adams.db.AbstractConditions>
      • databaseDisconnected

        protected void databaseDisconnected()
        Gets called when the database connection gets disconnected.
        Specified by:
        databaseDisconnected in class adams.gui.selection.AbstractDatabaseSelectionPanel<Integer>