|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.xy.AbstractXYDataset
org.opensha.commons.gui.plot.jfreechart.DiscretizedFunctionXYDataSet
public class DiscretizedFunctionXYDataSet
Title: DiscretizedFunctionXYDataSet
Description: Wrapper for a DiscretizedFuncList. Implements XYDataSet so that it can be passed into the JRefinery Graphing Package
This class contains a pointer to a DiscretizedFuncList. It also implements an XYDataset which is JFreChart's interface that all datasets must implement so they can be passed to the graphing routines. This class transforms the DiscretizedFuncList data into the format as required by this interface. This also implements IntervalXYDataset to allow for Histograms plotting
Please consult the JFreeChart documentation for further information on XYDataSets.
Note: The FaultTraceXYDataSet and GriddedSurfaceXYDataSet are handled in exactly the same manner as for DiscretizedFunction.
Modified 7/21/2002 SWR: I mede this list more generic to handle any type of DiscretizedFunc that implements DiscretizedFuncAPI. Previously it only handled ArbDiscrFunctWithParams.
Modified 7/21/2002 SWR: (Still need to do) Made this list handle log-log plots by hiding zero values in x and y axis when choosen. If not JFreeeChart will throw an arithmatic exception.
Modified Gupta Brothers: Expanded the log-log capabilities.
FaultTraceXYDataSet,
DiscretizedFunctionXYDataSet,
XY_DataSetList,
Serialized Form| Field Summary | |
|---|---|
protected static String |
C
Class name used for debug statements |
protected static boolean |
D
If true prints out debug statements |
protected XY_DataSetList |
functions
Internal list of 2D Functions - indexed by name. |
protected ArrayList<org.jfree.data.general.DatasetChangeListener> |
listeners
list of listeners for data changes |
protected boolean |
xLog
|
protected boolean |
yLog
|
| Constructor Summary | |
|---|---|
DiscretizedFunctionXYDataSet()
no arg constructor - |
|
| Method Summary | |
|---|---|
void |
addChangeListener(org.jfree.data.general.DatasetChangeListener listener)
XYDatasetAPI- Registers an object for notification of changes to the dataset. |
void |
clear()
Removes all DiscretizedFunction2Ds from the list, making it an empty list. |
DiscretizedFunctionXYDataSet |
deepClone()
Returns a copy of this list, therefore any changes to the copy cannot affect this original list. |
boolean |
equals(Object list)
Returns true if all the Functions in this list are equal. |
Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item. |
double |
getEndXValue(int series,
int item)
Returns the ending X value for the specified series and item. |
Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item. |
double |
getEndYValue(int series,
int item)
Returns the ending Y value for the specified series and item. |
XY_DataSetList |
getFunctions()
Returns the "wrapped" dataset, i.e. |
org.jfree.data.general.DatasetGroup |
getGroup()
Returns the dataset group for the dataset. |
int |
getItemCount()
TableXYDataset - Returns the number of items in the series. |
int |
getItemCount(int series)
XYDataSetAPI - Returns the number of items in a series. |
String |
getName()
Gets the name of the functions list |
int |
getSeriesCount()
XYDataSetAPI - Returns the number of series in the dataset. |
Comparable |
getSeriesKey(int series)
Returns the key for a series (this being the info String of the Series, which is unique for each series) |
String |
getSeriesName(int series)
XYDataSetAPI - Returns the name of a series. |
Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item. |
double |
getStartXValue(int series,
int item)
Returns the starting X value for the specified series and item. |
Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item. |
double |
getStartYValue(int series,
int item)
Returns the starting Y value for the specified series and item. |
Number |
getX(int series,
int item)
XYDatasetAPI - Returns the x-value for an item within a series. |
double |
getXValue(int series,
int item)
XYDatasetAPI - Returns the x-value for an item within a series. |
Number |
getY(int series,
int item)
XYDatasetAPI - Returns the y-value for an item within a series. |
double |
getYValue(int series,
int item)
XYDatasetAPI - Returns the y-value for an item within a series. |
protected static boolean |
isAdjustedIndexIfFirstXZero(XY_DataSet func,
boolean xLog,
boolean yLog)
Very important function to handle log plotting. |
boolean |
isXLog()
|
boolean |
isYLog()
|
ListIterator<XY_DataSet> |
listIterator()
Returns an iterator of all DiscretizedFunction2Ds in the list |
void |
removeChangeListener(org.jfree.data.general.DatasetChangeListener listener)
XYDatasetAPI- Deregisters an object for notification of changes to the dataset. |
void |
setConvertZeroToMin(boolean zeroToMin)
In case of Y-log, set' swhether you want to convert 0 value to minValue. |
void |
setConvertZeroToMin(boolean zeroMin,
double minVal)
In case of Y-log, you can specify the minValue so that 0 values on y - axis will be converted to this value. |
void |
setFunctions(XY_DataSetList functions)
Sets the "wrapped" dataset, i.e. |
void |
setGroup(org.jfree.data.general.DatasetGroup group)
Sets the dataset group for the dataset. |
void |
setName(String name)
Sets the name of the functions list |
void |
setXLog(boolean xLog)
|
void |
setYLog(boolean yLog)
|
int |
size()
Returns number of DiscretizedFunction2Ds in the list. |
| Methods inherited from class org.jfree.data.xy.AbstractXYDataset |
|---|
getDomainOrder |
| Methods inherited from class org.jfree.data.general.AbstractSeriesDataset |
|---|
indexOf, seriesChanged |
| Methods inherited from class org.jfree.data.general.AbstractDataset |
|---|
clone, fireDatasetChanged, hasListener, notifyListeners, validateObject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jfree.data.xy.XYDataset |
|---|
getDomainOrder |
| Methods inherited from interface org.jfree.data.general.SeriesDataset |
|---|
indexOf |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
protected boolean yLog
protected boolean xLog
protected XY_DataSetList functions
protected ArrayList<org.jfree.data.general.DatasetChangeListener> listeners
| Constructor Detail |
|---|
public DiscretizedFunctionXYDataSet()
| Method Detail |
|---|
public boolean isYLog()
public void setYLog(boolean yLog)
public boolean isXLog()
public void setXLog(boolean xLog)
public void setName(String name)
public String getName()
getName in interface Namedpublic ListIterator<XY_DataSet> listIterator()
public int getSeriesCount()
getSeriesCount in interface org.jfree.data.general.SeriesDatasetgetSeriesCount in class org.jfree.data.general.AbstractSeriesDatasetpublic String getSeriesName(int series)
public int getItemCount(int series)
getItemCount in interface org.jfree.data.xy.XYDatasetpublic int getItemCount()
getItemCount in interface org.jfree.data.xy.TableXYDataset
public double getXValue(int series,
int item)
The implementation is responsible for ensuring that the x-values are presented in ascending order. Note: If xlog is choosen, and first x point is zero the index is incresed to return the second point.
getXValue in interface org.jfree.data.xy.XYDatasetgetXValue in class org.jfree.data.xy.AbstractXYDatasetseries - The series (zero-based index).item - The item (zero-based index).
public double getYValue(int series,
int item)
Note: If xlog is choosen, and first x point is zero the index is incresed to return the second point.
getYValue in interface org.jfree.data.xy.XYDatasetgetYValue in class org.jfree.data.xy.AbstractXYDatasetseries - The series (zero-based index).item - The item (zero-based index).
protected static final boolean isAdjustedIndexIfFirstXZero(XY_DataSet func,
boolean xLog,
boolean yLog)
This returns truw if the first point should be skipped. The criteria is based on if xLog and yLog are true, and the first point x or y values are zero. If these conditions are met, true is returned, false otherwise.
public void clear()
public int size()
public boolean equals(Object list)
equals in class Objectpublic DiscretizedFunctionXYDataSet deepClone()
public void addChangeListener(org.jfree.data.general.DatasetChangeListener listener)
addChangeListener in interface org.jfree.data.general.DatasetaddChangeListener in class org.jfree.data.general.AbstractDatasetpublic void removeChangeListener(org.jfree.data.general.DatasetChangeListener listener)
removeChangeListener in interface org.jfree.data.general.DatasetremoveChangeListener in class org.jfree.data.general.AbstractDatasetpublic XY_DataSetList getFunctions()
public void setFunctions(XY_DataSetList functions)
public void setConvertZeroToMin(boolean zeroToMin)
public void setConvertZeroToMin(boolean zeroMin,
double minVal)
zeroMin - true if you want to convert 0 values in Y-log to small valueminVal - value which will be returned if we have 0 on Y-axis in case of logpublic org.jfree.data.general.DatasetGroup getGroup()
getGroup in interface org.jfree.data.general.DatasetgetGroup in class org.jfree.data.general.AbstractDatasetpublic void setGroup(org.jfree.data.general.DatasetGroup group)
setGroup in interface org.jfree.data.general.DatasetsetGroup in class org.jfree.data.general.AbstractDatasetgroup - the dataset group.
public double getStartXValue(int series,
int item)
getStartXValue in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public double getEndXValue(int series,
int item)
getEndXValue in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public double getStartYValue(int series,
int item)
getStartYValue in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public double getEndYValue(int series,
int item)
getEndYValue in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public Number getEndX(int series,
int item)
getEndX in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public Number getEndY(int series,
int item)
getEndY in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public Number getStartX(int series,
int item)
getStartX in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public Number getStartY(int series,
int item)
getStartY in interface org.jfree.data.xy.IntervalXYDatasetseries - the series (zero-based index).item - the item within a series (zero-based index).
public Number getX(int series,
int item)
The implementation is responsible for ensuring that the x-values are presented in ascending order. Note: If xlog is choosen, and first x point is zero the index is incresed to return the second point.
getX in interface org.jfree.data.xy.XYDatasetseries - The series (zero-based index).item - The item (zero-based index).
public Number getY(int series,
int item)
The implementation is responsible for ensuring that the x-values are presented in ascending order. Note: If ylog is choosen, and first y point is zero the index is incresed to return the second point.
getY in interface org.jfree.data.xy.XYDatasetseries - The series (zero-based index).item - The item (zero-based index).
public Comparable getSeriesKey(int series)
getSeriesKey in interface org.jfree.data.general.SeriesDatasetgetSeriesKey in class org.jfree.data.general.AbstractSeriesDatasetseries - the series index (in the range 0 to
getSeriesCount() - 1).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||