Java Code Examples for org.jfree.data.general.DatasetUtils#findRangeBounds()

The following examples show how to use org.jfree.data.general.DatasetUtils#findRangeBounds() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XYBlockPixelSizeRenderer.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the range of values the renderer requires to display all the items from the specified
 * dataset.
 *
 * @param dataset the dataset ({@code null} permitted).
 *
 * @return The range ({@code null} if the dataset is {@code null} or empty).
 *
 * @see #findDomainBounds(XYDataset)
 */
@Override
public Range findRangeBounds(XYDataset dataset) {
  if (dataset != null) {
    Range r = DatasetUtils.findRangeBounds(dataset, false);
    if (r == null) {
      return null;
    } else {
      return new Range(r.getLowerBound() + this.yOffset,
          r.getUpperBound() + this.blockHeight + this.yOffset);
    }
  } else {
    return null;
  }
}
 
Example 2
Source File: XYBlockPixelSizeRenderer.java    From mzmine2 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the range of values the renderer requires to display all the items from the specified
 * dataset.
 *
 * @param dataset the dataset ({@code null} permitted).
 *
 * @return The range ({@code null} if the dataset is {@code null} or empty).
 *
 * @see #findDomainBounds(XYDataset)
 */
@Override
public Range findRangeBounds(XYDataset dataset) {
  if (dataset != null) {
    Range r = DatasetUtils.findRangeBounds(dataset, false);
    if (r == null) {
      return null;
    } else {
      return new Range(r.getLowerBound() + this.yOffset,
          r.getUpperBound() + this.blockHeight + this.yOffset);
    }
  } else {
    return null;
  }
}