jsynoptic.plugins.jfreechart
Class SourceIntervalXYDataSet

java.lang.Object
  extended by AbstractDataset
      extended by jsynoptic.plugins.jfreechart.SourceIntervalXYDataSet
All Implemented Interfaces:
DataSourceListener, EndNotificationListener

public class SourceIntervalXYDataSet
extends AbstractDataset
implements DataSourceListener, EndNotificationListener

Author:
nbrodu Note: this class isn't used at the moment, work in progress.

Nested Class Summary
static class SourceIntervalXYDataSet.Interval
           
static class SourceIntervalXYDataSet.SourceIntervalMaker
           
 
Constructor Summary
SourceIntervalXYDataSet()
           
 
Method Summary
 void DataSourceIndexRangeChanged(DataSource ds, long startIndex, long lastIndex)
          Called when the range of valid index changed
 void DataSourceInfoChanged(DataSource ds, DataInfo newInfo)
          Called when the information about the data source changed
 void DataSourceOrderChanged(DataSource ds, int newOrder)
          If defined, called when the order of the source changed.
 void DataSourceReplaced(DataSource oldData, DataSource newData)
          Called when a data source is replaced by another one
 void DataSourceValueChanged(DataSource ds, long minIndex, long maxIndex)
          Called when at least a value changed in the data source.
 void DataSourceValueRangeChanged(DataSource ds)
          Called when the range of possible values changed, if defined.
 java.lang.Number getEndXValue(int series, int item)
           
 java.lang.Number getEndYValue(int series, int item)
           
 int getItemCount(int series)
           
static java.lang.Number getNumberFromSource(DataSource ds, long index)
           
 int getSeriesCount()
           
 java.lang.String getSeriesName(int series)
           
 java.lang.Number getStartXValue(int series, int item)
           
 java.lang.Number getStartYValue(int series, int item)
           
 java.lang.Number getXValue(int series, int item)
           
 java.lang.Number getYValue(int series, int item)
           
 void notificationEnd(java.lang.Object referer)
          This callback is called after all notifications were processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceIntervalXYDataSet

public SourceIntervalXYDataSet()
Method Detail

getNumberFromSource

public static java.lang.Number getNumberFromSource(DataSource ds,
                                                   long index)

getStartXValue

public java.lang.Number getStartXValue(int series,
                                       int item)

getEndXValue

public java.lang.Number getEndXValue(int series,
                                     int item)

getStartYValue

public java.lang.Number getStartYValue(int series,
                                       int item)

getEndYValue

public java.lang.Number getEndYValue(int series,
                                     int item)

getItemCount

public int getItemCount(int series)

getXValue

public java.lang.Number getXValue(int series,
                                  int item)

getYValue

public java.lang.Number getYValue(int series,
                                  int item)

getSeriesCount

public int getSeriesCount()

getSeriesName

public java.lang.String getSeriesName(int series)

DataSourceValueChanged

public void DataSourceValueChanged(DataSource ds,
                                   long minIndex,
                                   long maxIndex)
Description copied from interface: DataSourceListener
Called when at least a value changed in the data source. The listener shall then get the values in the given range again, if it is interested by the values in that range.

Specified by:
DataSourceValueChanged in interface DataSourceListener
Parameters:
ds - The data source that changed
minIndex - Lower bound of the range where values changed
maxIndex - Higher bound of the range where values changed

DataSourceIndexRangeChanged

public void DataSourceIndexRangeChanged(DataSource ds,
                                        long startIndex,
                                        long lastIndex)
Description copied from interface: DataSourceListener
Called when the range of valid index changed

Specified by:
DataSourceIndexRangeChanged in interface DataSourceListener
Parameters:
ds - The data source that changed
startIndex - The new start Index
lastIndex - The new last index

DataSourceInfoChanged

public void DataSourceInfoChanged(DataSource ds,
                                  DataInfo newInfo)
Description copied from interface: DataSourceListener
Called when the information about the data source changed

Specified by:
DataSourceInfoChanged in interface DataSourceListener
Parameters:
ds - The data source that changed

DataSourceValueRangeChanged

public void DataSourceValueRangeChanged(DataSource ds)
Description copied from interface: DataSourceListener
Called when the range of possible values changed, if defined.

Specified by:
DataSourceValueRangeChanged in interface DataSourceListener
Parameters:
ds - The data source that changed

DataSourceOrderChanged

public void DataSourceOrderChanged(DataSource ds,
                                   int newOrder)
Description copied from interface: DataSourceListener
If defined, called when the order of the source changed. See the sortedOrder() in the Datasource class for more information.

Specified by:
DataSourceOrderChanged in interface DataSourceListener
Parameters:
ds - The data source that changed

DataSourceReplaced

public void DataSourceReplaced(DataSource oldData,
                               DataSource newData)
Description copied from interface: DataSourceListener
Called when a data source is replaced by another one

Specified by:
DataSourceReplaced in interface DataSourceListener

notificationEnd

public void notificationEnd(java.lang.Object referer)
Description copied from interface: EndNotificationListener
This callback is called after all notifications were processed. The referer object is the one to decide what the end means. For example, it may be a single data source notifying both a range change and a value change. Or it could be a collection notifying all its sources.

Specified by:
notificationEnd in interface EndNotificationListener