jsynoptic.plugins.jfreechart
Class SourceMeterDataset

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

public class SourceMeterDataset
extends AbstractDataset
implements DataSourceListener, EndNotificationListener

Author:
nbrodu To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Field Summary
protected  boolean dirty
           
protected  DataSource source
           
 
Constructor Summary
SourceMeterDataset()
           
SourceMeterDataset(DataSource ds)
           
 
Method Summary
 java.lang.Object clone()
           
 SourceMeterDataset cloneSet()
           
 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.
 double getDoubleValue()
           
 java.lang.String getName()
           
 Range getRange()
           
 DataSource getSource()
           
 java.lang.String getUnit()
           
 java.lang.Number getValue()
           
 void notificationEnd(java.lang.Object referer)
          This callback is called after all notifications were processed.
 void setSource(DataSource ds)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected transient DataSource source

dirty

protected transient boolean dirty
Constructor Detail

SourceMeterDataset

public SourceMeterDataset(DataSource ds)

SourceMeterDataset

public SourceMeterDataset()
Method Detail

getSource

public DataSource getSource()

setSource

public void setSource(DataSource ds)

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

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

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

getName

public java.lang.String getName()

getUnit

public java.lang.String getUnit()

getValue

public java.lang.Number getValue()

getDoubleValue

public double getDoubleValue()

getRange

public Range getRange()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

cloneSet

public SourceMeterDataset cloneSet()
Returns: