org.opensourcephysics.display
Interface Data

All Known Subinterfaces:
ElementTrail, Group, Set
All Known Implementing Classes:
ArrayPanel, ComplexDataset, DataAdapter, DataColumn, DataFile, DataFunction, Dataset, DatasetManager, EjsArrayPanel, ElementPolygon, ElementPolygon, ElementTrail, ElementTrail, ElementTrail, FourierAnalysis, FourierSinCosAnalysis, Group, Group, Group, HighlightableDataset, Histogram, HistogramDataset, InteractivePoligon, InteractiveTrace, MultiTrail, Pipe, Set, Set, Set, Stripchart, TraceSet, VectorField, VectorField

public interface Data

The Data interface defines methods for obtaining and identifying OSP data.

Version:
1.0
Author:
Wolfgang Christian, Douglas Brown

Method Summary
 java.lang.String[] getColumnNames()
          The column names to be used in the data display tool
 double[][] getData2D()
          Gets a 2D array of data.
 double[][][] getData3D()
          Gets a 3D array of data.
 java.util.List<Data> getDataList()
          Some Data objects (e.g., a Group) do not contain data, but a list of Data objects which do.
 java.util.ArrayList<Dataset> getDatasets()
          Gets a list of OSP Datasets.
 java.awt.Color[] getFillColors()
          Fill color to use for this data
 int getID()
          Returns a unique identifier for this Data
 java.awt.Color[] getLineColors()
          Line color to use for this data
 java.lang.String getName()
          The name of the data
 void setID(int id)
          Sets the ID number of this Data
 

Method Detail

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

java.util.ArrayList<Dataset> 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

java.lang.String getName()
The name of the data

Returns:
the name

getLineColors

java.awt.Color[] getLineColors()
Line color to use for this data

Returns:
a color

getFillColors

java.awt.Color[] getFillColors()
Fill color to use for this data

Returns:
a color

getColumnNames

java.lang.String[] getColumnNames()
The column names to be used in the data display tool

Returns:
an array of names

getDataList

java.util.List<Data> 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