All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCDataIndex

java.lang.Object
   |
   +----jclass.chart.JCDataIndex

public class JCDataIndex
extends Object
implements HTMLHandler
JCDataIndex contains a unique index to a data point in Chart consisting of a data series instance and an index representing the point within the data series. It is used by the chart pick() methods and also contains information related to these operations.

Properties

Name Description
DataView The DataView property holds the data view that the data point is a member of. Default value is null.
Distance The Distance property holds the distance from the point selected by a pick operation to the nearest data point. Default value is Integer.MAX_VALUE.
Obj The Obj property holds the object selected by a pick operation (e.g. a JCChartArea instance or a JCLegend instance). Default value is null.
Point The Point property holds the index of the data point within the appropriate data series. Default value is -1.
Series The Series specifies the series that data point belongs to. Default value is null.
SeriesIndex The SeriesIndex property holds the index of the data series within the chart's list of data series that contains the data point. If this class is referring to the other slice of a pie chart, the value will be JCPieChartFormat.OTHER_SLICE. Default value is -1


Constructor Index

 o JCDataIndex()
Simple constructor for JCDataIndex
 o JCDataIndex(ChartDataView, ChartDataViewSeries, int, int)
Constructor that creates a data index from the standard information needed to create a data index : a data view, a series instance, the index of that series instance, and a point index.
 o JCDataIndex(int, ChartDataViewSeries)
Constructor that creates a data index from a series instance and a point index within that series.

Method Index

 o equals(Object)
Determines if the specified object refers to the same data point as this JCDataIndex instance.
 o getDataView()
Gets the value of the DataView property.
 o getDistance()
Gets the value of the Distance property.
 o getObject()
Gets the value of the Obj property.
 o getPoint()
Gets the value of the Point property.
 o getSeries()
Gets the value of the Series property.
 o getSeriesIndex()
Gets the value of the SeriesIndex property.
 o loadParams(String, JCChart)
Load JCChart parameters from HTML file
 o saveParams(String, JCChart)
Save JCChart parameters as HTML tags
 o setDataView(ChartDataView)
Sets the value of the DataView property.
 o setDistance(int)
Sets the value of the Distance property.
 o setObject(Object)
Sets the value of the Obj property.
 o setPoint(int)
Gets the value of the Point property.
 o setSeries(ChartDataViewSeries)
Gets the value of the Series property.
 o setSeriesIndex(int)
Sets the value of the SeriesIndex property.

Constructors

 o JCDataIndex
 public JCDataIndex()
Simple constructor for JCDataIndex

 o JCDataIndex
 public JCDataIndex(int p,
                    ChartDataViewSeries s)
Constructor that creates a data index from a series instance and a point index within that series. It fills in the dataView and seriesIndex memebers bases on information from the series instance.

Parameters:
p - the point index within the series
s - the data series instance that holds the point
 o JCDataIndex
 public JCDataIndex(ChartDataView dv,
                    ChartDataViewSeries s,
                    int i,
                    int p)
Constructor that creates a data index from the standard information needed to create a data index : a data view, a series instance, the index of that series instance, and a point index.

Parameters:
dv - the data view that holds the series and point
s - the data series instance that holds the point
i - index of the data series within the series list
p - the point index within the series

Methods

 o getSeries
 public ChartDataViewSeries getSeries()
Gets the value of the Series property. It containts the ChartDataViewSeries instance that holds the point that this data index class is referring to.

Returns:
the data series instance.
 o setSeries
 public void setSeries(ChartDataViewSeries s)
Gets the value of the Series property. It containts the ChartDataViewSeries instance that holds the point that this data index class is referring to.

Parameters:
s - the data series instance.
 o getDataView
 public ChartDataView getDataView()
Gets the value of the DataView property. It contains the ChartDataView instance that holds the point that this data index class is referring to.

Returns:
the data view.
 o setDataView
 public void setDataView(ChartDataView view)
Sets the value of the DataView property. It contains the ChartDataView instance that holds the point that this data index class is referring to.

Parameters:
view - the data view.
 o getSeriesIndex
 public int getSeriesIndex()
Gets the value of the SeriesIndex property. It contains the index of the data series (specified in the Series property) that contains the point that this data index class is referring to. Alternately, it may be equal to JCPieChartFormat.OTHER_SLICE if this data index class is referring to the other slice of a pie chart.

Returns:
the series index
 o setSeriesIndex
 public void setSeriesIndex(int index)
Sets the value of the SeriesIndex property. It contains the index of the data series (specified in the Series property) that contains the point that this data index class is referring to. Alternately, it may be equal to JCPieChartFormat.OTHER_SLICE if this data index class is referring to the other slice of a pie chart.

Parameters:
index - the series index
 o getPoint
 public int getPoint()
Gets the value of the Point property. It contains the index of the point that this data index class refers to within the series (specified by the Series property).

Returns:
index of the selected point within it's data series
 o setPoint
 public void setPoint(int p)
Gets the value of the Point property. It contains the index of the point that this data index class refers to within the series (specified by the Series property).

Parameters:
p - index of the selected point within it's data series
 o getDistance
 public int getDistance()
Gets the value of the Distance property. It is used by pick operations and contains the distance between the point selected and the nearest data point.

Returns:
Distance from the selected point
 o setDistance
 public void setDistance(int dist)
Sets the value of the Distance property. It is used by pick operations and contains the distance between the point selected and the nearest data point.

Parameters:
dist - Distance from the selected point
 o getObject
 public Object getObject()
Gets the value of the Obj property. It is used by pick operations and contains the object picked (e.g. JCChartArea or JCLegend instance) by those operations.

Returns:
Picked object
 o setObject
 public void setObject(Object object)
Sets the value of the Obj property. It is used by pick operations and contains the object picked (e.g. JCChartArea or JCLegend instance) by those operations.

Parameters:
object - Picked object
 o equals
 public boolean equals(Object o)
Determines if the specified object refers to the same data point as this JCDataIndex instance.

Parameters:
o - object to compare
Returns:
if the passed object is a JCDataIndex instance and refers to the same data point as this instance.
Overrides:
equals in class Object
 o saveParams
 public void saveParams(String name,
                        JCChart comp)
Save JCChart parameters as HTML tags

Parameters:
name - the PARAM NAME
chart - the JCChart component
 o loadParams
 public void loadParams(String name,
                        JCChart comp)
Load JCChart parameters from HTML file

Parameters:
name - the PARAM NAME
chart - the JCChart component

All Packages  Class Hierarchy  This Package  Previous  Next  Index