|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.steema.teechart.TeeBase
com.steema.teechart.functions.Function
public class Function
Title: Function class
Description: Basic abstract function class. Examples of derived functions are: Add, Subtract, High, Low, Average and Count.
Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Field Summary | |
---|---|
protected boolean |
canUsePeriod
|
protected double |
dPeriod
|
boolean |
HideSourceList
|
boolean |
noSourceRequired
|
protected Series |
series
|
boolean |
SingleSource
|
protected boolean |
updating
|
Fields inherited from class com.steema.teechart.TeeBase |
---|
chart |
Constructor Summary | |
---|---|
Function()
|
|
Function(IBaseChart c)
|
Method Summary | |
---|---|
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. First and Last parameters are ValueIndex of first and last point used in calculation. |
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). The ValueIndex parameter defines ValueIndex of point in each Series in list. |
protected void |
calculatePeriod(Series source,
double tmpX,
int firstIndex,
int lastIndex)
|
void |
clear()
|
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. Zero means all source points. For example, Average function uses the Period property to calculate a new average point each time the "Period" number of points or X range is exceed. |
PeriodAlign |
getPeriodAlign()
Controls where to place function calculations inside the full period space. The position of calculation output points within range. When the function Period is greater than zero (so it calculates by groups of points), the function results are added to the series by default at the center position of the Function Period. |
PeriodStyle |
getPeriodStyle()
Controls how the Period property is interpreted. Either as number of points or as range. Range means Period property is specified in a range of values. |
Series |
getSeries()
Returns the Series parent of Function. Run-time and read only. |
static Function |
newInstance(java.lang.Class f)
|
protected java.lang.Object |
readResolve()
|
void |
recalculate()
Performs a checkDataSource method call on parent Series. Basically, all points in parent Series are recalculated. The recalculating is performed only if internal updating flag is set to false. To make sure updating is set to false, you can call Function endUpdate() method prior to calling Function recalculate. |
void |
setPeriod(double value)
|
void |
setPeriodAlign(PeriodAlign value)
|
void |
setPeriodStyle(PeriodStyle value)
|
void |
setSeries(Series value)
|
protected ValueList |
valueList(Series s)
|
Methods inherited from class com.steema.teechart.TeeBase |
---|
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public Function()
public Function(IBaseChart c)
Method Detail |
---|
protected java.lang.Object readResolve()
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
- int
public double calculateMany(java.util.ArrayList sourceSeries, int valueIndex)
sourceSeries
- ArrayListvalueIndex
- int
protected void calculateAllPoints(Series source, ValueList notMandatorySource)
protected void calculateByPeriod(Series source, ValueList notMandatorySource)
public java.lang.String getDescription()
protected void doCalculation(Series source, ValueList notMandatorySource)
protected ValueList valueList(Series s)
public void addPoints(java.util.ArrayList source)
source
- ArrayListpublic void recalculate()
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |