public class DataSerie
extends java.lang.Object
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
color
color of the line
|
private java.lang.String |
name
name of serie
|
private int |
nVal
the number of known values (=xVal.length)
|
private double |
xMax
maximum x value
|
private double |
xMin
minimum x value
|
private double[] |
xVal
the x values
|
private double |
yAxiLen
y-axis lenght in y units
|
private java.lang.String |
yLab
y-axis label
|
private double |
yMax
maximum y value
|
private double |
yMin
minimum y value
|
private double[] |
yVal
the y values
|
Constructor and Description |
---|
DataSerie(java.lang.String serieLabel,
java.lang.String yAxisLabel) |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
gets the color of the serie
|
java.lang.String |
getName()
gets the name of the serie
|
int |
getNumberOfValues()
gets the number of values
|
double[] |
getX()
gets the x values
|
double |
getX(int i)
gets the x[i] value
|
double |
getXMax()
gets x maximum
|
double |
getXMin()
gets x minimum
|
double[] |
getY()
gets the y values
|
double |
getY(int i)
gets the y[i] value
|
double |
getYAxisLength()
gets the y axis length
|
java.lang.String |
getYLabel()
gets the y-axis label
|
double |
getYMax()
gets y maximum
|
double |
getYMin()
gets y minimum
|
void |
setColor(java.awt.Color c)
sets the color of the serie
|
void |
setPoints(double[] x,
double[] y)
sets new data for x and y
|
protected void |
setXExtrema()
sets the x extrema
|
protected void |
setYAxisLength(double yMin,
double yMax)
sets the y-axis length
|
protected void |
setYExtrema()
sets the y extrema
|
protected void |
verify(double[] x,
double[] y)
verifies the validity of x and y
|
private int nVal
private double[] xVal
private double[] yVal
private double xMin
private double xMax
private double yMin
private double yMax
private double yAxiLen
private java.lang.String name
private java.lang.String yLab
private java.awt.Color color
public DataSerie(java.lang.String serieLabel, java.lang.String yAxisLabel)
serieLabel
- the titel labelyAxisLabel
- the y-axis labelpublic final void setColor(java.awt.Color c)
c
- color of the serieprotected final void verify(double[] x, double[] y) throws java.lang.IllegalArgumentException
x
- the x-valuesy
- the y-valuesjava.lang.IllegalArgumentException
- if x and y have different field widthpublic final void setPoints(double[] x, double[] y) throws java.lang.IllegalArgumentException
x
- the x-valuesy
- the y-valuesjava.lang.IllegalArgumentException
- if x and y have different field widthpublic final double getXMin()
public final double getXMax()
public final double getYMin()
public final double getYMax()
public final double getYAxisLength()
protected final void setXExtrema()
protected final void setYExtrema()
public final java.lang.String getName()
public final java.lang.String getYLabel()
public final int getNumberOfValues()
public final double[] getX()
public final double[] getY()
public final double getX(int i)
public final double getY(int i)
public final java.awt.Color getColor()
protected final void setYAxisLength(double yMin, double yMax)
yMin
- the minimum x-valueyMax
- the maximum x-value