Class AbstractPlotGenerator

    • Field Detail

      • MISSING_CELL_VALUE

        public static final String MISSING_CELL_VALUE
        the default string value for cells that are missing.
        See Also:
        Constant Field Values
      • m_DefaultCellValue

        protected double m_DefaultCellValue
        the default value for missing or non-numeric cells.
      • m_PlotNameSeparator

        protected String m_PlotNameSeparator
        the separator for the plot names.
    • Constructor Detail

      • AbstractPlotGenerator

        public AbstractPlotGenerator()
    • Method Detail

      • setDefaultCellValue

        public void setDefaultCellValue​(double value)
        Sets the default value for missing or non-numeric cells.
        Parameters:
        value - the default value
      • getDefaultCellValue

        public double getDefaultCellValue()
        Returns the default value for missing or non-numeric cells.
        Returns:
        the default value
      • defaultCellValueTipText

        public String defaultCellValueTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPlotNameRange

        public void setPlotNameRange​(String value)
        Sets the column range to use generating the plot name.
        Parameters:
        value - the column range
      • getPlotNameRange

        public String getPlotNameRange()
        Returns the current column range to use generating the plot name.
        Returns:
        the column range
      • plotNameRangeTipText

        public String plotNameRangeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPlotNameSeparator

        public void setPlotNameSeparator​(String value)
        Sets the separator to use when constructing the plot name from cell values.
        Parameters:
        value - the separator
      • getPlotNameSeparator

        public String getPlotNameSeparator()
        Returns the separator to use when constructing the plot name from cell values.
        Returns:
        the separator
      • plotNameSeparatorTipText

        public String plotNameSeparatorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected void check​(SpreadSheet sheet)
        Checks the spreadsheet.

        Default implementation only checks whether any data was provided.
        Parameters:
        sheet - the sheet to check
      • getCellString

        protected String getCellString​(Row row,
                                       int index)
        Returns the string value for the specified cell.
        Parameters:
        row - the row to get the cell from
        index - the column index
        Returns:
        the string value
      • getCellValue

        protected Comparable getCellValue​(Row row,
                                          int index,
                                          Comparable defaultValue)
        Returns the cell value for the specified column index. Uses the default value if the cell is missing.
        Parameters:
        row - the row to get the cell from
        index - the column index
        Returns:
        the cell value
        See Also:
        m_DefaultCellValue
      • getCellObject

        protected Object getCellObject​(Row row,
                                       int index,
                                       Object defaultValue)
        Returns the cell value for the specified column index. Uses the default value if the cell is missing.
        Parameters:
        row - the row to get the cell from
        index - the column index
        Returns:
        the cell value
        See Also:
        m_DefaultCellValue
      • getCellValue

        protected Comparable getCellValue​(Row row,
                                          int index)
        Returns the cell value for the specified column index. Uses the default value if the cell is missing.
        Parameters:
        row - the row to get the cell from
        index - the column index
        Returns:
        the cell value
        See Also:
        m_DefaultCellValue
      • getActualPlotName

        protected String getActualPlotName​(Row row,
                                           String defValue)
        Returns the plot name to use.
        Parameters:
        row - the row to construct the name from, if necessary
        defValue - the default plot name
        Returns:
        the plot name
      • doGenerate

        protected abstract List<SequencePlotterContainer> doGenerate​(SpreadSheet sheet)
        Performs the actual generation of containers.
        Parameters:
        sheet - the basis for the containers
        Returns:
        the generated containers
      • generate

        public List<SequencePlotterContainer> generate​(SpreadSheet sheet)
        Generates plot containers from the provided spreadsheet.
        Parameters:
        sheet - the data to use
        Returns:
        the generated containers