本文整理汇总了Java中org.jfree.data.Range.combine方法的典型用法代码示例。如果您正苦于以下问题:Java Range.combine方法的具体用法?Java Range.combine怎么用?Java Range.combine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.Range
的用法示例。
在下文中一共展示了Range.combine方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range of data values that will be plotted against the range axis.
* If the dataset is <code>null</code>, this method returns <code>null</code>.
*
* @param axis the axis.
*
* @return The data range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
List mappedDatasets = new ArrayList();
int rangeIndex = this.rangeAxes.indexOf(axis);
if (rangeIndex >= 0) {
mappedDatasets.addAll(getDatasetsMappedToRangeAxis(rangeIndex));
}
else if (axis == getRangeAxis()) {
mappedDatasets.addAll(getDatasetsMappedToRangeAxis(0));
}
// iterate through the datasets that map to the axis and get the union of the ranges.
Iterator iterator = mappedDatasets.iterator();
while (iterator.hasNext()) {
CategoryDataset d = (CategoryDataset) iterator.next();
CategoryItemRenderer r = getRendererForDataset(d);
if (r != null) {
result = Range.combine(result, r.getRangeExtent(d));
}
}
return result;
}
示例2: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis. This is the combined range of all the subplots.
*
* @param axis the axis.
*
* @return The range (possibly <code>null</code>).
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot subplot = (XYPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例3: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the axis. This is the combined range of all the subplots.
*
* @param axis the axis.
*
* @return the range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
CategoryPlot subplot = (CategoryPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例4: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the axis. This is the combined range of all the subplots.
*
* @param axis the axis.
*
* @return the range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot subplot = (XYPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例5: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis.
*
* @param axis the axis.
*
* @return The range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.dataset != null) {
result = Range.combine(result,
DatasetUtilities.findRangeBounds(this.dataset));
}
return result;
}
示例6: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis. This is the combined range
* of all the subplots.
*
* @param axis the axis.
*
* @return The range (possibly <code>null</code>).
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot subplot = (XYPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例7: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the axis. This is the combined range of all the
* subplots.
*
* @param axis the axis.
*
* @return The range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
CategoryPlot subplot = (CategoryPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例8: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the axis. This is the combined range of all the
* subplots.
*
* @param axis the axis.
*
* @return The range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot subplot = (XYPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
示例9: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range of data values that will be plotted against the range
* axis. If the dataset is <code>null</code>, this method returns
* <code>null</code>.
*
* @param axis the axis.
*
* @return The data range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
List mappedDatasets = new ArrayList();
int rangeIndex = this.rangeAxes.indexOf(axis);
if (rangeIndex >= 0) {
mappedDatasets.addAll(datasetsMappedToRangeAxis(rangeIndex));
}
else if (axis == getRangeAxis()) {
mappedDatasets.addAll(datasetsMappedToRangeAxis(0));
}
// iterate through the datasets that map to the axis and get the union
// of the ranges.
Iterator iterator = mappedDatasets.iterator();
while (iterator.hasNext()) {
CategoryDataset d = (CategoryDataset) iterator.next();
CategoryItemRenderer r = getRendererForDataset(d);
if (r != null) {
result = Range.combine(result, r.findRangeBounds(d));
}
}
return result;
}
示例10: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis.
*
* @param axis the axis.
*
* @return The range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
List mappedDatasets = new ArrayList();
boolean isDomainAxis = true;
// is it a domain axis?
int domainIndex = this.domainAxes.indexOf(axis);
if (domainIndex >= 0) {
isDomainAxis = true;
mappedDatasets.addAll(getDatasetsMappedToDomainAxis(new Integer(domainIndex)));
}
else if (axis == getDomainAxis()) {
isDomainAxis = true;
mappedDatasets.addAll(getDatasetsMappedToDomainAxis(new Integer(0)));
}
// or is it a range axis?
int rangeIndex = this.rangeAxes.indexOf(axis);
if (rangeIndex >= 0) {
isDomainAxis = false;
mappedDatasets.addAll(getDatasetsMappedToRangeAxis(new Integer(rangeIndex)));
}
else if (axis == getRangeAxis()) {
isDomainAxis = false;
mappedDatasets.addAll(getDatasetsMappedToRangeAxis(new Integer(0)));
}
// iterate through the datasets that map to the axis and get the union of the ranges.
Iterator iterator = mappedDatasets.iterator();
while (iterator.hasNext()) {
XYDataset d = (XYDataset) iterator.next();
if (d != null) {
XYItemRenderer r = getRendererForDataset(d);
if (isDomainAxis) {
result = Range.combine(result, DatasetUtilities.findDomainExtent(d));
}
else {
if (r != null) {
result = Range.combine(result, r.getRangeExtent(d));
}
else {
result = Range.combine(result, DatasetUtilities.findRangeExtent(d));
}
}
}
}
return result;
}
示例11: findStackedRangeExtent
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range (as in domain/range),
* assuming that the series in one category are stacked.
*
* @param dataset the dataset.
* @param map a structure that maps series to groups.
*
* @return the value range.
*/
public static Range findStackedRangeExtent(CategoryDataset dataset,
KeyToGroupMap map) {
Range result = null;
if (dataset != null) {
// create an array holding the group indices...
int[] groupIndex = new int[dataset.getRowCount()];
for (int i = 0; i < dataset.getRowCount(); i++) {
groupIndex[i] = map.getGroupIndex(map.getGroup(dataset.getRowKey(i)));
}
// minimum and maximum for each group...
int groupCount = map.getGroupCount();
double[] minimum = new double[groupCount];
double[] maximum = new double[groupCount];
int categoryCount = dataset.getColumnCount();
for (int item = 0; item < categoryCount; item++) {
double[] positive = new double[groupCount];
double[] negative = new double[groupCount];
int seriesCount = dataset.getRowCount();
for (int series = 0; series < seriesCount; series++) {
Number number = dataset.getValue(series, item);
if (number != null) {
double value = number.doubleValue();
if (value > 0.0) {
positive[groupIndex[series]] = positive[groupIndex[series]] + value;
}
if (value < 0.0) {
negative[groupIndex[series]] = negative[groupIndex[series]] + value;
// '+', remember value is negative
}
}
}
for (int g = 0; g < groupCount; g++) {
minimum[g] = Math.min(minimum[g], negative[g]);
maximum[g] = Math.max(maximum[g], positive[g]);
}
}
for (int j = 0; j < groupCount; j++) {
result = Range.combine(result, new Range(minimum[j], maximum[j]));
}
}
return result;
}
示例12: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis.
*
* @param axis the axis.
*
* @return The range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
List mappedDatasets = new ArrayList();
boolean isDomainAxis = true;
// is it a domain axis?
int domainIndex = getDomainAxisIndex(axis);
if (domainIndex >= 0) {
isDomainAxis = true;
mappedDatasets.addAll(getDatasetsMappedToDomainAxis(
new Integer(domainIndex)));
}
// or is it a range axis?
int rangeIndex = getRangeAxisIndex(axis);
if (rangeIndex >= 0) {
isDomainAxis = false;
mappedDatasets.addAll(getDatasetsMappedToRangeAxis(
new Integer(rangeIndex)));
}
// iterate through the datasets that map to the axis and get the union
// of the ranges.
Iterator iterator = mappedDatasets.iterator();
while (iterator.hasNext()) {
XYDataset d = (XYDataset) iterator.next();
if (d != null) {
XYItemRenderer r = getRendererForDataset(d);
if (isDomainAxis) {
if (r != null) {
result = Range.combine(result, r.findDomainBounds(d));
}
else {
result = Range.combine(result,
DatasetUtilities.findDomainBounds(d));
}
}
else {
if (r != null) {
result = Range.combine(result, r.findRangeBounds(d));
}
else {
result = Range.combine(result,
DatasetUtilities.findRangeBounds(d));
}
}
}
}
return result;
}
示例13: findStackedRangeBounds
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range
* (y-values), assuming that the series in one category are stacked.
*
* @param dataset the dataset.
* @param map a structure that maps series to groups.
*
* @return The value range (<code>null</code> if the dataset contains no
* values).
*/
public static Range findStackedRangeBounds(CategoryDataset dataset,
KeyToGroupMap map) {
Range result = null;
if (dataset != null) {
// create an array holding the group indices...
int[] groupIndex = new int[dataset.getRowCount()];
for (int i = 0; i < dataset.getRowCount(); i++) {
groupIndex[i] = map.getGroupIndex(
map.getGroup(dataset.getRowKey(i))
);
}
// minimum and maximum for each group...
int groupCount = map.getGroupCount();
double[] minimum = new double[groupCount];
double[] maximum = new double[groupCount];
int categoryCount = dataset.getColumnCount();
for (int item = 0; item < categoryCount; item++) {
double[] positive = new double[groupCount];
double[] negative = new double[groupCount];
int seriesCount = dataset.getRowCount();
for (int series = 0; series < seriesCount; series++) {
Number number = dataset.getValue(series, item);
if (number != null) {
double value = number.doubleValue();
if (value > 0.0) {
positive[groupIndex[series]]
= positive[groupIndex[series]] + value;
}
if (value < 0.0) {
negative[groupIndex[series]]
= negative[groupIndex[series]] + value;
// '+', remember value is negative
}
}
}
for (int g = 0; g < groupCount; g++) {
minimum[g] = Math.min(minimum[g], negative[g]);
maximum[g] = Math.max(maximum[g], positive[g]);
}
}
for (int j = 0; j < groupCount; j++) {
result = Range.combine(
result, new Range(minimum[j], maximum[j])
);
}
}
return result;
}
示例14: getDataRange
import org.jfree.data.Range; //导入方法依赖的package包/类
/**
* Returns the range for the specified axis.
*
* @param axis the axis.
*
* @return the range.
*/
public Range getDataRange(ValueAxis axis) {
Range result = null;
result = Range.combine(result, DatasetUtilities.findRangeExtent(this.dataset));
return result;
}