com.steema.teechart.styles
Class Series

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
All Implemented Interfaces:
ISeries, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Calendar, Circular, Custom3D, CustomBar, CustomPoint, FastLine, Funnel, HighLow, Histogram, Map.PolygonSeries, Pyramid, Shape

public class Series
extends TeeBase
implements ISeries, java.lang.Cloneable

Title: Series class

Description: The base class for all TeeChart Series styles.

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

Company: Steema Software

See Also:
Serialized Form

Nested Class Summary
static interface Series.MarkTextResolver
           
 
Field Summary
static int AUTODEPTH
          Constant field for internal use.
static int AUTOZORDER
          Constant field for internal use.
protected  boolean bActive
           
protected  ChartBrush bBrush
           
protected  boolean bColorEach
           
protected  boolean calcVisiblePoints
           
protected  java.lang.String colorMember
           
protected  Series.MarkTextResolver customMarkText
           
protected  boolean drawBetweenPoints
           
protected  int endZ
           
protected  int firstVisible
           
 boolean hasZValues
          Returns true if the series has ZValues.
protected  ColorList iColors
           
 boolean InternalUse
           
protected  int iNumSampleValues
           
 int iZOrder
           
protected  java.lang.String labelMember
           
protected  int lastVisible
           
protected  javax.swing.event.EventListenerList listenerList
           
protected  ValueList mandatory
           
 boolean manualData
           
protected  SeriesMarks marks
           
protected  int middleZ
           
protected  ValueList notMandatory
           
protected  java.text.DecimalFormat percentDecimal
           
protected  java.lang.String percentFormat
           
protected  StringList sLabels
           
protected  int startZ
           
 boolean useAxis
          Returns True when the Series needs axes to display points.
protected  boolean useSeriesColor
           
protected  java.lang.String valueFormat
           
protected  ValueList vxValues
           
protected  ValueList vyValues
           
protected  boolean yMandatory
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
protected Series(IBaseChart c)
           
 
Method Summary
 int add()
          Adds a new null (transparent) point.
 void add(java.util.ArrayList list)
          Adds the collection of objects that implement the IList interface.
 void add(java.util.ArrayList xValues, java.util.ArrayList yValues)
          Adds the X and Y arrays.
 int add(DateTime x, DateTime y)
           
 int add(DateTime x, double y)
          Adds new point with specified DateTime x and Double y values.
 int add(DateTime x, double y, Color c)
          Adds new point with specified DateTime x, Double y values and Color.
 int add(DateTime x, double y, java.lang.String text)
          Adds new point with specified DateTime x, Double y values and Text.
 int add(DateTime aDate, double y, java.lang.String text, Color color)
          Adds a new Datetime point to a Series, label and color.
 int add(double value)
          Adds a new point with specified value.
 void add(double[] values)
          Adds the array of double values.
 int add(double value, Color color)
          Adds a new point with specified value and color.
 int add(double x, double y)
          Adds a new point with specified x and y values.
 int add(double x, double y, Color color)
          Adds a new point with specified x and y values and color.
 int add(double x, double y, java.lang.String text)
          Adds a new point with specified x,y values and text.
 int add(double x, double y, java.lang.String text, Color color)
          Adds a new point with specified x,y values, text and color.
 int add(double value, java.lang.String text)
          Adds a new point with specified value and text.
 int add(double value, java.lang.String text, Color color)
          Adds a new point with specified value, text and color.
 int add(float value)
          Adds a new point with specified value.
 void add(float[] values)
          Adds the array of float values.
 int add(int value)
          Adds a new point with specified value.
 void add(int[] values)
          Adds the array of integer values.
 int add(java.awt.geom.Point2D.Double p)
          Adds the pair of floating point x- and y-pixel coordinates
 void add(Series source)
          Adds all points in source Series.
 int add(java.lang.String text)
          Adds a new null point with specified text.
protected  int addChartValue(Series source, int valueIndex)
           
protected  void added()
           
 int addNull()
          Obsolete.
 int addNullXY(double x, double y)
          Obsolete.
protected  void addSampleValues(int numValues)
           
 void addSeriesMouseListener(SeriesMouseListener l)
           
 void addSeriesPaintListener(SeriesPaintListener l)
           
protected  void addValues(java.util.ArrayList source)
           
 void assign(Series source)
          Copies all properties from one Series component to another.
static Series assignDispose(Series s, Series newSeries)
           
 void assignValues(Series source)
          Adds all Values from Source seriesto the current Series.
 boolean associatedToAxis(Axis a)
           
 void beginUpdate()
          Recalculates the function just one time, when finished adding points.
 void calcFirstLastVisibleIndex()
           
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
 int calcPosValue(double value)
          Returns "Value" parameter coordinate position in pixels.
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 int calcXPos(int index)
          The pixel Screen Horizontal coordinate of the ValueIndex Series value.
 int calcXPosValue(double value)
          The pixel Screen Horizontal coordinate of the specified Value.
 int calcXSizeValue(double value)
          Returns the size in pixels corresponding to value parameter in horizontal axis scales.
 int calcYPos(int index)
          The pixel Screen Vertical coordinate of the ValueIndex Series value.
 int calcYPosValue(double value)
          The pixel Screen Vertical coordinate of the specified Value.
 int calcYSizeValue(double value)
          Returns the size in pixels corresponding to value parameter in vertical axis scales.
 void calcZOrder()
           
protected  boolean canAddRandomPoints()
           
static Series changeType(Series s, java.lang.Class newType)
          Replaces ASeries object with a new Series object of another class.
 void checkDataSource()
          Refreshes all Series point values, either from database Tables or Series points.
 MouseClicked checkMouse(java.awt.Cursor c, int x, int y)
           
 void checkOrder()
          Reorders points according to Order property of X,Y,etc value lists.
 void checkOtherSeries(Series dest)
           
 void clear()
          Removes all points, texts and Colors from the Series.
protected  void clearLists()
           
 int clicked(int x, int y)
          Returns the ValueIndex of the "clicked" point in the Series.
 int clicked(java.awt.Point p)
           
 java.lang.Object clone()
           
 Series cloneSeries()
          Returns a new Series, copy of this original.
protected  double[] convertArray(java.util.ArrayList a, int numPoints)
           
static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction)
          Creates a new Series object and sets the Name, Chart and Function methods.
static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction, int subIndex)
          Creates a new Series object and sets the Name, Chart, Sub-Style and Function methods.
 void createSubGallery(Gallery addSubChart)
           
 java.util.ArrayList dataSourceArray()
           
 void delete(int index)
          Removes the index th point.
 void delete(int index, int count)
           
 void delete(int index, int count, boolean removeGap)
          Removes count number of points starting at index.
 void dispose()
           
protected  void doAfterDrawValues()
           
 void doBeforeDrawChart()
           
protected  void doBeforeDrawValues()
           
 void doClick(int valueIndex, java.awt.event.MouseEvent e)
           
protected  void doClickPointer(int valueIndex, int x, int y)
           
 void doDoubleClick(int valueIndex, java.awt.event.MouseEvent e)
           
protected  void draw()
           
protected  void drawLegend(IGraphics3D g, int valueIndex, Rectangle rect)
           
 void drawLegend(int valueIndex, Rectangle rect)
           
protected  void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
           
protected  void drawMark(int valueIndex, java.lang.String st, SeriesMarksPosition aPosition)
           
 void drawMarks()
           
 void drawSeries()
          Draws the series to the Chart Canvas.
protected  boolean drawSeriesForward(int valueIndex)
           
 void drawValue(int index)
          Called internally.
 boolean drawValuesForward()
          Returns whether Series draws its points in ascending/descending order.
 void endUpdate()
          Recalculates the function just one time, when finished adding points.
 void fillSampleValues()
          Adds random values to help visualize the Series.
 void fillSampleValues(int numValues)
          Adds the specified NumValues random points.
protected  void fireSeriesMouseEvent(SeriesMouseEvent se)
           
protected  void fireSeriesPaint(ChartDrawEvent e)
           
 void galleryChanged3D(boolean is3D)
           
 boolean getActive()
          Shows or hides this series.
 boolean getAllowSinglePoint()
           
 java.net.URL getBitmapEditor()
          Returns the URL of the associated bitmap icon for a given Series class.
 Color getColor()
          Default color for all points.
 boolean getColorEach()
          Draws points with different preset Colors.
 java.lang.String getColorMember()
          The the Datasource Color Field.
 ColorList getColors()
          Accesses the stored Color Array, if created, for the Series.
 int getCount()
          Returns the number of points in the Series.
 int getCountLegendItems()
           
 java.awt.Cursor getCursor()
          Cursor displayed when mouse is over a series point.
 Axis getCustomHorizAxis()
          Specifies the custom horizontal axis for the series.
 Axis getCustomVertAxis()
          Specifies the custom vertical axis for the series.
 java.lang.Object getDataSource()
          Object to load data from.
 int getDepth()
          The Depth of the series points or interconnecting lines.
 java.lang.String getDescription()
          Gets descriptive text.
 int getEndZ()
          For internal use.
protected  int getFields(ValueList otherList)
           
 int getFirstVisible()
          Returns the index of the Series' first visible point.
 Function getFunction()
          Function object to calculate values.
 boolean getHasZValues()
           
 Axis getHorizAxis()
           
 HorizontalAxis getHorizontalAxis()
          Horizontal axis associated to this Series.
 java.lang.String getLabelMember()
          The the Datasource Label Field.
 StringList getLabels()
          Accesses a list of series point labels.
 int getLastVisible()
          Returns the index of the Series' last visible point.
 java.lang.String getLegendString(int legendIndex, LegendTextStyle legendTextStyle)
          Returns the formatted String corresponding to the LegendIndex point.
 ValueList getMandatory()
           
 SeriesMarks getMarks()
          Defines how to draw a mark near to each Series point.
 java.lang.String getMarkText(int valueIndex)
          Returns the String corresponding to the Series Mark text for a given ValueIndex point.
 double getMarkValue(int valueIndex)
          Returns corresponding Point value suitable for displaying at Series Marks.
 double getMaxXValue()
          The Maximum Value of the Series X Values List.
 double getMaxYValue()
          The Maximum Value of the Series Y Values List.
 double getMaxZValue()
          The Maximum Z Value.
 int getMiddleZ()
          For internal use.
 double getMinXValue()
          The Minimum Value of the Series X Values List.
 double getMinYValue()
          The Minimum Value of the Series Y Values List.
 double getMinZValue()
          The Minimum Z Value.
 ValueList getNotMandatory()
           
 int getNumGallerySeries()
          For internal use.
 int getNumSampleValues()
           
 double getOriginValue(int valueIndex)
           
 java.lang.String getPercentFormat()
          The Format to display point values as percentage.
 SeriesXYPoint getPoint(int index)
          Point characteristics.
protected  Color getSeriesColor()
          Obsolete.
 boolean getShowInLegend()
          Displays this Series Title in Legend.
 int getStartZ()
          For internal use.
 java.lang.String getTitle()
          Series description to show in Legend and dialogs.
 boolean getUseAxis()
           
 Color getValueColor(int valueIndex)
          The colour of the index point.
 java.lang.String getValueFormat()
          Determines the Format to display point values.
 Swapper getValueIndexSwapper()
           
 ValueList getValueList(int index)
           
 ValueList getValueList(java.lang.String name)
           
 java.lang.String getValueMarkText(int index)
          Returns the String representation of a Index point used to draw the Mark.
 ValuesLists getValuesLists()
          Returns the steema.teechart.styles.ValuesLists object of the series.
 Axis getVertAxis()
           
 VerticalAxis getVerticalAxis()
          Determines Vertical axis associated to this Series.
 boolean getVisible()
          Returns if this series is Visible.
 ValueList getXValues()
          Values defining horizontal point positions.
 boolean getYMandatory()
          Returns whether or not this Series has Y values as mandatory.
 ValueList getYValueList(java.lang.String aListName)
          Returns the value list that the AListName parameter has.
 ValueList getYValues()
          Values defining vertical point positions.
 int getZOrder()
          Determines where on the depth axis the Series is drawn.
 boolean hasDataSource(java.lang.Object source)
           
protected  boolean hasListenersOf(java.lang.Class listener)
           
 boolean hasNoMandatoryValues()
           
 boolean isNull(int index)
          Returns true if the index th point in the Series is "null" or "empty".
protected  boolean isValidSeriesSource(Series value)
           
 boolean isValidSourceOf(Series value)
          Validates Series datasource.
 Color legendItemColor(int index)
           
 int legendToValueIndex(int legendIndex)
           
 int maxMarkWidth()
          Returns the length in pixels of the longest Mark text.
protected  boolean moreSameZOrder()
          Returns true if there are more series that share the same Z order.
 java.awt.Cursor mouseEvent(java.awt.event.MouseEvent e, java.awt.Cursor c)
           
static Series newFromType(java.lang.Class type)
          Creates a new series from the Class type of an existing series object.
protected  int numSampleValues()
           
 void onDisposing()
           
protected  void paintLegend(java.awt.Graphics g, Rectangle r)
          Draws the Series "Legend" on the specified rectangle and Graphics.
 void prepareForGallery(boolean isEnabled)
           
protected  void prepareLegendCanvas(IGraphics3D g, int valueIndex, Color backColor, ChartBrush aBrush)
           
protected  SeriesRandom randomBounds(int numValues)
           
protected  java.lang.Object readResolve()
           
protected  void recalcGetAxis()
           
 void refreshSeries()
          Recalculates all dependent Series points again.
 void removeMarkTextResolver()
           
 void removeSeriesMouseListener(SeriesMouseListener l)
           
 void removeSeriesPaintListener(SeriesPaintListener l)
           
 void repaint()
          Forces the Chart to Repaint.
protected  boolean sameClass(ISeries s)
          Returns True when the tmpSeries parameter is of the same class.
 void setActive(boolean value)
          Shows or hides this series.
 void setChart(IBaseChart value)
          Chart associated with this object.
 void setColor(Color value)
          Default color for all points.
 void setColorEach(boolean value)
           
 void setColorMember(java.lang.String value)
          Sets the Datasource Color Field.
 void setColors(ColorList value)
          Accesses the stored Color Array, if created, for the Series.
 void setCursor(java.awt.Cursor value)
          Cursor displayed when mouse is over a series point.
 void setCustomHorizAxis(Axis value)
          Specifies the custom horizontal axis for the series.
 void setCustomHorizAxis(int value)
          Specifies the custom horizontal axis for the series.
 void setCustomVertAxis(Axis value)
          Specifies the custom vertical axis for the series.
 void setCustomVertAxis(int value)
          Specifies the custom vertical axis for the series.
 void setDataSource(java.lang.Object value)
          Object to load data from.
 void setDepth(int value)
          Sets the Depth of the series points or interconnecting lines.
 void setEndZ(int value)
           
 void setFunction(Function value)
           
protected  void setHorizontal()
           
 void setHorizontalAxis(HorizontalAxis value)
          Stes the Horizontal axis associated to this Series.
 void setLabelMember(java.lang.String value)
          Sets the Datasource Label Field.
 void setLabels(StringList value)
          Accesses a list of series point labels.
 void setMarks(SeriesMarks value)
           
 void setMarkTextResolver(Series.MarkTextResolver resolver)
           
 void setMiddleZ(int value)
           
 void setNull(int valueIndex)
          Sets the specified series point to a null (transparent) point.
 void setPercentFormat(java.lang.String value)
          Sets the Format to display point values as percentage.
protected  void setSeriesColor(Color value)
          Obsolete.
 void setShowInLegend(boolean value)
          Displays this Series Title in Legend.
 void setStartZ(int value)
           
 void setSubGallery(int index)
          Creates and prepares the index'th Series style to show at sub-gallery dialog.
 void setTitle(java.lang.String value)
          Series description to show in Legend and dialogs.
 void setValueFormat(java.lang.String value)
          Determines the Format to display point values.
protected  void setValueList(ValueList l, ValueList value)
           
 void setVerticalAxis(VerticalAxis value)
          Determines Vertical axis associated to this Series.
 void setVisible(boolean value)
          Shows or hides this series.
 void setXValues(ValueList value)
           
 void setYValues(ValueList value)
           
 void setZOrder(int value)
          Determines where on the depth axis the Series is drawn.
 void setZPositions()
           
 void sortByLabels()
           
 void sortByLabels(ValueListOrder order)
          Sorts all points in the series using the Labels (texts) list.
protected  void swapValueIndex(int a, int b)
          Exchanges one point with another.
 java.lang.String titleOrName()
          Obsolete.
 java.lang.String toString()
          Overridden ToString() method.
 void valuesListAdd(ValueList value)
           
 double xScreenToValue(int screenPos)
          Returns the corresponding X value of a Screen position between Axis limits.
 double yScreenToValue(int screenPos)
          Returns the corresponding Y value of a Screen position between Axis limits.
 
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

AUTODEPTH

public static final int AUTODEPTH
Constant field for internal use.

See Also:
Constant Field Values

AUTOZORDER

public static final int AUTOZORDER
Constant field for internal use.

See Also:
Constant Field Values

listenerList

protected transient javax.swing.event.EventListenerList listenerList

customMarkText

protected transient Series.MarkTextResolver customMarkText

bBrush

protected ChartBrush bBrush

bActive

protected boolean bActive

vxValues

protected ValueList vxValues

vyValues

protected ValueList vyValues

sLabels

protected StringList sLabels

iColors

protected ColorList iColors

bColorEach

protected boolean bColorEach

InternalUse

public boolean InternalUse

iZOrder

public transient int iZOrder

mandatory

protected transient ValueList mandatory

notMandatory

protected transient ValueList notMandatory

manualData

public boolean manualData

marks

protected SeriesMarks marks

startZ

protected transient int startZ

middleZ

protected transient int middleZ

endZ

protec