public class Chart extends Object
Modifier and Type | Field and Description |
---|---|
private int |
maxSampleCount |
private String |
name |
private int |
precision |
private double |
tickInterval |
private String |
type |
private Vector |
values |
Constructor and Description |
---|
Chart()
Construct a new, unnamed
Chart . |
Chart(String name)
Construct a new
Chart with the specified name. |
Modifier and Type | Method and Description |
---|---|
void |
addValue(ChartValue value)
Add a
ChartValue to this chart definition. |
void |
addValue(ChartValue value,
int position)
Add a
ChartValue to this chart definition at the specified
position. |
int |
getMaxSampleCount()
Get the maximum number of data samples that will be displayed in the
chart.
|
String |
getName()
Get the name for this chart definition.
|
int |
getPrecision()
Get the decimal precision for this chart definition.
|
double |
getTickInterval()
Get the tick interval for this chart definition.
|
String |
getType()
Get the chart type for this chart definition.
|
ChartValue |
getValueAt(int position)
Get the value at the specified position in this chart definition.
|
int |
getValueCount()
Get the number of values in this chart definition.
|
Enumeration |
getValues()
Get the values in this chart.
|
void |
read(BufferedReader ins)
Read this chart definition from a stream.
|
private String |
readLine(BufferedReader reader) |
void |
removeAllValues()
Remove all of the values from this chart definition.
|
void |
removeValueAt(int position)
Remove the value at the specified position from this chart definition.
|
void |
setMaxSampleCount(int maxSampleCount)
Set the maximum number of data samples that will be displayed in the
chart.
|
void |
setPrecision(int precision)
Set the decimal precision for this chart definition.
|
void |
setTickInterval(double interval)
Set the tick interval for this chart definition.
|
void |
setType(String type)
Set the chart type for this chart definition.
|
String |
toString()
Get a string representation of this chart.
|
void |
write(BufferedWriter outs)
Write this chart definition to a stream.
|
private double tickInterval
private int precision
private int maxSampleCount
public Chart()
Chart
.public void addValue(ChartValue value)
ChartValue
to this chart definition.value
- The value to add.public void addValue(ChartValue value, int position)
ChartValue
to this chart definition at the specified
position.value
- The value to add.position
- The position to add the value at.public ChartValue getValueAt(int position)
position
- The position of the value.ChartValue
object at the specified position.public Enumeration getValues()
Enumeration
of ChartValue
objects in
this chart definition.public void removeValueAt(int position)
position
- The position of the value.public void removeAllValues()
public int getValueCount()
public void setTickInterval(double interval)
interval
- The tick interval.public double getTickInterval()
public void setPrecision(int precision)
precision
- The precision.public int getPrecision()
public String getName()
public String getType()
public void setType(String type)
type
- The chart type.public void setMaxSampleCount(int maxSampleCount)
maxSampleCount
- The maximum sample count.public int getMaxSampleCount()
public void write(BufferedWriter outs) throws IOException
outs
- The stream to read write to.IOException
- If an I/O error occurs.public void read(BufferedReader ins) throws IOException
ins
- The stream to read from.IOException
- If an I/O error occurs.private String readLine(BufferedReader reader) throws IOException
IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses