Class AbstractCalculatedPenDatasource
- java.lang.Object
- 
- com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractCalculatedPenDatasource
 
- 
- All Implemented Interfaces:
- IPenDatasource
 - Direct Known Subclasses:
- AbstractFunctionPenDatasource,- ConstantPenDatasource
 
 public class AbstractCalculatedPenDatasource extends java.lang.Object implements IPenDatasource 
- 
- 
Field SummaryFields Modifier and Type Field Description protected PMIEasyChartchartprotected Datasetdatasetprotected java.util.Set<PenDataset>datasetsprotected java.util.DateendDateThe configured end date.protected LoggerExlogprotected java.util.List<PenData>pensprotected java.util.DatestartDateThe starting date of the chart.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractCalculatedPenDatasource()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPen(PenData pen)Adds a pen to this datasource.DatasetgetDataset()The underlying dataset that drives this datasourceprotected longgetMillisRange(PenData source)Returns the range of millis between the first and last points in the given pen datasetintgetNumDatapoints()Return the number of datapoints currently loaded in this sourcevoidinitRefs(java.util.Map<java.lang.String,PenData> allPens)Gives the datasource a chance to install references to other pensbooleanisZoomTracking()True if this datasource should be restarted when the zoom level changes.protected voidsetDataset(Dataset dataset)protected voidsetDatasetLater(Dataset dataset)voidshutdown()Shuts this datasoure down, if it has re-occurring activity.voidstartup(PMIEasyChart chart)Start this datasouce up.protected voidwarn(java.lang.String msg)
 
- 
- 
- 
Field Detail- 
datasetprotected Dataset dataset 
 - 
pensprotected java.util.List<PenData> pens 
 - 
datasetsprotected java.util.Set<PenDataset> datasets 
 - 
chartprotected PMIEasyChart chart 
 - 
startDateprotected java.util.Date startDate The starting date of the chart. Set instartup(PMIEasyChart)
 - 
endDateprotected java.util.Date endDate The configured end date. May be null - this means "up to current time". Set instartup(PMIEasyChart)
 - 
logprotected final LoggerEx log 
 
- 
 - 
Method Detail- 
addPenpublic void addPen(PenData pen) Description copied from interface:IPenDatasourceAdds a pen to this datasource. All pens will be added before startup() is called for the first time.- Specified by:
- addPenin interface- IPenDatasource
 
 - 
getDatasetpublic Dataset getDataset() Description copied from interface:IPenDatasourceThe underlying dataset that drives this datasource- Specified by:
- getDatasetin interface- IPenDatasource
 
 - 
setDatasetprotected void setDataset(Dataset dataset) 
 - 
setDatasetLaterprotected void setDatasetLater(Dataset dataset) 
 - 
getNumDatapointspublic int getNumDatapoints() Description copied from interface:IPenDatasourceReturn the number of datapoints currently loaded in this source- Specified by:
- getNumDatapointsin interface- IPenDatasource
 
 - 
getMillisRangeprotected long getMillisRange(PenData source) Returns the range of millis between the first and last points in the given pen dataset
 - 
initRefspublic void initRefs(java.util.Map<java.lang.String,PenData> allPens) Description copied from interface:IPenDatasourceGives the datasource a chance to install references to other pens- Specified by:
- initRefsin interface- IPenDatasource
 
 - 
shutdownpublic void shutdown() Description copied from interface:IPenDatasourceShuts this datasoure down, if it has re-occurring activity.- Specified by:
- shutdownin interface- IPenDatasource
 
 - 
startuppublic void startup(PMIEasyChart chart) Description copied from interface:IPenDatasourceStart this datasouce up. This should certainly mean that the data gets generated at least once, and possibly more based upon the chart's polling settings. May be called again after shutdown().- Specified by:
- startupin interface- IPenDatasource
 
 - 
warnprotected void warn(java.lang.String msg) 
 - 
isZoomTrackingpublic boolean isZoomTracking() Description copied from interface:IPenDatasourceTrue if this datasource should be restarted when the zoom level changes.- Specified by:
- isZoomTrackingin interface- IPenDatasource
 
 
- 
 
-