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
|
-
JCDataIndex()
- Simple constructor for JCDataIndex
-
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.
-
JCDataIndex(int, ChartDataViewSeries)
- Constructor that creates a data index from a series instance and a point
index within that series.
-
equals(Object)
- Determines if the specified object refers to the same data point as this
JCDataIndex instance.
-
getDataView()
- Gets the value of the DataView property.
-
getDistance()
- Gets the value of the Distance property.
-
getObject()
- Gets the value of the Obj property.
-
getPoint()
- Gets the value of the Point property.
-
getSeries()
- Gets the value of the Series property.
-
getSeriesIndex()
- Gets the value of the SeriesIndex property.
-
loadParams(String, JCChart)
- Load JCChart parameters from HTML file
-
saveParams(String, JCChart)
- Save JCChart parameters as HTML tags
-
setDataView(ChartDataView)
- Sets the value of the DataView property.
-
setDistance(int)
- Sets the value of the Distance property.
-
setObject(Object)
- Sets the value of the Obj property.
-
setPoint(int)
- Gets the value of the Point property.
-
setSeries(ChartDataViewSeries)
- Gets the value of the Series property.
-
setSeriesIndex(int)
- Sets the value of the SeriesIndex property.
JCDataIndex
public JCDataIndex()
- Simple constructor for JCDataIndex
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
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
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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
saveParams
public void saveParams(String name,
JCChart comp)
- Save JCChart parameters as HTML tags
- Parameters:
- name - the PARAM NAME
- chart - the JCChart component
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