本文整理了Java中org.jfree.data.Range.<init>
方法的一些代码示例,展示了Range.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.<init>
方法的具体详情如下:
包路径:org.jfree.data.Range
类名称:Range
方法名:<init>
[英]Creates a new range.
[中]创建一个新范围。
代码示例来源:origin: graphhopper/jsprit
private Range getRange(final XYSeriesCollection seriesCol) {
if (this.boundingBox == null) return seriesCol.getRangeBounds(false);
else return new Range(boundingBox.minY, boundingBox.maxY);
}
代码示例来源:origin: graphhopper/jsprit
private Range getDomainRange(final XYSeriesCollection seriesCol) {
if (this.boundingBox == null) return seriesCol.getDomainBounds(true);
else return new Range(boundingBox.minX, boundingBox.maxX);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the data range.
*
* @param axis the axis.
*
* @return The range of data displayed.
*/
@Override
public Range getDataRange(ValueAxis axis) {
return new Range(this.lowerBound, this.upperBound);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the x-range for the annotation.
*
* @return The range.
*
* @since 1.0.13
*/
@Override
public Range getXRange() {
return new Range(this.x, this.x + this.w);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the range of the values in this dataset's range.
*
* @param includeInterval a flag that determines whether or not the
* y-interval is taken into account.
*
* @return The range.
*/
@Override
public Range getRangeBounds(boolean includeInterval) {
return new Range(this.minValue, this.maxValue);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the y-range for the annotation.
*
* @return The range.
*
* @since 1.0.13
*/
@Override
public Range getYRange() {
return new Range(this.y, this.y + this.h);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the x-range for the annotation.
*
* @return The range.
*
* @since 1.0.13
*/
public Range getXRange() {
return new Range(this.x, this.x + this.w);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the range of the values in this dataset's range.
*
* @param includeInterval a flag that determines whether or not the
* y-interval is taken into account.
*
* @return The range.
*/
@Override
public Range getRangeBounds(boolean includeInterval) {
return new Range(this.minimumRangeValue, this.maximumRangeValue);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the range of the values in this dataset's range.
*
* @param includeInterval a flag that determines whether or not the
* y-interval is taken into account.
*
* @return The range.
*/
public Range getRangeBounds(boolean includeInterval) {
return new Range(this.minValue, this.maxValue);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the data range.
*
* @param axis the axis.
*
* @return The range of data displayed.
*/
public Range getDataRange(ValueAxis axis) {
return new Range(this.lowerBound, this.upperBound);
}
代码示例来源:origin: graphhopper/jsprit
private XYPlot createPlot(final XYSeriesCollection problem, XYSeriesCollection shipments, XYSeriesCollection solution) {
XYPlot plot = new XYPlot();
plot.setBackgroundPaint(Color.LIGHT_GRAY);
plot.setRangeGridlinePaint(Color.LIGHT_GRAY);
plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
XYLineAndShapeRenderer problemRenderer = getProblemRenderer(problem);
plot.setDataset(0, problem);
plot.setRenderer(0, problemRenderer);
XYItemRenderer shipmentsRenderer = getShipmentRenderer(shipments);
plot.setDataset(1, shipments);
plot.setRenderer(1, shipmentsRenderer);
if (solution != null) {
XYItemRenderer solutionRenderer = getRouteRenderer(solution);
plot.setDataset(2, solution);
plot.setRenderer(2, solutionRenderer);
}
NumberAxis xAxis = new NumberAxis();
NumberAxis yAxis = new NumberAxis();
if (boundingBox == null) {
xAxis.setRangeWithMargins(getDomainRange(problem));
yAxis.setRangeWithMargins(getRange(problem));
} else {
xAxis.setRangeWithMargins(new Range(boundingBox.minX, boundingBox.maxX));
yAxis.setRangeWithMargins(new Range(boundingBox.minY, boundingBox.maxY));
}
plot.setDomainAxis(xAxis);
plot.setRangeAxis(yAxis);
return plot;
}
代码示例来源:origin: jfree/jfreechart
/**
* Creates a new dataset.
*/
public DefaultMultiValueCategoryDataset() {
this.data = new KeyedObjects2D();
this.minimumRangeValue = null;
this.maximumRangeValue = null;
this.rangeBounds = new Range(0.0, 0.0);
}
代码示例来源:origin: jfree/jfreechart
/**
* Sets the axis range, where the new range is 'size' in length, and
* centered on 'value'.
*
* @param value the central value.
* @param length the range length.
*/
public void setRangeAboutValue(double value, double length) {
setRange(new Range(value - length / 2, value + length / 2));
}
代码示例来源:origin: jfree/jfreechart
/**
* Sets the axis range (after first adding the current margins to the
* range) and sends an {@link AxisChangeEvent} to all registered listeners.
* As a side-effect, the auto-range flag is set to {@code false}.
*
* @param lower the lower axis limit.
* @param upper the upper axis limit.
*/
public void setRangeWithMargins(double lower, double upper) {
setRangeWithMargins(new Range(lower, upper));
}
代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing
@Override
@OnAwt
public void setRangeAxisRange(double lower, double upper) {
this.rangeAxis = new Range(lower, upper);
setAutoZoomRange(true);
}
代码示例来源:origin: jfree/jfreechart
/**
* Creates a new {@code LogAxis} with the given label.
*
* @param label the axis label ({@code null} permitted).
*/
public LogAxis(String label) {
super(label, new NumberTickUnitSource());
setDefaultAutoRange(new Range(0.01, 1.0));
this.tickUnit = new NumberTickUnit(1.0, new DecimalFormat("0.#"), 10);
}
代码示例来源:origin: inspectIT/inspectIT
/**
* {@inheritDoc}
*/
@Override
public NumberAxis getAxis() {
NumberAxis rangeAxis = new NumberAxis("Boolean");
rangeAxis.setRange(new Range(-0.5, 1.5), true, false);
rangeAxis.setTickUnit(new NumberTickUnit(1d, new DecimalFormat("0")));
rangeAxis.setNumberFormatOverride(numberFormat);
return rangeAxis;
}
代码示例来源:origin: inspectIT/inspectIT
/**
* {@inheritDoc}
*/
@Override
public NumberAxis getAxis() {
NumberAxis rangeAxis = new NumberAxis("Percentage");
rangeAxis.setRange(new Range(0, 100), false, false);
rangeAxis.setAutoRangeMinimumSize(50, false);
rangeAxis.setTickUnit(new NumberTickUnit(10.0d, new DecimalFormat("0")));
rangeAxis.setNumberFormatOverride(numberFormat);
return rangeAxis;
}
代码示例来源:origin: jfree/jfreechart
/**
* Centers the axis range about the specified value and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param value the center value.
*/
public void centerRange(double value) {
double central = this.range.getCentralValue();
Range adjusted = new Range(this.range.getLowerBound() + value - central,
this.range.getUpperBound() + value - central);
setRange(adjusted);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Centers the axis range about the specified value and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param value the center value.
*/
public void centerRange(double value) {
double central = this.range.getCentralValue();
Range adjusted = new Range(this.range.getLowerBound() + value - central,
this.range.getUpperBound() + value - central);
setRange(adjusted);
}
内容来源于网络,如有侵权,请联系作者删除!