Package org.opensourcephysics.display
Interface Data
- All Known Subinterfaces:
ElementTrail
,Group
,Set
- All Known Implementing Classes:
ArrayPanel
,ComplexDataset
,DataAdapter
,DataColumn
,DataFile
,DataFunction
,Dataset
,DatasetManager
,ElementTrail
,FourierAnalysis
,FourierSinCosAnalysis
,Group
,HighlightableDataset
,Histogram
,HistogramDataset
,Set
,Stripchart
public interface Data
The Data interface defines methods for obtaining and identifying OSP data.
- Version:
- 1.0
- Author:
- Wolfgang Christian, Douglas Brown
-
Method Summary
Modifier and TypeMethodDescriptionString[]
The column names to be used in the data display tooldouble[][]
Gets a 2D array of data.double[][][]
Gets a 3D array of data.Some Data objects (e.g., a Group) do not contain data, but a list of Data objects which do.Gets a list of OSP Datasets.Color[]
Fill color to use for this dataint
getID()
Returns a unique identifier for this DataColor[]
Line color to use for this datagetName()
The name of the datavoid
setID
(int id) Sets the ID number of this Data
-
Method Details
-
getData2D
double[][] getData2D()Gets a 2D array of data. The first column, double[0][] often contains x-values; Remaining columns often contain y values. May return null if data not yet generated or object does not support 2D data.- Returns:
- double[][]
-
getData3D
double[][][] getData3D()Gets a 3D array of data. May return null if data not yet generated or object does not support 3D data.- Returns:
- double[][][]
-
getDatasets
Gets a list of OSP Datasets. May return null if data not yet generated or object does not support Datasets.- Returns:
- list of Datasets
-
getName
String getName()The name of the data- Returns:
- the name
-
getLineColors
Color[] getLineColors()Line color to use for this data- Returns:
- a color
-
getFillColors
Color[] getFillColors()Fill color to use for this data- Returns:
- a color
-
getColumnNames
String[] getColumnNames()The column names to be used in the data display tool- Returns:
- an array of names
-
getDataList
Some Data objects (e.g., a Group) do not contain data, but a list of Data objects which do. This method is used by Data displaying tools to create as many pages as needed.- Returns:
- a list of Data objects, or null if this object contains data
-
getID
int getID()Returns a unique identifier for this Data- Returns:
- the ID number
-
setID
void setID(int id) Sets the ID number of this Data- Parameters:
id
- the ID number
-