org.jfree.chart.plot.XYPlot.isDomainPannable()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.jfree.chart.plot.XYPlot.isDomainPannable()方法的一些代码示例,展示了XYPlot.isDomainPannable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.isDomainPannable()方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:isDomainPannable

XYPlot.isDomainPannable介绍

[英]Returns true if panning is enabled for the domain axes, and false otherwise.
[中]如果为域轴启用平移,则返回true,否则返回false。

代码示例

代码示例来源:origin: jfree/jfreechart

/**
 * Returns {@code true} if the domain is pannable for at least one subplot,
 * and {@code false} otherwise.
 * 
 * @return A boolean. 
 */
@Override
public boolean isDomainPannable() {
  for (XYPlot subplot : this.subplots) {
    if (subplot.isDomainPannable()) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: jfree/jfreechart

/**
 * Pans the domain axes by the specified percentage.
 *
 * @param percent  the distance to pan (as a percentage of the axis length).
 * @param info the plot info
 * @param source the source point where the pan action started.
 *
 * @since 1.0.13
 */
@Override
public void panDomainAxes(double percent, PlotRenderingInfo info,
    Point2D source) {
  if (!isDomainPannable()) {
    return;
  }
  int domainAxisCount = getDomainAxisCount();
  for (int i = 0; i < domainAxisCount; i++) {
    ValueAxis axis = getDomainAxis(i);
    if (axis == null) {
      continue;
    }
    axis.pan(axis.isInverted() ? -percent : percent);
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Pans the domain axes by the specified percentage.
 *
 * @param percent  the distance to pan (as a percentage of the axis length).
 * @param info the plot info
 * @param source the source point where the pan action started.
 *
 * @since 1.0.13
 */
public void panDomainAxes(double percent, PlotRenderingInfo info,
    Point2D source) {
  if (!isDomainPannable()) {
    return;
  }
  int domainAxisCount = getDomainAxisCount();
  for (int i = 0; i < domainAxisCount; i++) {
    ValueAxis axis = getDomainAxis(i);
    if (axis == null) {
      continue;
    }
    if (axis.isInverted()) {
      percent = -percent;
    }
    axis.pan(percent);
  }
}

代码示例来源:origin: jfree/jfreechart

return;
if (!subplot.isDomainPannable()) {
  return;

相关文章

微信公众号

最新文章

更多

XYPlot类方法