JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class Chart3dPointData

java.lang.Object
  |
  +--com.klg.jclass.chart3d.TrackChange
        |
        +--com.klg.jclass.chart3d.Chart3dData
              |
              +--com.klg.jclass.chart3d.Chart3dPointData
All Implemented Interfaces:
Changeable, Changeable, Comparator, Serializable

public class Chart3dPointData
extends Chart3dData
implements Comparator

Stores information that represents a list of series of points. The user sets information on this object by setting the point data model attribute of the parent Chart3dDataView object. The user can then retrieve information via this object.

See Also:
Serialized Form

Field Summary
protected  int numSeries
          The number of series.
protected  ArrayList series
          The list of series for this point data object.
protected  boolean sorted
          Has the sorted list been constructed yet?
protected  ArrayList sortPoints
          A sorted list of all the points -- sorted by distance to eye.
 
Fields inherited from class com.klg.jclass.chart3d.Chart3dData
dataHandler, dataMax, dataMin, dataOK, dataSource, dataView, holeValue, name, screenPoints
 
Fields inherited from class com.klg.jclass.chart3d.TrackChange
changed, changedFlag
 
Fields inherited from interface com.klg.jclass.chart3d.Changeable
ALL, CONTOURS, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW
 
Fields inherited from interface com.klg.jclass.util.Changeable
BASIC_CHANGE_MASK, LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW
 
Constructor Summary
Chart3dPointData()
          Basic constructor.
Chart3dPointData(com.klg.jclass.chart3d.Chart3dDataView dataView, com.klg.jclass.chart3d.Chart3dPointDataModel data)
          Internal constructor specifying parent object and point series list.
 
Method Summary
protected  void addSeries(Point3d[] pointList)
          Appends a new series with the given pointList to the end of the series list.
protected  void addSeries(Point3d[] pointList, int index)
          Adds a series at the given index from to the list of series.
protected  void calcAnnoLimits()
          Makes a first rough pass at the annotation limits, extending the axis limits out to include the origin.
protected  void calcLimits()
          Calculates the data limits and checks for valid Z extents (the user can only change the z limits so that they are outside of the data limits).
 int compare(Object o1, Object o2)
          SortPoint sorting routine.
protected  void computePointLimits()
          Computes the min and max values of all points in the x, y, and z direction and uses these values to set the axis limits.
 int getNumSeries()
          Gets the current number of series.
 Point3d getPoint(int seriesNum, int pointNum)
          Returns the point indexed by pointNum in the series indexed by seriesNum.
 ArrayList getSeries()
          Returns the series array list.
 com.klg.jclass.chart3d.Chart3dPointSeries getSeries(int seriesNum)
          Returns the Chart3dPointSeries object indexed by seriesNum.
 ArrayList getSortPoints()
          Gets the array of sorted points.
protected  void makePointSeriesList(Point3d[][] seriesList)
          Makes a list of Chart3dPointSeries based on a doubly linked list of Point3d points.
 void precomputePoints()
          Precomputes the screen points for each of the data points.
protected  void processData()
          Calculates the data array lengths that can be used and value of dataOK.
protected  void refreshPointSeriesList(Point3d[][] seriesList)
          Refreshes the list of Chart3dPointSeries with possibly new data.
protected  void removeSeries(int index)
          Removes a series at the given index from the list of series.
protected  void setDataSource(com.klg.jclass.chart3d.Chart3dPointDataModel dataSource)
          Sets a new series list of points on this point data object.
 void sortPoints()
          Creates a ArrayList of SortPoints and then sorts them based on the distance to the eye.
 
Methods inherited from class com.klg.jclass.chart3d.Chart3dData
checkValidZExtents, getClosestPoint, getDataHandler, getDataMax, getDataMin, getDataSource, getDataView, getHoleValue, getMinStep, getName, getPointIndex, getScreenPoints, isDataOK, setChanged, setDataMax, setDataMin, setDataOK, setDataView, setHoleValue, setName, toString
 
Methods inherited from class com.klg.jclass.chart3d.TrackChange
getChanged, getChanged, isBatched, isChanged, isChanged, setChanged, updateFlags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

series

protected ArrayList series
The list of series for this point data object.


numSeries

protected int numSeries
The number of series.


sortPoints

protected ArrayList sortPoints
A sorted list of all the points -- sorted by distance to eye.


sorted

protected boolean sorted
Has the sorted list been constructed yet?

Constructor Detail

Chart3dPointData

public Chart3dPointData()
Basic constructor. Parent object and data arrays are set to null.


Chart3dPointData

public Chart3dPointData(com.klg.jclass.chart3d.Chart3dDataView dataView,
                        com.klg.jclass.chart3d.Chart3dPointDataModel data)
Internal constructor specifying parent object and point series list.

Parameters:
dataView - The parent data view
data - The data source from which to extract data
Method Detail

getPoint

public Point3d getPoint(int seriesNum,
                        int pointNum)
Returns the point indexed by pointNum in the series indexed by seriesNum.

Parameters:
seriesNum - The series index of the point wanted
pointNum - The point index of the point wanted
Returns:
The point indexed by series and point.

getSeries

public com.klg.jclass.chart3d.Chart3dPointSeries getSeries(int seriesNum)
Returns the Chart3dPointSeries object indexed by seriesNum.

Parameters:
seriesNum - The series index of the Chart3dPointSeries wanted.
Returns:
The Chart3dPointSeries object indexed by series.

getSeries

public ArrayList getSeries()
Returns the series array list.

Returns:
The ArrayList that holds the list of Chart3dPointSeries.

getNumSeries

public int getNumSeries()
Gets the current number of series. This basically the same as the size of the series ArrayList.

Returns:
The current number of series.

addSeries

protected void addSeries(Point3d[] pointList)
Appends a new series with the given pointList to the end of the series list.

Parameters:
pointList - The point list for the series to be added

addSeries

protected void addSeries(Point3d[] pointList,
                         int index)
Adds a series at the given index from to the list of series.

Parameters:
pointList - The point list for the series to be added
index - The index at which the new series is to be inserted

removeSeries

protected void removeSeries(int index)
Removes a series at the given index from the list of series.

Parameters:
index - The index of the series to be removed.

makePointSeriesList

protected void makePointSeriesList(Point3d[][] seriesList)
Makes a list of Chart3dPointSeries based on a doubly linked list of Point3d points. Internal use only! Use a point data source to set data on this object.

Parameters:
seriesList - The list of points to make a new series list from.

refreshPointSeriesList

protected void refreshPointSeriesList(Point3d[][] seriesList)
Refreshes the list of Chart3dPointSeries with possibly new data. This means that the number of series remains the same (so no new Chart3dPointSeries objects need to be created). Internal use only! Use a point data source to set data on this object.

Parameters:
seriesList - The list of points from which to refresh the series list

processData

protected void processData()
Calculates the data array lengths that can be used and value of dataOK.


setDataSource

protected void setDataSource(com.klg.jclass.chart3d.Chart3dPointDataModel dataSource)
Sets a new series list of points on this point data object. Internal use only! Use the com.klg.jclass.chart3d.Chart3dDataView#setElevationDataSource to set the data source on this object.

Parameters:
dataSource - The data source from which to extract data

getSortPoints

public ArrayList getSortPoints()
Gets the array of sorted points.


computePointLimits

protected void computePointLimits()
Computes the min and max values of all points in the x, y, and z direction and uses these values to set the axis limits.


calcLimits

protected void calcLimits()
Calculates the data limits and checks for valid Z extents (the user can only change the z limits so that they are outside of the data limits).


calcAnnoLimits

protected void calcAnnoLimits()
Makes a first rough pass at the annotation limits, extending the axis limits out to include the origin. Resets the step to zero (its calculated later).

Specified by:
calcAnnoLimits in class Chart3dData

precomputePoints

public void precomputePoints()
Precomputes the screen points for each of the data points.

Specified by:
precomputePoints in class Chart3dData

sortPoints

public void sortPoints()
Creates a ArrayList of SortPoints and then sorts them based on the distance to the eye. This is used to later draw the points from back to front.


compare

public int compare(Object o1,
                   Object o2)
SortPoint sorting routine.

Specified by:
compare in interface Comparator
Parameters:
o1 - The first SortPoint to compare
o2 - The second SortPoint to compare

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