public class Function extends TeeBase
Title: Function class
Description: Basic abstract function class. Examples of derived functions are: Add, Subtract, High, Low, Average and Count.
Copyright (c) 2005-2018 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Modifier and Type | Field and Description |
---|---|
protected boolean |
canUsePeriod |
protected double |
dPeriod |
boolean |
HideSourceList |
boolean |
noSourceRequired |
protected Series |
series |
boolean |
SingleSource |
protected boolean |
updating |
chart, InternalUse
Constructor and Description |
---|
Function() |
Function(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFunctionXY(boolean yMandatorySource,
double tmpX,
double tmpY) |
void |
addPoints(java.util.ArrayList source)
Gets all points from Source series, performs a function operation and
stores results in ParentSeries.
|
double |
calculate(Series source,
int first,
int last)
Performs function operation on SourceSeries series.
|
protected void |
calculateAllPoints(Series source,
ValueList notMandatorySource) |
protected void |
calculateByPeriod(Series source,
ValueList notMandatorySource) |
double |
calculateMany(java.util.ArrayList sourceSeries,
int valueIndex)
Performs function operation on list of series (SourceSeriesList).
|
protected void |
calculatePeriod(Series source,
double tmpX,
int firstIndex,
int lastIndex) |
void |
clear() |
void |
dispose() |
protected void |
doCalculation(Series source,
ValueList notMandatorySource) |
java.lang.String |
getDescription()
Gets descriptive text.
|
double |
getPeriod()
Controls how many points or X range will trigger a new point
calculation.
|
PeriodAlign |
getPeriodAlign()
Controls where to place function calculations inside the full period
space.
|
PeriodStyle |
getPeriodStyle()
Controls how the Period property is interpreted.
|
Series |
getSeries()
Returns the Series parent of Function.
|
static Function |
newInstance(java.lang.Class f) |
protected java.lang.Object |
readResolve() |
void |
recalculate()
Performs a checkDataSource method call on parent Series.
|
void |
setPeriod(double value) |
void |
setPeriodAlign(PeriodAlign value) |
void |
setPeriodStyle(PeriodStyle value) |
void |
setSeries(Series value) |
protected ValueList |
valueList(Series s) |
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
protected double dPeriod
public transient boolean noSourceRequired
protected transient Series series
protected transient boolean updating
protected transient boolean canUsePeriod
public transient boolean SingleSource
public transient boolean HideSourceList
public Function()
public Function(IBaseChart c)
protected java.lang.Object readResolve()
public void dispose()
public static Function newInstance(java.lang.Class f) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public double getPeriod()
public void setPeriod(double value)
public Series getSeries()
public void setSeries(Series value)
public PeriodStyle getPeriodStyle()
public void setPeriodStyle(PeriodStyle value)
public PeriodAlign getPeriodAlign()
function1.setPeriodAlign(Center);
// <-- by default is centered
public void setPeriodAlign(PeriodAlign value)
protected void addFunctionXY(boolean yMandatorySource, double tmpX, double tmpY)
protected void calculatePeriod(Series source, double tmpX, int firstIndex, int lastIndex)
public double calculate(Series source, int first, int last)
source
- Seriesfirst
- intlast
- intpublic double calculateMany(java.util.ArrayList sourceSeries, int valueIndex)
sourceSeries
- ArrayListvalueIndex
- intpublic java.lang.String getDescription()
public void addPoints(java.util.ArrayList source)
source
- ArrayListpublic void recalculate()
public void clear()