本文整理了Java中org.jfree.data.Range.combine
方法的一些代码示例,展示了Range.combine
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.combine
方法的具体详情如下:
包路径:org.jfree.data.Range
类名称:Range
方法名:combine
[英]Creates a new range by combining two existing ranges.
Note that:
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* 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;
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the range axis is shared between subplots, the JFreeChart code
* will only call this method for the range values (although this is not
* checked/enforced).
*
* @param axis the axis.
*
* @return The range.
*/
@Override
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;
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the range axis is shared between subplots, the JFreeChart code
* will only call this method for the range values (although this is not
* checked/enforced).
*
* @param axis the axis.
*
* @return The range.
*/
@Override
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;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the domain axis is shared between subplots, the JFreeChart code
* will only call this method for the domain values (although this is not
* checked/enforced).
*
* @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;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the range axis is shared between subplots, the JFreeChart code
* will only call this method for the range values (although this is not
* checked/enforced).
*
* @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;
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the domain axis is shared between subplots, the JFreeChart code
* will only call this method for the domain values (although this is not
* checked/enforced).
*
* @param axis the axis.
*
* @return The range (possibly {@code null}).
*/
@Override
public Range getDataRange(ValueAxis axis) {
if (this.subplots == null) {
return null;
}
Range result = null;
for (XYPlot p : this.subplots) {
result = Range.combine(result, p.getDataRange(axis));
}
return result;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns a range representing the extent of the data values in this plot
* (obtained from the subplots) that will be rendered against the specified
* axis. NOTE: This method is intended for internal JFreeChart use, and
* is public only so that code in the axis classes can call it. Since
* only the range axis is shared between subplots, the JFreeChart code
* will only call this method for the range values (although this is not
* checked/enforced).
*
* @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;
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the range for the specified axis.
*
* @param axis the axis.
*
* @return The range.
*/
@Override
public Range getDataRange(ValueAxis axis) {
Range result = null;
int axisIdx = getAxisIndex(axis);
List mappedDatasets = new ArrayList();
if (axisIdx >= 0) {
mappedDatasets = getDatasetsMappedToAxis(new Integer(axisIdx));
}
// iterate through the datasets that map to the axis and get the union
// of the ranges.
Iterator iterator = mappedDatasets.iterator();
int datasetIdx = -1;
while (iterator.hasNext()) {
datasetIdx++;
XYDataset d = (XYDataset) iterator.next();
if (d != null) {
// FIXME better ask the renderer instead of DatasetUtilities
result = Range.combine(result,
DatasetUtils.findRangeBounds(d));
}
}
return result;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the bounds for the y-values in the dataset.
*
* @param visibleSeriesKeys the visible series keys.
* @param xRange the x-range (<code>null</code> not permitted).
* @param includeInterval ignored.
*
* @return The bounds.
*
* @since 1.0.14
*/
public Range getRangeBounds(List visibleSeriesKeys, Range xRange,
boolean includeInterval) {
Range result = null;
Iterator iterator = visibleSeriesKeys.iterator();
while (iterator.hasNext()) {
Comparable seriesKey = (Comparable) iterator.next();
TimeSeries series = getSeries(seriesKey);
Range r = null;
r = new Range(series.getMinY(), series.getMaxY());
// FIXME: Here we are ignoring the xRange
result = Range.combine(result, r);
}
return result;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
CategoryItemRenderer r = getRendererForDataset(d);
if (r != null) {
result = Range.combine(result, r.findRangeBounds(d));
代码示例来源:origin: jfree/jfreechart
/**
* Returns the range of data values that will be plotted against the range
* axis. If the dataset is {@code null}, this method returns
* {@code null}.
*
* @param axis the axis.
*
* @return The data range.
*/
@Override
public Range getDataRange(ValueAxis axis) {
Range result = null;
List<CategoryDataset> mappedDatasets = new ArrayList<CategoryDataset>();
int rangeIndex = findRangeAxisIndex(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.
for (CategoryDataset d : mappedDatasets) {
CategoryItemRenderer r = getRendererForDataset(d);
if (r != null) {
result = Range.combine(result, r.findRangeBounds(d));
}
}
return result;
}
代码示例来源:origin: jfree/jfreechart
end.getLastMillisecond(this.workingCalendar));
result = Range.combine(result, temp);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
end.getLastMillisecond(this.workingCalendar));
result = Range.combine(result, temp);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
end.getLastMillisecond(this.workingCalendar));
result = Range.combine(result, temp);
代码示例来源:origin: jfree/jfreechart
end.getLastMillisecond(this.workingCalendar));
result = Range.combine(result, temp);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
result = Range.combine(result, new Range(minimum[j],
maximum[j]));
代码示例来源:origin: jfree/jfreechart
end.getEnd().getTime());
result = Range.combine(result, temp);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
end.getEnd().getTime());
result = Range.combine(result, temp);
代码示例来源:origin: jfree/jfreechart
result = Range.combine(result, new Range(minimum[j],
maximum[j]));
代码示例来源:origin: bcdev/beam
void updateAnnotation(RasterDataNode raster) {
removeAnnotation();
final AbstractTimeSeries timeSeries = getTimeSeries();
TimeCoding timeCoding = timeSeries.getRasterTimeMap().get(raster);
if (timeCoding != null) {
final ProductData.UTC startTime = timeCoding.getStartTime();
final Millisecond timePeriod = new Millisecond(startTime.getAsDate(),
ProductData.UTC.UTC_TIME_ZONE,
Locale.getDefault());
double millisecond = timePeriod.getFirstMillisecond();
Range valueRange = null;
for (int i = 0; i < timeSeriesPlot.getRangeAxisCount(); i++) {
valueRange = Range.combine(valueRange, timeSeriesPlot.getRangeAxis(i).getRange());
}
if (valueRange != null) {
XYAnnotation annotation = new XYLineAnnotation(millisecond, valueRange.getLowerBound(), millisecond,
valueRange.getUpperBound());
timeSeriesPlot.addAnnotation(annotation, true);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!