本文整理汇总了Java中org.jfree.data.DomainInfo类的典型用法代码示例。如果您正苦于以下问题:Java DomainInfo类的具体用法?Java DomainInfo怎么用?Java DomainInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DomainInfo类属于org.jfree.data包,在下文中一共展示了DomainInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findDomainExtent
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the range of values in the domain (x-values) of a dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range of values (possibly <code>null</code>).
*/
public static Range findDomainExtent(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Range result = null;
// if the dataset implements DomainInfo, life is easier
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
result = info.getDomainRange();
}
else {
result = iterateDomainExtent(dataset);
}
return result;
}
示例2: findDomainBounds
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the range of values in the domain (x-values) of a dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param includeInterval determines whether or not the x-interval is taken
* into account (only applies if the dataset is an
* {@link IntervalXYDataset}).
*
* @return The range of values (possibly <code>null</code>).
*/
public static Range findDomainBounds(XYDataset dataset,
boolean includeInterval) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Range result = null;
// if the dataset implements DomainInfo, life is easier
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
result = info.getDomainBounds(includeInterval);
}
else {
result = iterateDomainBounds(dataset, includeInterval);
}
return result;
}
示例3: findDomainBounds
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the range of values in the domain (x-values) of a dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param includeInterval determines whether or not the x-interval is taken
* into account (only applies if the dataset is an
* {@link IntervalXYDataset}).
*
* @return The range of values (possibly <code>null</code>).
*/
public static Range findDomainBounds(XYDataset dataset,
boolean includeInterval) {
ParamChecks.nullNotPermitted(dataset, "dataset");
Range result;
// if the dataset implements DomainInfo, life is easier
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
result = info.getDomainBounds(includeInterval);
}
else {
result = iterateDomainBounds(dataset, includeInterval);
}
return result;
}
示例4: findDomainBounds
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the range of values in the domain (x-values) of a dataset.
*
* @param dataset the dataset ({@code null} not permitted).
* @param includeInterval determines whether or not the x-interval is taken
* into account (only applies if the dataset is an
* {@link IntervalXYDataset}).
*
* @return The range of values (possibly {@code null}).
*/
public static Range findDomainBounds(XYDataset dataset,
boolean includeInterval) {
Args.nullNotPermitted(dataset, "dataset");
Range result;
// if the dataset implements DomainInfo, life is easier
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
result = info.getDomainBounds(includeInterval);
}
else {
result = iterateDomainBounds(dataset, includeInterval);
}
return result;
}
示例5: findDomainBounds
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the range of values in the domain (x-values) of a dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param includeInterval determines whether or not the x-interval is taken
* into account (only applies if the dataset is an
* {@link IntervalXYDataset}).
*
* @return The range of values (possibly <code>null</code>).
*/
public static Range findDomainBounds(XYDataset dataset,
boolean includeInterval) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Range result = null;
// if the dataset implements DomainInfo, life is easier
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
result = info.getDomainBounds(includeInterval);
}
else {
result = iterateDomainBounds(dataset, includeInterval);
}
return result;
}
示例6: findMinimumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Finds the minimum domain (or X) value for the specified dataset. This is easy if
* the dataset implements the {@link DomainInfo} interface (a good idea if there is an
* efficient way to determine the minimum value). Otherwise, it involves iterating over
* the entire data-set.
* <p>
* Returns <code>null</code> if all the data values in the dataset are <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return info.getMinimumDomainValue();
}
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData = (IntervalXYDataset) dataset;
value = intervalXYData.getStartXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
result = null;
}
else {
result = new Double(minimum);
}
}
return result;
}
示例7: findMaximumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the maximum domain value for the specified dataset. This is easy if the
* dataset implements the {@link DomainInfo} interface (a good idea if there is an
* efficient way to determine the maximum value). Otherwise, it involves iterating over
* the entire data-set. Returns <code>null</code> if all the data values in the dataset
* are <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The maximum value (possibly <code>null</code>).
*/
public static Number findMaximumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return info.getMaximumDomainValue();
}
// hasn't implemented DomainInfo, so iterate...
else {
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData = (IntervalXYDataset) dataset;
value = intervalXYData.getEndXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
maximum = Math.max(maximum, value);
}
}
}
if (maximum == Double.NEGATIVE_INFINITY) {
result = null;
}
else {
result = new Double(maximum);
}
}
return result;
}
示例8: findMinimumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Finds the minimum domain (or X) value for the specified dataset. This
* is easy if the dataset implements the {@link DomainInfo} interface (a
* good idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set.
* <p>
* Returns <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainLowerBound(true));
}
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
result = null;
}
else {
result = new Double(minimum);
}
}
return result;
}
示例9: findMaximumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the maximum domain value for the specified dataset. This is
* easy if the dataset implements the {@link DomainInfo} interface (a good
* idea if there is an efficient way to determine the maximum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The maximum value (possibly <code>null</code>).
*/
public static Number findMaximumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainUpperBound(true));
}
// hasn't implemented DomainInfo, so iterate...
else {
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getEndXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
maximum = Math.max(maximum, value);
}
}
}
if (maximum == Double.NEGATIVE_INFINITY) {
result = null;
}
else {
result = new Double(maximum);
}
}
return result;
}
示例10: findMinimumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Finds the minimum domain (or X) value for the specified dataset. This
* is easy if the dataset implements the {@link DomainInfo} interface (a
* good idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set.
* <p>
* Returns <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumDomainValue(XYDataset dataset) {
ParamChecks.nullNotPermitted(dataset, "dataset");
Number result;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainLowerBound(true));
}
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
result = null;
}
else {
result = new Double(minimum);
}
}
return result;
}
示例11: findMaximumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the maximum domain value for the specified dataset. This is
* easy if the dataset implements the {@link DomainInfo} interface (a good
* idea if there is an efficient way to determine the maximum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The maximum value (possibly <code>null</code>).
*/
public static Number findMaximumDomainValue(XYDataset dataset) {
ParamChecks.nullNotPermitted(dataset, "dataset");
Number result;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainUpperBound(true));
}
// hasn't implemented DomainInfo, so iterate...
else {
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getEndXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
maximum = Math.max(maximum, value);
}
}
}
if (maximum == Double.NEGATIVE_INFINITY) {
result = null;
}
else {
result = new Double(maximum);
}
}
return result;
}
示例12: findMinimumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Finds the minimum domain (or X) value for the specified dataset. This
* is easy if the dataset implements the {@link DomainInfo} interface (a
* good idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set.
* <p>
* Returns {@code null} if all the data values in the dataset are
* {@code null}.
*
* @param dataset the dataset ({@code null} not permitted).
*
* @return The minimum value (possibly {@code null}).
*/
public static Number findMinimumDomainValue(XYDataset dataset) {
Args.nullNotPermitted(dataset, "dataset");
Number result;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainLowerBound(true));
}
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
result = null;
}
else {
result = new Double(minimum);
}
}
return result;
}
示例13: findMaximumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the maximum domain value for the specified dataset. This is
* easy if the dataset implements the {@link DomainInfo} interface (a good
* idea if there is an efficient way to determine the maximum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* {@code null} if all the data values in the dataset are
* {@code null}.
*
* @param dataset the dataset ({@code null} not permitted).
*
* @return The maximum value (possibly {@code null}).
*/
public static Number findMaximumDomainValue(XYDataset dataset) {
Args.nullNotPermitted(dataset, "dataset");
Number result;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainUpperBound(true));
}
// hasn't implemented DomainInfo, so iterate...
else {
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getEndXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
maximum = Math.max(maximum, value);
}
}
}
if (maximum == Double.NEGATIVE_INFINITY) {
result = null;
}
else {
result = new Double(maximum);
}
}
return result;
}
示例14: findMinimumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Finds the minimum domain (or X) value for the specified dataset. This
* is easy if the dataset implements the {@link DomainInfo} interface (a
* good idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set.
* <p>
* Returns <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainLowerBound(true));
}
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
result = null;
}
else {
result = new Double(minimum);
}
}
return result;
}
示例15: findMaximumDomainValue
import org.jfree.data.DomainInfo; //导入依赖的package包/类
/**
* Returns the maximum domain value for the specified dataset. This is
* easy if the dataset implements the {@link DomainInfo} interface (a good
* idea if there is an efficient way to determine the maximum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The maximum value (possibly <code>null</code>).
*/
public static Number findMaximumDomainValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
Number result = null;
// if the dataset implements DomainInfo, life is easy
if (dataset instanceof DomainInfo) {
DomainInfo info = (DomainInfo) dataset;
return new Double(info.getDomainUpperBound(true));
}
// hasn't implemented DomainInfo, so iterate...
else {
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getEndXValue(series, item);
}
else {
value = dataset.getXValue(series, item);
}
if (!Double.isNaN(value)) {
maximum = Math.max(maximum, value);
}
}
}
if (maximum == Double.NEGATIVE_INFINITY) {
result = null;
}
else {
result = new Double(maximum);
}
}
return result;
}