public class SumDiffPenDatasource extends AbstractFunctionPenDatasource
This datasource adds or subtracts the value of two pens and returns a dataset of the result. It requires two pens to be specified, a 'driving' Pen and a 'secondary' pen. Results are derived by adding to or subtracting from to the driving Pen. Utilizes the PenAttribute#FUNCTION_PARAM to determine whether summation or negation is done on the driving pen.
| Modifier and Type | Class and Description |
|---|---|
static class |
SumDiffPenDatasource.SumDiffPenFunctionFactory |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DIFF |
static java.lang.String |
SUM |
referencedPens| Modifier and Type | Method and Description |
|---|---|
protected Dataset |
createDataset()
Called when the dataset needs to be re-calculated
|
void |
initRefs(java.util.Map<java.lang.String,PenData> allPens)
Gives the datasource a chance to install references to other pens
|
stateChangedaddPen, getDataset, getMillisRange, getNumDatapoints, isZoomTracking, setDataset, setDatasetLater, shutdown, startup, warnpublic static final java.lang.String SUM
public static final java.lang.String DIFF
protected Dataset createDataset()
AbstractFunctionPenDatasourcecreateDataset in class AbstractFunctionPenDatasourcepublic void initRefs(java.util.Map<java.lang.String,PenData> allPens)
IPenDatasourceinitRefs in interface IPenDatasourceinitRefs in class AbstractFunctionPenDatasource