Class ReportFactory.Table<R extends ReportProvider<?,​?>>

    • Field Detail

      • m_DataContainerPanel

        protected DataContainerPanel m_DataContainerPanel
        an optional spectrum panel that owns the data.
      • m_PopupActions

        protected String[] m_PopupActions
        the structure of the popup menu.
      • m_ReportChangeListeners

        protected Set<ChangeListener> m_ReportChangeListeners
        the change listeners.
    • Constructor Detail

      • Table

        public Table()
        Initializes the table.
      • Table

        public Table​(Report report)
        Initializes the table.
        Parameters:
        report - the report to base the table on
      • Table

        public Table​(TableModel model)
        Initializes the table.
        Parameters:
        model - the model to use
    • Method Detail

      • newReportFileChooser

        protected AbstractReportFileChooser newReportFileChooser()
        Returns the file chooser to use for exporting the reports.
        Returns:
        the filechooser, null if not available
      • getDefaultPopupActions

        protected String[] getDefaultPopupActions()
        Returns the default actions for the popup menu.
        Returns:
        the default actions
      • setPopupActions

        public void setPopupActions​(String[] value)
        Sets the actions to use for the popup menu.
        Parameters:
        value - the array of actions
        See Also:
        AbstractTableAction
      • getPopupActions

        public String[] getPopupActions()
        Returns the actions used for the popup menu.
        Returns:
        the array of actions
        See Also:
        AbstractTableAction
      • setReport

        public void setReport​(Report value)
        Sets the report to display.
        Parameters:
        value - the report to display
      • getReport

        public Report getReport()
        Returns the underlying report.
        Returns:
        the report.
      • getSelectionAsReport

        public Report getSelectionAsReport()
        Returns the selected rows as new report.
        Returns:
        the selected fields
      • setDataContainerPanel

        public void setDataContainerPanel​(DataContainerPanel value)
        Sets the underlying spectrum panel.
        Parameters:
        value - the panel
      • getDataContainerPanel

        public DataContainerPanel getDataContainerPanel()
        Returns the currently set spectrum panel.
        Returns:
        the panel, can be null
      • getReportProvider

        public ReportProvider<?,​?> getReportProvider()
        Returns the provider for accessing the reports in the database.

        The default implementation returns null.
        Returns:
        the provider
      • getReportFileChooser

        public AbstractReportFileChooser getReportFileChooser()
        Returns the file chooser in use.
        Returns:
        the file chooser
      • getFieldAt

        public AbstractField getFieldAt​(int row)
        Returns the field at the given location.
        Parameters:
        row - the row to get the field for
        Returns:
        the generated field
      • getPopupMenu

        protected BasePopupMenu getPopupMenu​(int[] rows)
        Returns a popup menu if appropriate.
        Parameters:
        rows - the row that got the click or the currently selected rows
        Returns:
        the menu if appropriate, otherwise null
      • setNumDecimals

        public void setNumDecimals​(int value)
        Sets the number of decimals to display for numeric values.
        Parameters:
        value - the number of decimals (use -1 to display all)
      • getNumDecimals

        public int getNumDecimals()
        Returns the number of decimals used to display numeric values.
        Returns:
        the number of decimals
      • addReportChangeListener

        public void addReportChangeListener​(ChangeListener l)
        Adds the listener to listen for changes to the report.
        Parameters:
        l - the listener
      • removeReportChangeListener

        public void removeReportChangeListener​(ChangeListener l)
        Removes the listener from listening for changes to the report.
        Parameters:
        l - the listener
      • notifyReportChangeListeners

        public void notifyReportChangeListeners()
        Notifies all the change listeners.