Class AbstractChartDataConsumer

    • Field Detail

      • chart

        protected org.jfree.chart.JFreeChart chart
        The chart.
    • Constructor Detail

      • AbstractChartDataConsumer

        public AbstractChartDataConsumer()
        Create a new chart consumer.
    • Method Detail

      • consumeData

        public void consumeData​(long currenttime,
                                double tick)
        Consume data from the provider.
        Specified by:
        consumeData in interface ITableDataConsumer
        Parameters:
        currenttime - The current time.
        tick - The current tick.
      • getValues

        protected java.lang.Object[] getValues​(int num,
                                               DataTable data,
                                               java.lang.Object[] row,
                                               SimpleValueFetcher fetcher)
        Get the x/y values for a specific series number. In case of a multi series the row array defines the specific data to read.
      • getChart

        public org.jfree.chart.JFreeChart getChart()
        Get the chart.
        Returns:
        The chart.
      • refresh

        public void refresh()
        Refresh the chart.
      • getTableDataProvider

        protected ITableDataProvider getTableDataProvider()
        Get the table data provider.
        Returns:
        The table data provider.
      • getResourceInfo

        protected ResourceInfo getResourceInfo​(java.lang.String name,
                                               java.lang.String[] imports,
                                               java.lang.ClassLoader classloader)
                                        throws java.lang.Exception
        Find the file for a given name.
        Parameters:
        name - The filename or logical name (resolved via imports and extension).
        extension - The required extension.
        imports - The imports, if any.
        Returns:
        The resource info identifying the file.
        Throws:
        java.lang.Exception
      • getChartPanel

        public javax.swing.JPanel getChartPanel()
        Get the chart panel.
        Returns:
        The chart panel.
      • createChart

        protected abstract org.jfree.chart.JFreeChart createChart()
        Create a chart with the underlying dataset.
        Returns:
        The chart.
      • addValue

        protected abstract void addValue​(java.lang.Comparable seriesname,
                                         java.lang.Object valx,
                                         java.lang.Object valy,
                                         DataTable data,
                                         java.lang.Object[] row)
        Add a value to a specific series of the chart.
        Parameters:
        seriesname - The seriesname.
        valx - The x value.
        valy - The y value.
        data - The data table.
        row - The current data row.