com.steema.teechart.styles
Class Custom

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.CustomPoint
              extended by com.steema.teechart.styles.Custom
All Implemented Interfaces:
ISeries
Direct Known Subclasses:
Area, Bezier, Line, OHLC, Volume

public class Custom
extends CustomPoint

Title: Custom class

Description: Base Series class inherited by a number of TeeChart series styles.

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Nested Class Summary
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
protected  ChartBrush bAreaBrush
           
protected  boolean bClickableLine
           
protected  boolean bDark3D
           
protected  boolean drawArea
           
protected  boolean drawLine
           
protected  ChartPen linePen
           
protected  ChartPen pAreaLines
           
protected  boolean treatNans
           
protected  TreatNullsStyle treatnulls
           
 
Fields inherited from class com.steema.teechart.styles.CustomPoint
iStacked, point
 
Fields inherited from class com.steema.teechart.styles.Series
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, iNumSampleValues, iZOrder, labelMember, lastVisible, listenerList, mandatory, manualData, marks, middleZ, notMandatory, percentDecimal, percentFormat, sLabels, startZ, useAxis, useSeriesColor, valueFormat, vxValues, vyValues, yMandatory
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Custom()
           
Custom(IBaseChart c)
           
 
Method Summary
 void add(double[] xValues, double[] yValues, boolean append)
           
 int add(double x, double y)
          Adds a new point with specified x and y values.
 void assign(Series source)
          Copies all properties from one Series component to another.
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
protected  double calcMinMaxValue(boolean isMin)
           
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 int clicked(int x, int y)
          Calculates if any point is at XY position.
protected  boolean doNotPaintNull()
           
protected  void draw()
           
 void drawHiddenValue(int valueIndex, PointDouble startEndVals, int gapSize, Axis axis)
           
protected  void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
           
 void drawValue(int valueIndex)
          Called internally.
protected  Color getAreaBrushColor(Color c)
           
 ChartBrush getBrush()
          Sets Brush characteristics.
 boolean getClickableLine()
          Allows mouse clicks over the line drawn between points.
 boolean getColorEachLine()
          Enables/Disables the coloring of each connecting line of a series.
 boolean getDark3D()
          Darkens parts of 3D Line Series to add depth.
 boolean getInvertedStairs()
          Changes the direction of the step, when true.
 int getLineHeight()
          The vertical thickness of the line in pixels.
 ChartPen getLinePen()
          Determines pen to draw the line connecting all points.
 int getOpacity()
          Opacity level from 0 to 100%
 ChartPen getOutLine()
          Pen for Series Line's outer pen.
 boolean getSmoothed()
          Gets whether the Line Series' line is smoothed.
 boolean getStairs()
          Steps line joining adjacent points.
 int getTransparency()
          Transparency level from 0 to 100%
Default value: 0
 boolean getTreatNaNAsNull()
           
 TreatNullsStyle getTreatNulls()
          Defines how null points are treated.
protected  boolean IgnoreNull()
           
protected  java.lang.Object readResolve()
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setClickableLine(boolean value)
          Allows mouse clicks over the line drawn between points.
 void setColor(Color value)
          Default color for all points.
 void setColorEachLine(boolean value)
          Enables/Disables the coloring of each connecting line of a series.
 void setDark3D(boolean value)
          Darkens parts of 3D Line Series to add depth.
 void setInvertedStairs(boolean value)
          Changes the direction of the step, when true.
 void setLineHeight(int value)
          Sets the vertical thickness of the line in pixels.
 void setOpacity(int value)
          Sets Opacity level from 0 to 100%
 void setSmoothed(boolean value)
          Sets whether the Line Series' line is smoothed.
 void setStairs(boolean value)
          Steps line joining adjacent points.
 void setTransparency(int value)
          Sets Transparency level from 0 to 100%
Default value: 0
Example: Series1.setTransparency(45);
 void setTreatNaNAsNull(boolean value)
           
 void setTreatNulls(TreatNullsStyle value)
           
 
Methods inherited from class com.steema.teechart.styles.CustomPoint
addSeriesMouseListener, calcXPos, calcYPos, calcZOrder, clickedPointer, drawMark, drawPointer, getMaxXValue, getMaxYValue, getMinXValue, getMinYValue, getOriginPos, getPointer, getStacked, onGetPointerStyle, removePointerStyleResolver, removeSeriesMouseListener, sameClassOrigin, setPointerStyleResolver, setStacked
 
Methods inherited from class com.steema.teechart.styles.Series
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addChartValue, added, addedValue, addNull, addNullXY, addSampleValues, addSeriesPaintListener, addValues, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPercentSt, calcPosValue, calculateMarkPosition, calcXPosValue, calcXSizeValue, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, countLegendItems, createNewSeries, createNewSeries, createNewSeries, createSubGallery, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, drawLegend, drawLegend, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getColor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getDescription, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, getMandatoryAxis, getMarks, getMarkText, getMarkValue, getMaxZValue, getMiddleZ, getMinZValue, getNotMandatory, getNumGallerySeries, getNumSampleValues, getOriginValue, getPercentFormat, getPoint, getSeriesColor, getShowInLegend, getStartZ, getTitle, getUseAxis, getValueColor, getValueFormat, getValueIndexSwapper, getValueList, getValueList, getValueMarkText, getValuesLists, getVertAxis, getVerticalAxis, getVisible, getXValues, getYMandatory, getYValueList, getYValues, getZOrder, hasClickEvents, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isPointInChartRect, isValidSeriesSource, isValidSourceOf, lastDisplayed, lastVisibleMark, legendItemColor, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, prepareForGallery, prepareLegendCanvas, randomBounds, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesPaintListener, repaint, sameClass, setActive, setColorEach, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDefaultNullValue, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setSubGallery, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valueListOfAxis, valuesListAdd, xScreenToValue, yScreenToValue
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.styles.ISeries
getChart, invalidate
 

Field Detail

bAreaBrush

protected ChartBrush bAreaBrush

pAreaLines

protected ChartPen pAreaLines

bClickableLine

protected boolean bClickableLine

bDark3D

protected boolean bDark3D

drawArea

protected boolean drawArea

drawLine

protected boolean drawLine

linePen

protected ChartPen linePen

treatnulls

protected TreatNullsStyle treatnulls

treatNans

protected boolean treatNans
Constructor Detail

Custom

public Custom()

Custom

public Custom(IBaseChart c)
Method Detail

readResolve

protected java.lang.Object readResolve()
Overrides:
readResolve in class Series

getClickableLine

public boolean getClickableLine()
Allows mouse clicks over the line drawn between points.
Default value: true

Example:


 lineSeries.setClickableLine( false );
 

Returns:
boolean

setClickableLine

public void setClickableLine(boolean value)
Allows mouse clicks over the line drawn between points.
Default value: true

Parameters:
value - boolean

getOpacity

public int getOpacity()
Opacity level from 0 to 100%

Returns:
int

setOpacity

public void setOpacity(int value)
Sets Opacity level from 0 to 100%

Parameters:
value - int

getTransparency

public int getTransparency()
Transparency level from 0 to 100%
Default value: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Sets Transparency level from 0 to 100%
Default value: 0

Example:


 Series1.setTransparency(45);
 

Parameters:
value - int

getBrush

public ChartBrush getBrush()
Sets Brush characteristics.

Overrides:
getBrush in class Series
Returns:
ChartBrush

getDark3D

public boolean getDark3D()
Darkens parts of 3D Line Series to add depth.
Default value: true

Returns:
boolean

setDark3D

public void setDark3D(boolean value)
Darkens parts of 3D Line Series to add depth.
Default value: true

Parameters:
value - boolean

setChart

public void setChart(IBaseChart c)
Description copied from class: TeeBase
Chart associated with this object.

Specified by:
setChart in interface ISeries
Overrides:
setChart in class CustomPoint
Parameters:
c - IBaseChart

setColor

public void setColor(Color value)
Description copied from class: Series
Default color for all points.
Default value: Color.Empty

Overrides:
setColor in class Series
Parameters:
value - Color
See Also:
Series.getColorEach()

getStairs

public boolean getStairs()
Steps line joining adjacent points.
In most normal situations, a series draws a line between each Line point. This makes the Line appear as a "mountain" shape. However, setting Stairs to true will make the Series draw 2 Lines between each pair of points, thus giving a "stair" appearance.
This is most used in some financial Chart representations.
When Stairs is set to true you may set InvertedStairs to true to alter the direction of the step.
Default value: false

Returns:
boolean

setStairs

public void setStairs(boolean value)
Steps line joining adjacent points.
Default value: false

Example:


 areaSeries1.setStairs(true);
 areaSeries2.setStairs(true);
 

Parameters:
value - boolean
See Also:
getStairs()

getColorEachLine

public boolean getColorEachLine()
Enables/Disables the coloring of each connecting line of a series.
Default value: true

Example:


 lineSeries.setColorEach(true); lineSeries.setColorEachLine(false);
 

Returns:
boolean

setColorEachLine

public void setColorEachLine(boolean value)
Enables/Disables the coloring of each connecting line of a series.
Default value: true

Parameters:
value - boolean

getInvertedStairs

public boolean getInvertedStairs()
Changes the direction of the step, when true.
Default value: false

Returns:
boolean

setInvertedStairs

public void setInvertedStairs(boolean value)
Changes the direction of the step, when true.
Default value: false

Parameters:
value - boolean

getOutLine

public ChartPen getOutLine()
Pen for Series Line's outer pen.
Default value: null

Example:


 lineSeries.getOutline().setColor(Color.Yellow);
 

Returns:
ChartPen

getSmoothed

public boolean getSmoothed()
Gets whether the Line Series' line is smoothed.
Default value: false

Returns:
boolean

assign

public void assign(Series source)
Description copied from class: Series
Copies all properties from one Series component to another.
Only the common properties shared by both source and destination Series are copied.
The following code copies all properties from Series2 into Series1:

Series1.Assign( Series2 ) ;

Some Series types restore method values after assigning them. For example, Points series restores the Pointer.Visible method to true after being assigned to a Line series, which has Pointers invisible by default.
Note: Series events are not assigned. Series DataSource and FunctionType properties are assigned. Assign is used by CloneChartSeries and ChangeSeriesType methods for example.

Overrides:
assign in class CustomPoint
Parameters:
source - Series

setSmoothed

public void setSmoothed(boolean value)
Sets whether the Line Series' line is smoothed.
Default value: false


getLineHeight

public int getLineHeight()
The vertical thickness of the line in pixels.
Default value: 0

Returns:
int

setLineHeight

public void setLineHeight(int value)
Sets the vertical thickness of the line in pixels.
Default value: 0

Parameters:
value - int

calcHorizMargins

public void calcHorizMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for horizontal margins

Overrides:
calcHorizMargins in class CustomPoint
Parameters:
margins - Margins

calcVerticalMargins

public void calcVerticalMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for vertical margins

Overrides:
calcVerticalMargins in class CustomPoint
Parameters:
margins - Margins

clicked

public int clicked(int x,
                   int y)
Calculates if any point is at XY position.

Specified by:
clicked in interface ISeries
Overrides:
clicked in class CustomPoint
Parameters:
x - int
y - int
Returns:
int Point index

draw

protected void draw()
Overrides:
draw in class Series

getAreaBrushColor

protected Color getAreaBrushColor(Color c)

drawValue

public void drawValue(int valueIndex)
Called internally. Draws the "ValueIndex" point of the Series.

Specified by:
drawValue in interface ISeries
Overrides:
drawValue in class CustomPoint
Parameters:
valueIndex - int

drawHiddenValue

public void drawHiddenValue(int valueIndex,
                            PointDouble startEndVals,
                            int gapSize,
                            Axis axis)
Overrides:
drawHiddenValue in class Series

drawLegendShape

protected void drawLegendShape(IGraphics3D g,
                               int valueIndex,
                               Rectangle rect)
Overrides:
drawLegendShape in class CustomPoint

calcMinMaxValue

protected double calcMinMaxValue(boolean isMin)

getLinePen

public ChartPen getLinePen()
Determines pen to draw the line connecting all points.

Returns:
ChartPen

getTreatNulls

public TreatNullsStyle getTreatNulls()
Defines how null points are treated.

Returns:
TreatNullsStyle

setTreatNulls

public void setTreatNulls(TreatNullsStyle value)

add

public void add(double[] xValues,
                double[] yValues,
                boolean append)
Overrides:
add in class Series

add

public int add(double x,
               double y)
Description copied from class: Series
Adds a new point with specified x and y values.

Specified by:
add in interface ISeries
Overrides:
add in class Series
Parameters:
x - double
y - double
Returns:
int

IgnoreNull

protected boolean IgnoreNull()

doNotPaintNull

protected boolean doNotPaintNull()

getTreatNaNAsNull

public boolean getTreatNaNAsNull()

setTreatNaNAsNull

public void setTreatNaNAsNull(boolean value)