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

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

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

XYPlot.setRangeCrosshairValue介绍

[英]Sets the range crosshair value.

Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
[中]设置范围十字线值。
注册的监听器会收到打印已修改的通知,但前提是十字线可见。

代码示例

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

/**
 * Sets the range crosshair value.
 * <P>
 * Registered listeners are notified that the plot has been modified, but
 * only if the crosshair is visible.
 *
 * @param value  the new value.
 *
 * @see #getRangeCrosshairValue()
 */
public void setRangeCrosshairValue(double value) {
  setRangeCrosshairValue(value, true);
}

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

/**
 * Sets the range crosshair value.
 * <P>
 * Registered listeners are notified that the plot has been modified, but
 * only if the crosshair is visible.
 *
 * @param value  the new value.
 *
 * @see #getRangeCrosshairValue()
 */
public void setRangeCrosshairValue(double value) {
  setRangeCrosshairValue(value, true);
}

代码示例来源:origin: stackoverflow.com

plot1.setRangeCrosshairValue(4000, true);
plot1.setRangeCrosshairLockedOnData(true);
plot1.setRangeCrosshairVisible(true);

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

/**
 * Handles a 'click' on the plot by updating the anchor values.
 *
 * @param x  the x-coordinate, where the click occurred, in Java2D space.
 * @param y  the y-coordinate, where the click occurred, in Java2D space.
 * @param info  object containing information about the plot dimensions.
 */
@Override
public void handleClick(int x, int y, PlotRenderingInfo info) {
  Rectangle2D dataArea = info.getDataArea();
  if (dataArea.contains(x, y)) {
    // set the anchor value for the horizontal axis...
    ValueAxis xaxis = getDomainAxis();
    if (xaxis != null) {
      double hvalue = xaxis.java2DToValue(x, info.getDataArea(),
          getDomainAxisEdge());
      setDomainCrosshairValue(hvalue);
    }
    // set the anchor value for the vertical axis...
    ValueAxis yaxis = getRangeAxis();
    if (yaxis != null) {
      double vvalue = yaxis.java2DToValue(y, info.getDataArea(),
          getRangeAxisEdge());
      setRangeCrosshairValue(vvalue);
    }
  }
}

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

/**
 * Handles a 'click' on the plot by updating the anchor values.
 *
 * @param x  the x-coordinate, where the click occurred, in Java2D space.
 * @param y  the y-coordinate, where the click occurred, in Java2D space.
 * @param info  object containing information about the plot dimensions.
 */
public void handleClick(int x, int y, PlotRenderingInfo info) {
  Rectangle2D dataArea = info.getDataArea();
  if (dataArea.contains(x, y)) {
    // set the anchor value for the horizontal axis...
    ValueAxis xaxis = getDomainAxis();
    if (xaxis != null) {
      double hvalue = xaxis.java2DToValue(x, info.getDataArea(),
          getDomainAxisEdge());
      setDomainCrosshairValue(hvalue);
    }
    // set the anchor value for the vertical axis...
    ValueAxis yaxis = getRangeAxis();
    if (yaxis != null) {
      double vvalue = yaxis.java2DToValue(y, info.getDataArea(),
          getRangeAxisEdge());
      setRangeCrosshairValue(vvalue);
    }
  }
}

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

setRangeCrosshairValue(crosshairState.getCrosshairY(), false);
if (isRangeCrosshairVisible()) {
  double y = getRangeCrosshairValue();

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

setRangeCrosshairValue(crosshairState.getCrosshairY(), false);
if (isRangeCrosshairVisible()) {
  double y = getRangeCrosshairValue();

相关文章

微信公众号

最新文章

更多

XYPlot类方法