com.steema.teechart.styles
Class CustomError

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.CustomBar
              extended by com.steema.teechart.styles.Bar
                  extended by com.steema.teechart.styles.CustomError
All Implemented Interfaces:
ISeries, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Error, ErrorBar

public class CustomError
extends Bar

Title: CustomError class

Description: CustomErrorSeries Series.

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

Company: Steema Software SL

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.CustomBar
CustomBar.BarStyleResolver
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
protected  boolean bDrawBar
           
protected  ErrorStyle iErrorStyle
           
 
Fields inherited from class com.steema.teechart.styles.CustomBar
barSizePercent, bDark3D, bUseOrigin, conePercent, customBarSize, dOrigin, iBarBounds, iBarSize, iMultiBar, iNumBars, iOrderPos, iPreviousCount, normalBarColor, pPen
 
Fields inherited from class com.steema.teechart.styles.Series
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, InternalUse, 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
 
Constructor Summary
CustomError()
           
CustomError(IBaseChart c)
           
 
Method Summary
 int add(double x, double y, double errorValue)
          Adds a new Error Bar point to the Series.
 int add(double x, double y, double errorValue, Color color)
          Adds a new Error Bar point to the Series in selected color.
 int add(double x, double y, double errorValue, java.lang.String text)
          Adds a new Error Bar point to the Series with label.
 int add(double x, double y, double errorValue, java.lang.String text, Color color)
          Adds a new Error Bar point in selected color and with label.
protected  void addSampleValues(int numValues)
           
 int addValue(double y, double errorValue)
          Adds a new Error Bar point with y value and error Value only.
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 void drawBar(int barIndex, int startPos, int endPos)
          Displays an ErrorBar point ( BarIndex point ) using the Start and End pixel coordinates.
protected  void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle r)
           
 ChartPen getErrorPen()
          Defines Pen to draw Error "T" on top of Error Bars.
 ErrorStyle getErrorStyle()
          Defines the Error Series Style according to EErrorSeriesStyle.
 ValueList getErrorValues()
          Gets and sets the corresponding Error value for each Bar.
 int getErrorWidth()
          Determines the horizontal size of the Error "T".
 ErrorWidthUnit getErrorWidthUnits()
          The ErrorWidth in pixels or percentage of Bar width.
 double getMaxYValue()
          Returns the Maximum Value of the Series Y Values List.
 double getMinYValue()
          Returns the Minimum Value of the Series Y Values List.
 void prepareForGallery(boolean isEnabled)
           
protected  java.lang.Object readResolve()
           
 void setColor(Color c)
          Default color for all points.
 void setErrorStyle(ErrorStyle value)
          Defines the Error Series Style according to EErrorSeriesStyle.
 void setErrorWidth(int value)
          Determines the horizontal size of the Error "T".
 void setErrorWidthUnits(ErrorWidthUnit value)
          Sets ErrorWidth in pixels or percentage of Bar width.
 
Methods inherited from class com.steema.teechart.styles.Bar
calcXPos, calcYPos, drawMark, drawSeriesForward, drawValue, getBarWidthPercent, getDescription, getMaxXValue, getMinXValue, getOriginPos, internalCalcMarkLength, internalClicked, moreSameZOrder, setBarWidthPercent
 
Methods inherited from class com.steema.teechart.styles.CustomBar
applyBarOffset, barMargin, barRectangle, barRectangle, calcMarkLength, calcZOrder, clicked, createSubGallery, doBarGradient, doBeforeDrawChart, doGetBarStyle, doGradient3D, getAutoMarkPosition, getBarBounds, getBarBoundsMidX, getBarStyle, getBrush, getConePercent, getCustomBarWidth, getDark3D, getDepthPercent, getGradient, getGradientRelative, getMultiBar, getOffsetPercent, getOrigin, getPen, getSideMargins, getStackGroup, getUseOrigin, getYOrigin, internalApplyBarMargin, internalGetOriginPos, maxMandatoryValue, minMandatoryValue, numSampleValues, pointOrigin, removeBarStyleResolver, setAutoMarkPosition, setBarSizePercent, setBarStyle, setBarStyleResolver, setChart, setConePercent, setCustomBarWidth, setDark3D, setDepthPercent, setGradientRelative, setMultiBar, setOffsetPercent, setOrigin, setPenBrushBar, setSideMargins, setStackGroup, setSubGallery, setUseOrigin, setYOrigin, setZPositions, shouldSerializeYOrigin, subGalleryStack
 
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, addNull, addNullXY, addSeriesMouseListener, addSeriesPaintListener, addValues, assign, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPosValue, calcXPosValue, calcXSizeValue, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, createNewSeries, createNewSeries, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, draw, drawLegend, drawLegend, drawMarks, drawSeries, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, galleryChanged3D, getActive, getAllowSinglePoint, getBitmapEditor, getColor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDepth, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, 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, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isValidSeriesSource, isValidSourceOf, legendItemColor, legendToValueIndex, maxMarkWidth, mouseEvent, newFromType, onDisposing, paintLegend, prepareLegendCanvas, randomBounds, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesMouseListener, removeSeriesPaintListener, repaint, sameClass, setActive, setColorEach, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valuesListAdd, xScreenToValue, yScreenToValue
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, 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

iErrorStyle

protected ErrorStyle iErrorStyle

bDrawBar

protected boolean bDrawBar
Constructor Detail

CustomError

public CustomError()

CustomError

public CustomError(IBaseChart c)
Method Detail

readResolve

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

getErrorValues

public ValueList getErrorValues()
Gets and sets the corresponding Error value for each Bar.
The Error value will be displayed as a "T" on top of each Bar.

Returns:
ValueList

getErrorPen

public ChartPen getErrorPen()
Defines Pen to draw Error "T" on top of Error Bars.

Returns:
ChartPen

getErrorStyle

public ErrorStyle getErrorStyle()
Defines the Error Series Style according to EErrorSeriesStyle.
Default value: ErrorStyle.TopBottom

Returns:
ErrorStyle

setErrorStyle

public void setErrorStyle(ErrorStyle value)
Defines the Error Series Style according to EErrorSeriesStyle.
Default value: ErrorStyle.TopBottom

Parameters:
value - ErrorStyle

getErrorWidthUnits

public ErrorWidthUnit getErrorWidthUnits()
The ErrorWidth in pixels or percentage of Bar width.
By default, the Error "T" width is 100% of Bar width.
Default value: ErrorWidthUnit.Percent

Returns:
ErrorWidthUnit

setErrorWidthUnits

public void setErrorWidthUnits(ErrorWidthUnit value)
Sets ErrorWidth in pixels or percentage of Bar width.
Default value: ErrorWidthUnit.Percent

Parameters:
value - ErrorWidthUnit

getErrorWidth

public int getErrorWidth()
Determines the horizontal size of the Error "T".
Size is expressed either in pixels or in percent of Bar width depending on ErrorWidthUnit property. Default value: 100

Returns:
int

setErrorWidth

public void setErrorWidth(int value)
Determines the horizontal size of the Error "T".
Default value: 100

Parameters:
value - int

addSampleValues

protected void addSampleValues(int numValues)
Overrides:
addSampleValues in class Series

calcHorizMargins

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

Overrides:
calcHorizMargins in class Bar
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 Bar
Parameters:
margins - Margins

drawLegendShape

protected void drawLegendShape(IGraphics3D g,
                               int valueIndex,
                               Rectangle r)
Overrides:
drawLegendShape in class CustomBar

prepareForGallery

public void prepareForGallery(boolean isEnabled)
Overrides:
prepareForGallery in class CustomBar

setColor

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

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

add

public int add(double x,
               double y,
               double errorValue,
               java.lang.String text,
               Color color)
Adds a new Error Bar point in selected color and with label.

Parameters:
x - double
y - double
errorValue - double
text - String
color - Color
Returns:
int

add

public int add(double x,
               double y,
               double errorValue,
               java.lang.String text)
Adds a new Error Bar point to the Series with label.

Parameters:
x - double
y - double
errorValue - double
text - String
Returns:
int

add

public int add(double x,
               double y,
               double errorValue)
Adds a new Error Bar point to the Series.

Parameters:
x - double
y - double
errorValue - double
Returns:
int

add

public int add(double x,
               double y,
               double errorValue,
               Color color)
Adds a new Error Bar point to the Series in selected color.

Parameters:
x - double
y - double
errorValue - double
color - Color
Returns:
int

addValue

public int addValue(double y,
                    double errorValue)
Adds a new Error Bar point with y value and error Value only.

Parameters:
y - double
errorValue - double
Returns:
int index of added point

drawBar

public void drawBar(int barIndex,
                    int startPos,
                    int endPos)
Displays an ErrorBar point ( BarIndex point ) using the Start and End pixel coordinates.

Overrides:
drawBar in class Bar
Parameters:
barIndex - int
startPos - int
endPos - int

getMaxYValue

public double getMaxYValue()
Returns the Maximum Value of the Series Y Values List.

Overrides:
getMaxYValue in class Bar
Returns:
double

getMinYValue

public double getMinYValue()
Returns the Minimum Value of the Series Y Values List.

Overrides:
getMinYValue in class Bar
Returns:
double