本文整理匯總了Java中org.jfree.data.xy.IntervalXYDataset.getStartXValue方法的典型用法代碼示例。如果您正苦於以下問題:Java IntervalXYDataset.getStartXValue方法的具體用法?Java IntervalXYDataset.getStartXValue怎麽用?Java IntervalXYDataset.getStartXValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.data.xy.IntervalXYDataset
的用法示例。
在下文中一共展示了IntervalXYDataset.getStartXValue方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: iterateDomainExtent
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the items in an {@link XYDataset} to find
* the range of x-values.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (possibly <code>null</code>).
*/
public static Range iterateDomainExtent(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
double minimum = Double.POSITIVE_INFINITY;
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 lvalue;
double uvalue;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData = (IntervalXYDataset) dataset;
lvalue = intervalXYData.getStartXValue(series, item);
uvalue = intervalXYData.getEndXValue(series, item);
}
else {
lvalue = dataset.getXValue(series, item);
uvalue = lvalue;
}
minimum = Math.min(minimum, lvalue);
maximum = Math.max(maximum, uvalue);
}
}
if (minimum > maximum) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例2: findDomainBoundsWithOffset
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the items in an {@link IntervalXYDataset} to find
* the range of x-values including the interval OFFSET so that it centers
* the interval around the start value.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (possibly <code>null</code>).
*/
protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) {
ParamChecks.nullNotPermitted(dataset, "dataset");
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
double lvalue;
double uvalue;
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
lvalue = dataset.getStartXValue(series, item);
uvalue = dataset.getEndXValue(series, item);
double offset = (uvalue - lvalue) / 2.0;
lvalue = lvalue - offset;
uvalue = uvalue - offset;
minimum = Math.min(minimum, lvalue);
maximum = Math.max(maximum, uvalue);
}
}
if (minimum > maximum) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例3: findDomainBoundsWithOffset
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the items in an {@link IntervalXYDataset} to find
* the range of x-values including the interval OFFSET so that it centers
* the interval around the start value.
*
* @param dataset the dataset ({@code null} not permitted).
*
* @return The range (possibly {@code null}).
*/
protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) {
Args.nullNotPermitted(dataset, "dataset");
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
double lvalue;
double uvalue;
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
lvalue = dataset.getStartXValue(series, item);
uvalue = dataset.getEndXValue(series, item);
double offset = (uvalue - lvalue) / 2.0;
lvalue = lvalue - offset;
uvalue = uvalue - offset;
minimum = Math.min(minimum, lvalue);
maximum = Math.max(maximum, uvalue);
}
}
if (minimum > maximum) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例4: findDomainBoundsWithOffset
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the items in an {@link IntervalXYDataset} to find
* the range of x-values including the interval OFFSET so that it centers
* the interval around the start value.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (possibly <code>null</code>).
*/
protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
double lvalue;
double uvalue;
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
lvalue = dataset.getStartXValue(series, item);
uvalue = dataset.getEndXValue(series, item);
double offset = (uvalue - lvalue) / 2.0;
lvalue = lvalue - offset;
uvalue = uvalue - offset;
minimum = Math.min(minimum, lvalue);
maximum = Math.max(maximum, uvalue);
}
}
if (minimum > maximum) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例5: findMinimumDomainValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的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;
}
示例6: findMinimumDomainValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的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;
}
示例7: findMinimumDomainValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的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;
}
示例8: findMinimumDomainValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的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;
}
示例9: findMinimumDomainValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的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;
}