本文整理汇总了Java中org.jfree.data.general.DatasetUtilities.findRangeBounds方法的典型用法代码示例。如果您正苦于以下问题:Java DatasetUtilities.findRangeBounds方法的具体用法?Java DatasetUtilities.findRangeBounds怎么用?Java DatasetUtilities.findRangeBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.general.DatasetUtilities
的用法示例。
在下文中一共展示了DatasetUtilities.findRangeBounds方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataRange
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range for an axis.
*
* @param axis the axis.
*
* @return The range for an axis.
*/
public Range getDataRange(ValueAxis axis) {
if (this.dataset == null) {
return null;
}
Range result = null;
if (axis == getDomainAxis()) {
result = DatasetUtilities.findDomainBounds(this.dataset);
}
else if (axis == getRangeAxis()) {
result = DatasetUtilities.findRangeBounds(this.dataset);
}
return result;
}
示例2: testFindRangeBounds1
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some tests for the findRangeExtent() method.
*/
public void testFindRangeBounds1() {
CategoryDataset dataset = createCategoryDataset1();
Range r = DatasetUtilities.findRangeBounds(dataset);
assertEquals(1.0, r.getLowerBound(), EPSILON);
assertEquals(6.0, r.getUpperBound(), EPSILON);
}
示例3: testFindRangeBounds2
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some tests for the findRangeBounds() method.
*/
public void testFindRangeBounds2() {
XYDataset dataset = createXYDataset1();
Range r = DatasetUtilities.findRangeBounds(dataset);
assertEquals(100.0, r.getLowerBound(), EPSILON);
assertEquals(105.0, r.getUpperBound(), EPSILON);
}
示例4: testDataRange
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* A small test for the data range calculated on this dataset.
*/
public void testDataRange() {
OHLCDataItem[] data = new OHLCDataItem[3];
data[0] = new OHLCDataItem(new Date(11L), 2.0, 4.0, 1.0, 3.0, 100.0);
data[1] = new OHLCDataItem(new Date(22L), 4.0, 9.0, 2.0, 5.0, 120.0);
data[2] = new OHLCDataItem(new Date(33L), 3.0, 7.0, 3.0, 6.0, 140.0);
DefaultOHLCDataset d = new DefaultOHLCDataset("S1", data);
Range r = DatasetUtilities.findRangeBounds(d, false);
assertEquals(1.0, r.getLowerBound(), EPSILON);
assertEquals(9.0, r.getUpperBound(), EPSILON);
}
示例5: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range of values the renderer requires to display all the
* items from the specified dataset.
*
* @param dataset the dataset (<code>null</code> permitted).
*
* @return The range (<code>null</code> if the dataset is <code>null</code>
* or empty).
*/
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
Range r = DatasetUtilities.findRangeBounds(dataset, false);
return new Range(r.getLowerBound() + this.yOffset,
r.getUpperBound() + this.blockHeight + this.yOffset);
}
else {
return null;
}
}
示例6: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range of values the renderer requires to display all the
* items from the specified dataset.
*
* @param dataset the dataset (<code>null</code> permitted).
*
* @return The range (<code>null</code> if the dataset is <code>null</code>
* or empty).
*/
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
return DatasetUtilities.findRangeBounds(dataset, false);
}
else {
return null;
}
}
示例7: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range required by this renderer to display all the range
* values in the specified dataset.
*
* @param dataset the dataset (<code>null</code> permitted).
*
* @return The range, or <code>null</code> if the dataset is
* <code>null</code>.
*/
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
return DatasetUtilities.findRangeBounds(dataset, true);
}
else {
return null;
}
}
示例8: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range of values the renderer requires to display all the
* items from the specified dataset. This takes into account the range
* of values in the dataset, plus the flag that determines whether or not
* the base value for the bars should be included in the range.
*
* @param dataset the dataset (<code>null</code> permitted).
*
* @return The range (or <code>null</code> if the dataset is
* <code>null</code> or empty).
*/
public Range findRangeBounds(CategoryDataset dataset) {
Range result = DatasetUtilities.findRangeBounds(dataset);
if (result != null) {
if (this.includeBaseInRange) {
result = Range.expandToInclude(result, this.base);
}
}
return result;
}
示例9: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range of values the renderer requires to display all the
* items from the specified dataset.
*
* @param dataset the dataset (<code>null</code> permitted).
*
* @return The range (or <code>null</code> if the dataset is
* <code>null</code> or empty).
*/
public Range findRangeBounds(CategoryDataset dataset) {
return DatasetUtilities.findRangeBounds(dataset);
}