本文整理了Java中org.jfree.data.Range.getLowerBound
方法的一些代码示例,展示了Range.getLowerBound
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.getLowerBound
方法的具体详情如下:
包路径:org.jfree.data.Range
类名称:Range
方法名:getLowerBound
[英]Returns the lower bound for the range.
[中]返回范围的下限。
代码示例来源:origin: jfree/jfreechart
/**
* Constructs a new range that is based on another {@link Range}. The
* other range does not have to be a {@link DateRange}. If it is not, the
* upper and lower bounds are evaluated as milliseconds since midnight
* GMT, 1-Jan-1970.
*
* @param other the other range ({@code null} not permitted).
*/
public DateRange(Range other) {
this(other.getLowerBound(), other.getUpperBound());
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Constructs a new range that is based on another {@link Range}. The
* other range does not have to be a {@link DateRange}. If it is not, the
* upper and lower bounds are evaluated as milliseconds since midnight
* GMT, 1-Jan-1970.
*
* @param other the other range (<code>null</code> not permitted).
*/
public DateRange(Range other) {
this(other.getLowerBound(), other.getUpperBound());
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the display length for the axis.
*
* @return The display length.
*/
private double getDisplayLength() {
if (this.displayStart < this.displayEnd) {
return (this.displayEnd - this.displayStart);
}
else {
return (this.fixedRange.getUpperBound() - this.displayStart)
+ (this.displayEnd - this.fixedRange.getLowerBound());
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the display length for the axis.
*
* @return The display length.
*/
private double getDisplayLength() {
if (this.displayStart < this.displayEnd) {
return (this.displayEnd - this.displayStart);
}
else {
return (this.fixedRange.getUpperBound() - this.displayStart)
+ (this.displayEnd - this.fixedRange.getLowerBound());
}
}
代码示例来源:origin: bcdev/beam
private Range getNewRange(Range newBounds, Range currentBounds, Range plotBounds) {
if (currentBounds == null) {
currentBounds = newBounds;
} else {
if (plotBounds.getLowerBound() > 0 && newBounds.getLowerBound() < currentBounds.getLowerBound() ||
newBounds.getUpperBound() > currentBounds.getUpperBound()) {
currentBounds = new Range(Math.min(currentBounds.getLowerBound(), newBounds.getLowerBound()),
Math.max(currentBounds.getUpperBound(), newBounds.getUpperBound()));
}
}
return currentBounds;
}
代码示例来源:origin: senbox-org/snap-desktop
private Range getNewRange(Range newBounds, Range currentBounds, Range plotBounds) {
if (currentBounds == null) {
currentBounds = newBounds;
} else {
if (plotBounds.getLowerBound() > 0 && newBounds.getLowerBound() < currentBounds.getLowerBound() ||
newBounds.getUpperBound() > currentBounds.getUpperBound()) {
currentBounds = new Range(Math.min(currentBounds.getLowerBound(), newBounds.getLowerBound()),
Math.max(currentBounds.getUpperBound(), newBounds.getUpperBound()));
}
}
return currentBounds;
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns {@code true} if the range intersects with the specified
* range, and {@code false} otherwise.
*
* @param range another range ({@code null} not permitted).
*
* @return A boolean.
*
* @since 1.0.9
*/
public boolean intersects(Range range) {
return intersects(range.getLowerBound(), range.getUpperBound());
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns <code>true</code> if the range intersects with the specified
* range, and <code>false</code> otherwise.
*
* @param range another range (<code>null</code> not permitted).
*
* @return A boolean.
*
* @since 1.0.9
*/
public boolean intersects(Range range) {
return intersects(range.getLowerBound(), range.getUpperBound());
}
代码示例来源:origin: jfree/jfreechart
/**
* Sets a new axis range. The period is extended to fit the range size, if
* necessary.
*
* @param range the range.
* @param turnOffAutoRange switch off the auto range.
* @param notify notify?
*
* @see org.jfree.chart.axis.ValueAxis#setRange(Range, boolean, boolean)
*/
@Override
public void setRange(Range range, boolean turnOffAutoRange,
boolean notify) {
double size = range.getUpperBound() - range.getLowerBound();
if (size > this.period) {
this.period = size;
}
super.setRange(range, turnOffAutoRange, notify);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets a new axis range. The period is extended to fit the range size, if
* necessary.
*
* @param range the range.
* @param turnOffAutoRange switch off the auto range.
* @param notify notify?
*
* @see org.jfree.chart.axis.ValueAxis#setRange(Range, boolean, boolean)
*/
public void setRange(Range range, boolean turnOffAutoRange,
boolean notify) {
double size = range.getUpperBound() - range.getLowerBound();
if (size > this.period) {
this.period = size;
}
super.setRange(range, turnOffAutoRange, notify);
}
代码示例来源:origin: jfree/jfreechart
private Range trimToContentHeight(Range r) {
if (r == null) {
return null;
}
double lowerBound = 0.0;
double upperBound = Double.POSITIVE_INFINITY;
if (r.getLowerBound() > 0.0) {
lowerBound = trimToContentHeight(r.getLowerBound());
}
if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
upperBound = trimToContentHeight(r.getUpperBound());
}
return new Range(lowerBound, upperBound);
}
代码示例来源:origin: senbox-org/snap-desktop
private Range getNewPlotBounds(Range bounds) {
double range = bounds.getLength();
double delta = range * relativePlotInset;
return new Range(Math.max(0, bounds.getLowerBound() - delta),
bounds.getUpperBound() + delta);
}
代码示例来源:origin: jfree/jfreechart
private Range trimToContentWidth(Range r) {
if (r == null) {
return null;
}
double lowerBound = 0.0;
double upperBound = Double.POSITIVE_INFINITY;
if (r.getLowerBound() > 0.0) {
lowerBound = trimToContentWidth(r.getLowerBound());
}
if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
upperBound = trimToContentWidth(r.getUpperBound());
}
return new Range(lowerBound, upperBound);
}
代码示例来源:origin: bcdev/beam
private Range getNewPlotBounds(Range bounds) {
double range = bounds.getLength();
double delta = range * relativePlotInset;
return new Range(Math.max(0, bounds.getLowerBound() - delta),
bounds.getUpperBound() + delta);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
private Range trimToContentWidth(Range r) {
if (r == null) {
return null;
}
double lowerBound = 0.0;
double upperBound = Double.POSITIVE_INFINITY;
if (r.getLowerBound() > 0.0) {
lowerBound = trimToContentWidth(r.getLowerBound());
}
if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
upperBound = trimToContentWidth(r.getUpperBound());
}
return new Range(lowerBound, upperBound);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
private Range trimToContentHeight(Range r) {
if (r == null) {
return null;
}
double lowerBound = 0.0;
double upperBound = Double.POSITIVE_INFINITY;
if (r.getLowerBound() > 0.0) {
lowerBound = trimToContentHeight(r.getLowerBound());
}
if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
upperBound = trimToContentHeight(r.getUpperBound());
}
return new Range(lowerBound, upperBound);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Scales the range by the specified factor.
*
* @param base the base range (<code>null</code> not permitted).
* @param factor the scaling factor (must be non-negative).
*
* @return A new range.
*
* @since 1.0.9
*/
public static Range scale(Range base, double factor) {
if (base == null) {
throw new IllegalArgumentException("Null 'base' argument.");
}
if (factor < 0) {
throw new IllegalArgumentException("Negative 'factor' argument.");
}
return new Range(base.getLowerBound() * factor,
base.getUpperBound() * factor);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Calculates the number of visible ticks.
*
* @return The number of visible ticks on the axis.
*/
protected int calculateVisibleTickCount() {
double unit = getTickUnit().getSize();
Range range = getRange();
return (int) (Math.floor(range.getUpperBound() / unit)
- Math.ceil(range.getLowerBound() / unit) + 1);
}
代码示例来源:origin: jfree/jfreechart
/**
* Calculates the number of visible ticks.
*
* @return The number of visible ticks on the axis.
*/
protected int calculateVisibleTickCount() {
double unit = getTickUnit().getSize();
Range range = getRange();
return (int) (Math.floor(range.getUpperBound() / unit)
- Math.ceil(range.getLowerBound() / unit) + 1);
}
代码示例来源:origin: jfree/jfreechart
/**
* Scales the range by the specified factor.
*
* @param base the base range ({@code null} not permitted).
* @param factor the scaling factor (must be non-negative).
*
* @return A new range.
*
* @since 1.0.9
*/
public static Range scale(Range base, double factor) {
Args.nullNotPermitted(base, "base");
if (factor < 0) {
throw new IllegalArgumentException("Negative 'factor' argument.");
}
return new Range(base.getLowerBound() * factor,
base.getUpperBound() * factor);
}
内容来源于网络,如有侵权,请联系作者删除!