本文整理汇总了Java中org.jfree.data.general.DatasetUtilities.findStackedRangeBounds方法的典型用法代码示例。如果您正苦于以下问题:Java DatasetUtilities.findStackedRangeBounds方法的具体用法?Java DatasetUtilities.findStackedRangeBounds怎么用?Java DatasetUtilities.findStackedRangeBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.general.DatasetUtilities
的用法示例。
在下文中一共展示了DatasetUtilities.findStackedRangeBounds方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testFindStackedRangeBoundsForCategoryDataset1
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some checks for the findStackedRangeBounds() method.
*/
public void testFindStackedRangeBoundsForCategoryDataset1() {
CategoryDataset d1 = createCategoryDataset1();
Range r = DatasetUtilities.findStackedRangeBounds(d1);
assertEquals(0.0, r.getLowerBound(), EPSILON);
assertEquals(15.0, r.getUpperBound(), EPSILON);
d1 = createCategoryDataset2();
r = DatasetUtilities.findStackedRangeBounds(d1);
assertEquals(-2.0, r.getLowerBound(), EPSILON);
assertEquals(2.0, r.getUpperBound(), EPSILON);
}
示例2: testFindStackedRangeBoundsForTableXYDataset1
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some checks for the findStackedRangeBounds() method.
*/
public void testFindStackedRangeBoundsForTableXYDataset1() {
TableXYDataset d2 = createTableXYDataset1();
Range r = DatasetUtilities.findStackedRangeBounds(d2);
assertEquals(-2.0, r.getLowerBound(), EPSILON);
assertEquals(2.0, r.getUpperBound(), EPSILON);
}
示例3: testStackedRangeWithMap
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Tests the stacked range extent calculation.
*/
public void testStackedRangeWithMap() {
CategoryDataset d = createCategoryDataset1();
KeyToGroupMap map = new KeyToGroupMap("G0");
map.mapKeyToGroup("R2", "G1");
Range r = DatasetUtilities.findStackedRangeBounds(d, map);
assertEquals(0.0, r.getLowerBound(), EPSILON);
assertEquals(9.0, r.getUpperBound(), EPSILON);
}
示例4: 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) {
if (this.renderAsPercentages) {
return new Range(0.0, 1.0);
}
else {
return DatasetUtilities.findStackedRangeBounds(
(TableXYDataset) dataset);
}
}
else {
return null;
}
}
示例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> not permitted).
*
* @return The range (or <code>null</code> if the dataset is empty).
*/
public Range findRangeBounds(CategoryDataset dataset) {
if (this.renderAsPercentages) {
return new Range(0.0, 1.0);
}
else {
return DatasetUtilities.findStackedRangeBounds(dataset);
}
}
示例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 (or <code>null</code> if the dataset is empty).
*/
public Range findRangeBounds(CategoryDataset dataset) {
if (this.renderAsPercentages) {
return new Range(0.0, 1.0);
}
else {
return DatasetUtilities.findStackedRangeBounds(dataset, getBase());
}
}
示例7: testFindStackedRangeBoundsForCategoryDataset2
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some checks for the findStackedRangeBounds() method.
*/
public void testFindStackedRangeBoundsForCategoryDataset2() {
CategoryDataset d1 = new DefaultCategoryDataset();
Range r = DatasetUtilities.findStackedRangeBounds(d1);
assertTrue(r == null);
}
示例8: testFindStackedRangeBoundsForTableXYDataset2
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Some checks for the findStackedRangeBounds() method.
*/
public void testFindStackedRangeBoundsForTableXYDataset2() {
DefaultTableXYDataset d = new DefaultTableXYDataset();
Range r = DatasetUtilities.findStackedRangeBounds(d);
assertEquals(r, new Range(0.0, 0.0));
}
示例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 ([0.0, 0.0] if the dataset contains no values, and
* <code>null</code> if the dataset is <code>null</code>).
*
* @throws ClassCastException if <code>dataset</code> is not an instance
* of {@link TableXYDataset}.
*/
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
return DatasetUtilities.findStackedRangeBounds(
(TableXYDataset) dataset);
}
else {
return null;
}
}
示例10: 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) {
Range r = DatasetUtilities.findStackedRangeBounds(
dataset, this.seriesToGroupMap
);
return r;
}