JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart.data
Class BaseDataSource

java.lang.Object
  |
  +--com.klg.jclass.chart.ChartDataSupport
        |
        +--com.klg.jclass.chart.data.BaseDataSource
All Implemented Interfaces:
ChartDataManageable, ChartDataManager, ChartDataModel, HoleValueChartDataModel, com.klg.jclass.chart.ImageMapChartDataModel, LabelledChartDataModel, Serializable
Direct Known Subclasses:
JCDefaultDataSource, JCInputStreamDataSource

public class BaseDataSource
extends ChartDataSupport
implements ChartDataModel, LabelledChartDataModel, HoleValueChartDataModel, ChartDataManageable, Serializable, com.klg.jclass.chart.ImageMapChartDataModel

This class is the base for any data source that chooses to store data internally using arrays.

See Also:
Serialized Form

Field Summary
protected  boolean cloneArrays
           
protected  com.klg.jclass.util.ImageMapInfo[] clusterImageMapInfo
           
protected  double holeValue
           
protected  com.klg.jclass.util.ImageMapInfo[] legendImageMapInfo
           
protected  String name
           
protected  com.klg.jclass.util.ImageMapInfo[][] pointImageMapInfo
           
protected  String[] pointLabels
           
protected  com.klg.jclass.util.ImageMapInfo[] seriesImageMapInfo
           
protected  String[] seriesLabels
           
protected  double[][] xvalues
           
protected  double[][] yvalues
           
 
Fields inherited from class com.klg.jclass.chart.ChartDataSupport
source
 
Fields inherited from interface com.klg.jclass.chart.ChartDataModel
ALL
 
Constructor Summary
BaseDataSource()
           
 
Method Summary
protected  double[] cloneCheck(double[] a)
          Convenience method used to optionally clone a double array.
protected  com.klg.jclass.util.ImageMapInfo[] cloneCheck(com.klg.jclass.util.ImageMapInfo[] a)
          Convenience method used to optionally clone an ImageMapInfo array.
protected  String[] cloneCheck(String[] a)
          Convenience method used to optionally clone a String array.
 com.klg.jclass.chart.ChartDataManager getChartDataManager()
          Retrieves the ChartDataManager instance.
 boolean getCloneArrays()
          Gets the value of the CloneArrays property.
 com.klg.jclass.util.ImageMapInfo[] getClusterImageMapInfo()
          Retrieves an array of image map information, one for each point cluster.
 String getDataSourceName()
          Retrieves the name for the data source.
 double getHoleValue()
          Retrieves the hole value for the data source.
 com.klg.jclass.util.ImageMapInfo[] getLegendImageMapInfo()
          Retrieves an array of legend image map information, one for each series.
 int getNumSeries()
          Retrieves the number of data series.
 com.klg.jclass.util.ImageMapInfo[] getPointImageMapInfo(int seriesIndex)
          Retrieves a array of image map information indexed by series.
 String[] getPointLabels()
          Retrieves the labels to be used for each point in a particular data series.
 com.klg.jclass.util.ImageMapInfo[] getSeriesImageMapInfo()
          Retrieves an array of image map information, one for each series.
 String[] getSeriesLabels()
          Retrieves the labels to be used for each data series.
 double[] getXSeries(int index)
          Retrieves the specified x-value series.
 double[] getYSeries(int index)
          Retrieves the specified y-value series.
 void setCloneArrays(boolean ca)
          Sets the value of the CloneArrays property.
 
Methods inherited from class com.klg.jclass.chart.ChartDataSupport
addChartDataListener, fireChartDataEvent, fireChartDataEvent, removeChartDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xvalues

protected double[][] xvalues

yvalues

protected double[][] yvalues

name

protected String name

seriesLabels

protected String[] seriesLabels

pointLabels

protected String[] pointLabels

holeValue

protected double holeValue

pointImageMapInfo

protected com.klg.jclass.util.ImageMapInfo[][] pointImageMapInfo

clusterImageMapInfo

protected com.klg.jclass.util.ImageMapInfo[] clusterImageMapInfo

seriesImageMapInfo

protected com.klg.jclass.util.ImageMapInfo[] seriesImageMapInfo

legendImageMapInfo

protected com.klg.jclass.util.ImageMapInfo[] legendImageMapInfo

cloneArrays

protected boolean cloneArrays
Constructor Detail

BaseDataSource

public BaseDataSource()
Method Detail

getXSeries

public double[] getXSeries(int index)
Retrieves the specified x-value series.

Specified by:
getXSeries in interface ChartDataModel
Parameters:
index - data series index
Returns:
array of double values representing x-value data

getYSeries

public double[] getYSeries(int index)
Retrieves the specified y-value series.

Specified by:
getYSeries in interface ChartDataModel
Parameters:
index - data series index
Returns:
array of double values representing x-value data

getNumSeries

public int getNumSeries()
Retrieves the number of data series.

Specified by:
getNumSeries in interface ChartDataModel
Returns:
The number of data series

getPointLabels

public String[] getPointLabels()
Description copied from interface: LabelledChartDataModel
Retrieves the labels to be used for each point in a particular data series.

Specified by:
getPointLabels in interface LabelledChartDataModel
Returns:
array of point labels

getSeriesLabels

public String[] getSeriesLabels()
Retrieves the labels to be used for each data series.

Specified by:
getSeriesLabels in interface LabelledChartDataModel
Returns:
An array of series labels

getDataSourceName

public String getDataSourceName()
Retrieves the name for the data source.

Specified by:
getDataSourceName in interface LabelledChartDataModel
Returns:
The current name for the data source

getHoleValue

public double getHoleValue()
Retrieves the hole value for the data source.

Specified by:
getHoleValue in interface HoleValueChartDataModel
Returns:
The current hole value for the data source

getPointImageMapInfo

public com.klg.jclass.util.ImageMapInfo[] getPointImageMapInfo(int seriesIndex)
Retrieves a array of image map information indexed by series.

Specified by:
getPointImageMapInfo in interface com.klg.jclass.chart.ImageMapChartDataModel
Parameters:
seriesIndex - The series whose image map informaiton is required.
Returns:
The current point image map information list for the given series.

getClusterImageMapInfo

public com.klg.jclass.util.ImageMapInfo[] getClusterImageMapInfo()
Retrieves an array of image map information, one for each point cluster.

Specified by:
getClusterImageMapInfo in interface com.klg.jclass.chart.ImageMapChartDataModel
Returns:
The current cluster image map information array.

getSeriesImageMapInfo

public com.klg.jclass.util.ImageMapInfo[] getSeriesImageMapInfo()
Retrieves an array of image map information, one for each series.

Specified by:
getSeriesImageMapInfo in interface com.klg.jclass.chart.ImageMapChartDataModel
Returns:
The current series image map information array.

getLegendImageMapInfo

public com.klg.jclass.util.ImageMapInfo[] getLegendImageMapInfo()
Retrieves an array of legend image map information, one for each series.

Specified by:
getLegendImageMapInfo in interface com.klg.jclass.chart.ImageMapChartDataModel
Returns:
The current legend image map information array.

getChartDataManager

public com.klg.jclass.chart.ChartDataManager getChartDataManager()
Retrieves the ChartDataManager instance. Required by the ChartDataManageable interface.

Specified by:
getChartDataManager in interface ChartDataManageable
Returns:
The ChartDataManager instance

setCloneArrays

public void setCloneArrays(boolean ca)
Sets the value of the CloneArrays property. The CloneArrays property determines whether the data source makes a copy of x and y series arrays before sending them to the chart.

Parameters:
ca - If true, make a copy of arrays

getCloneArrays

public boolean getCloneArrays()
Gets the value of the CloneArrays property. The CloneArrays property determines whether the data source makes a copy of x and y series arrays before sending them to the chart.

Returns:
The current value of the CloneArrays property

cloneCheck

protected double[] cloneCheck(double[] a)
Convenience method used to optionally clone a double array. Override this method if you want to change the way array copies are made.

Parameters:
a - The array to clone
Returns:
The array or its clone depending of the value of the CloneArrays property

cloneCheck

protected String[] cloneCheck(String[] a)
Convenience method used to optionally clone a String array. Override this method if you want to change the way array copies are made.

Parameters:
a - The array to clone
Returns:
The array or its clone depending of the value of the CloneArrays property

cloneCheck

protected com.klg.jclass.util.ImageMapInfo[] cloneCheck(com.klg.jclass.util.ImageMapInfo[] a)
Convenience method used to optionally clone an ImageMapInfo array. Override this method if you want to change the way array copies are made.

Parameters:
a - The array to clone
Returns:
The array or its clone depending of the value of the CloneArrays property

Copyright © 2004 Quest Software Inc..
All rights reserved.