|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart3d.data.JCFile3dDataSource
This is a convenience class which parses data from a file. Do not create
an instance of this class. Instead, use the static method:
JCFile3dDataSource.createDataSourceFromFile(String fileName)
.
The file can either contain an irregular or regular grid or point data.
A regular grid file has the following format:
# Comments use the # sign
# For this example the grid has 5 by 3 points
# The Grid increase in
# X steps of 1.0 and Y steps of 2.0
# The Origin of the Grid is as x = -20.0 and y = 50.0
GRID
5 'A A' 'B' 'C' 'D' 'E'
3 'Y1' 'Y2' Y3'
100.0 1.0 2.0 -20.0 50.0
# 15 data points would follow, 1 for each point
49.875000 43.765625 38.50000 33.984375 30.12400
26.828125 24.0000 21.656875 19.375000 17.39062 16.222 18.444 23.555
58.664 37.894564
An Irregular Grid would supply all the x and y values as well
as the datapoints.
An example irregular grid file:
# Irregular grid has 5 by 3 points
# Holes have value 100.00
# 5 x values are give
# 3 y values are given
IGRID
5 'A A' 'B' 'C' 'D' 'EE'
3 'Y1' 'Yahoo' 'Y3'
100.0
20 21.1 22.3 23 24.4
50.3 51.3 52.6
# 15 Data values follow
23.34343 12.89239 11.99423 15.781212 18.18989
26.828125 24.0000 21.656875 19.375000 17.39062 16.222 18.444 23.555
58.664 37.894564
Point data would look like this:
POINT
3 'Series 1' 'Series 2' 'Series 3'
-1000
5
5.65 6.24 1.78
7.41 7.26 4.21
5.45 5.44 1.43
0.97 9.66 3.41
3.86 1.42 0.20
4
6.57 7.43 8.37
3.79 3.63 2.65
7.89 3.48 5.65
0.78 7.03 0.65
6
9.91 7.54 1.74
6.53 4.62 1.99
8.41 3.49 5.06
7.85 9.16 0.64
6.96 9.18 8.95
3.47 3.19 6.29
Field Summary | |
protected static StreamTokenizer |
streamTokenizer
StreamTokenizer instance used to parse the data file. |
Constructor Summary | |
JCFile3dDataSource()
|
Method Summary | |
static com.klg.jclass.chart3d.data.Base3dDataSource |
createDataSourceFromFile(String fileName)
Do not use a constructor on this class. |
protected static com.klg.jclass.chart3d.data.Base3dDataSource |
parseFile()
Method does the initial parsing to see if this is a regular or irregular grid datafile, or a point datafile. |
protected static com.klg.jclass.chart3d.data.JCEditable3dGridDataSource |
parseGrid()
Parses the file if it is a regular grid file. |
protected static com.klg.jclass.chart3d.data.JCEditable3dGridDataSource |
parseIGrid()
Parses an irregular grid file. |
protected static com.klg.jclass.chart3d.data.JCEditable3dPointDataSource |
parsePoint()
Parses a data file of type POINT , and returns a suitable
datasource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static StreamTokenizer streamTokenizer
Constructor Detail |
public JCFile3dDataSource()
Method Detail |
public static com.klg.jclass.chart3d.data.Base3dDataSource createDataSourceFromFile(String fileName)
fileName
-
Base3dDataSource
an instance of a datasource that
JCChart3d
can useprotected static com.klg.jclass.chart3d.data.Base3dDataSource parseFile() throws IOException
IOException
protected static com.klg.jclass.chart3d.data.JCEditable3dPointDataSource parsePoint() throws IOException
POINT
, and returns a suitable
datasource.
JCEditable3dPointDataSource
a suitable datasource for
the parsed data
IOException
JCEditable3dPointDataSource
protected static com.klg.jclass.chart3d.data.JCEditable3dGridDataSource parseGrid() throws IOException
JCEditable3dGridDataSource
a suitable datasource for
the parsed data
IOException
JCEditable3dGridDataSource
protected static com.klg.jclass.chart3d.data.JCEditable3dGridDataSource parseIGrid() throws IOException
JCEditable3dGridDataSource
a suitable datasource for
the parsed data
IOException
JCEditable3dGridDataSource
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |