com.steema.teechart.styles
Class Circular

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.Circular
All Implemented Interfaces:
ISeries, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
CircularGauge, CustomPolar, Gauges, Pie, Smith

public class Circular
extends Series

Title: Circular class

Description: Circled Series.

Copyright (c) 2005-2008 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.Series
Series.MarkTextResolver
 
Field Summary
protected  int circleHeight
           
protected  int circleWidth
           
protected  boolean iAdjustCircleForMarks
           
protected  int iCircleXCenter
           
protected  int iCircleYCenter
           
protected  int iXRadius
           
protected  int iYRadius
           
static double PIDEGREE
          Represents the static finalant pi / 180.
protected  Rectangle rCircleRect
           
protected  double rotDegree
           
 
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
Circular()
           
Circular(IBaseChart c)
           
 
Method Summary
protected  void adjustCircleRect()
           
 Point angleToPos(double angle, double aXRadius, double aYRadius)
          Returns the exact Screen position for a given pair of Angle and Radius values.
 boolean associatedToAxis(Axis a)
           
protected  Color calcCircleBackColor()
           
protected  Gradient calcCircleGradient()
           
protected  void calcRadius()
           
protected  void doBeforeDrawValues()
           
 Color getCircleBackColor()
          Determines the color to fill the ellipse.
 boolean getCircled()
          The CirleSeries as elliptical or circular.
 Gradient getCircleGradient()
          Determines the Gradient which fills the ellipse.
 int getCircleHeight()
          Returns the height of the bounding Circle.
 Rectangle getCircleRect()
          Returns the rectangle that bounds the circle.
 int getCircleWidth()
          Returns the width of the bounding Circle.
 int getCircleXCenter()
          Returns the exact horizontal position of ellipse's center in pixels.
 int getCircleYCenter()
          Returns the exact vertical position of the ellipse's center in pixels.
 int getCustomXRadius()
          The ellipse's horizontal radius in pixels.
 int getCustomYRadius()
          The ellipse's vertical radius in pixels.
 int getRotationAngle()
          The angle of Chart rotation.
 int getXRadius()
          Returns the exact horizontal size of the ellipse's radius in pixels.
 int getYRadius()
          Returns the exact vertical size of the ellipse's radius in pixels.
 void onDisposing()
           
 double pointToAngle(int x, int y)
          Returns the angle from the XY point parameter to the circle center.
 double pointToRadius(int x, int y)
          Returns the radius from XY point to the circle center.
protected  void prepareLegendCanvas(IGraphics3D g, int valueIndex, Color backColor, ChartBrush aBrush)
           
protected  java.lang.Object readResolve()
           
protected  void reCalcCircleRect()
           
 void rotate(int angle)
          Returns the angle by which the Chart is rotated.
 void setActive(boolean value)
          Shows or hides this series.
 void setChart(IBaseChart value)
          Chart associated with this object.
 void setCircleBackColor(Color value)
          Determines the color to fill the ellipse.
 void setCircled(boolean value)
          Sets CirleSeries as elliptical or circular.
 void setCustomXRadius(int value)
          Sets ellipse's horizontal radius in pixels.
 void setCustomYRadius(int value)
          Sets ellipse's vertical radius in pixels.
protected  void setParentProperties(boolean enableParentProps)
           
 void setRotationAngle(int value)
          Sets angle of Chart rotation.
protected  boolean shouldSerializeCircleBackColor()
           
 
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, add, addChartValue, added, addedValue, addNull, addNullXY, addSampleValues, addSeriesMouseListener, addSeriesPaintListener, addValues, assign, assignDispose, assignValues, beginUpdate, calcFirstLastVisibleIndex, calcHorizMargins, calcPercentSt, calcPosValue, calculateMarkPosition, calcVerticalMargins, calcXPos, calcXPosValue, calcXSizeValue, calcYPos, calcYPosValue, calcYSizeValue, calcZOrder, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clicked, clone, cloneSeries, convertArray, countLegendItems, createNewSeries, createNewSeries, createSubGallery, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doClick, doClickPointer, doDoubleClick, draw, drawLegend, drawLegend, drawLegendShape, drawMark, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValue, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getBitmapEditor, getBrush, 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, getMaxXValue, getMaxYValue, getMaxZValue, getMiddleZ, getMinXValue, getMinYValue, 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, prepareForGallery, randomBounds, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesMouseListener, removeSeriesPaintListener, repaint, sameClass, setColor, 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, 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

PIDEGREE

public static final double PIDEGREE
Represents the static finalant pi / 180.

See Also:
Constant Field Values

circleWidth

protected int circleWidth

circleHeight

protected int circleHeight

iXRadius

protected int iXRadius

iYRadius

protected int iYRadius

iCircleXCenter

protected int iCircleXCenter

iCircleYCenter

protected int iCircleYCenter

rCircleRect

protected Rectangle rCircleRect

rotDegree

protected double rotDegree

iAdjustCircleForMarks

protected boolean iAdjustCircleForMarks
Constructor Detail

Circular

public Circular()

Circular

public Circular(IBaseChart c)
Method Detail

readResolve

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

adjustCircleRect

protected void adjustCircleRect()

reCalcCircleRect

protected void reCalcCircleRect()

calcCircleBackColor

protected Color calcCircleBackColor()

calcCircleGradient

protected Gradient calcCircleGradient()

calcRadius

protected void calcRadius()

doBeforeDrawValues

protected void doBeforeDrawValues()
Overrides:
doBeforeDrawValues in class Series

prepareLegendCanvas

protected void prepareLegendCanvas(IGraphics3D g,
                                   int valueIndex,
                                   Color backColor,
                                   ChartBrush aBrush)
Overrides:
prepareLegendCanvas in class Series

setActive

public void setActive(boolean value)
Description copied from class: Series
Shows or hides this series.
It can be changed both at design time or runtime. When hiding, all point values are preserved, so there's no need to refill the values again when showing them. The Series relatives Chart Axis are rescaled in order to accomodate changes.

Specified by:
setActive in interface ISeries
Overrides:
setActive in class Series
Parameters:
value - boolean

onDisposing

public void onDisposing()
Specified by:
onDisposing in interface ISeries
Overrides:
onDisposing in class Series

setChart

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

Specified by:
setChart in interface ISeries
Overrides:
setChart in class Series
Parameters:
value - IBaseChart

setParentProperties

protected void setParentProperties(boolean enableParentProps)

getRotationAngle

public int getRotationAngle()
The angle of Chart rotation.
The RotationAngle can be a valid integer number between 0 and 359.
This angle can be changed by code to rotate the Pie (or Polar).
Default value: 0

Returns:
int

setRotationAngle

public void setRotationAngle(int value)
Sets angle of Chart rotation.
Default value: 0

Example:


 pieSeries = new com.steema.teechart.styles.Pie(myChart.getChart());
 pieSeries.getMarks().setVisible(true);
 pieSeries.getMarks().setStyle(MarksStyle.LABELPERCENT);
 pieSeries.fillSampleValues(5);
 pieSeries.setAngleSize(180);
 pieSeries.setRotationAngle(90);
 

Parameters:
value - int

angleToPos

public Point angleToPos(double angle,
                        double aXRadius,
                        double aYRadius)
Returns the exact Screen position for a given pair of Angle and Radius values.

Parameters:
angle - double
aXRadius - double
aYRadius - double
Returns:
Point

associatedToAxis

public boolean associatedToAxis(Axis a)
Specified by:
associatedToAxis in interface ISeries
Overrides:
associatedToAxis in class Series

pointToAngle

public double pointToAngle(int x,
                           int y)
Returns the angle from the XY point parameter to the circle center.

Parameters:
x - int
y - int
Returns:
double

pointToRadius

public double pointToRadius(int x,
                            int y)
Returns the radius from XY point to the circle center.

Parameters:
x - int
y - int
Returns:
double

rotate

public void rotate(int angle)
Returns the angle by which the Chart is rotated.

Parameters:
angle - int

getXRadius

public int getXRadius()
Returns the exact horizontal size of the ellipse's radius in pixels.
The ellipse XRadius can be set to a fixed number of pixels by using this method. Circled series.Circled controls whether both radii must be proportional to the Screen X/Y ratio.

Returns:
int

getYRadius

public int getYRadius()
Returns the exact vertical size of the ellipse's radius in pixels.
The ellipse YRadius can be set to a fixed number of pixels by using this method. Circled series .Circled controls whether both radii must be proportional to the Screen X/Y ratio.

Returns:
int

getCircleXCenter

public int getCircleXCenter()
Returns the exact horizontal position of ellipse's center in pixels.
Run-time and read only. The ellipse's radius is determined by Circled series.XRadius and YRadius. The AngleToPoint function converts from angles to X and Y Screen coordinates. The PointToAngle function converts from XY Screen positions to angles.

Returns:
int

getCircleYCenter

public int getCircleYCenter()
Returns the exact vertical position of the ellipse's center in pixels.
The ellipse's radius is determined by Circled series.XRadius and YRadius. The AngleToPoint function converts from angles to X and Y Screen coordinates. The PointToAngle function converts from XY Screen positions to angles.

Returns:
int

getCircleWidth

public int getCircleWidth()
Returns the width of the bounding Circle.

Returns:
int

getCircleHeight

public int getCircleHeight()
Returns the height of the bounding Circle.

Returns:
int

getCircleRect

public Rectangle getCircleRect()
Returns the rectangle that bounds the circle.
eg. Pie Series, in its default position displacement of elevevation, rotation ,etc not applied.

Returns:
Rectangle

shouldSerializeCircleBackColor

protected boolean shouldSerializeCircleBackColor()

getCircleBackColor

public Color getCircleBackColor()
Determines the color to fill the ellipse.
Setting it to Color.EMPTY indicates the CircledSeries to use to tChart.getPanel().getColor() color.

Returns:
Color

setCircleBackColor

public void setCircleBackColor(Color value)
Determines the color to fill the ellipse.

Parameters:
value - Color

getCircleGradient

public Gradient getCircleGradient()
Determines the Gradient which fills the ellipse.
Default value: null

Example:


 series = new com.steema.teechart.styles.Polar(myChart.getChart());
 series.fillSampleValues(20);
 series.setCircled(true);
 series.getCircleGradient().setDirection(GradientDirection.RADIAL);
 series.getCircleGradient().setStartColor(Color.WHITE);
 series.getCircleGradient().setEndColor(Color.DARK_GRAY);
 series.getCircleGradient().setRadialX(100);
 series.getCircleGradient().setRadialY(-100);
 series.getCircleGradient().setVisible(true);
 series.getCirclePen().setColor(Color.NAVY);
 series.getCirclePen().setStyle(DashStyle.DOT);
 series.getCirclePen().setWidth(2);
 

Returns:
Gradient

getCircled

public boolean getCircled()
The CirleSeries as elliptical or circular.
Default value: false

Returns:
boolean

setCircled

public void setCircled(boolean value)
Sets CirleSeries as elliptical or circular.
Default value: false

Parameters:
value - boolean

getCustomXRadius

public int getCustomXRadius()
The ellipse's horizontal radius in pixels.
Default value: 0

Returns:
int

setCustomXRadius

public void setCustomXRadius(int value)
Sets ellipse's horizontal radius in pixels.
Default value: 0

Parameters:
value - int

getCustomYRadius

public int getCustomYRadius()
The ellipse's vertical radius in pixels.
Default value: 0

Returns:
int

setCustomYRadius

public void setCustomYRadius(int value)
Sets ellipse's vertical radius in pixels.
Default value: 0

Parameters:
value - int