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

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

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

Plot.handleClick介绍

[英]Handles a 'click' on the plot. Since the plot does not maintain any information about where it has been drawn, the plot rendering info is supplied as an argument so that the plot dimensions can be determined.
[中]处理对绘图的“点击”。由于绘图不保留有关绘制位置的任何信息,因此将绘图渲染信息作为参数提供,以便确定绘图尺寸。

代码示例

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

/**
 * Handles a 'click' on the chart.  JFreeChart is not a UI component, so
 * some other object (for example, {@link ChartPanel}) needs to capture
 * the click event and pass it onto the JFreeChart object.
 * If you are not using JFreeChart in a client application, then this
 * method is not required.
 *
 * @param x  x-coordinate of the click (in Java2D space).
 * @param y  y-coordinate of the click (in Java2D space).
 * @param info  contains chart dimension and entity information
 *              ({@code null} not permitted).
 */
public void handleClick(int x, int y, ChartRenderingInfo info) {
  // pass the click on to the plot...
  // rely on the plot to post a plot change event and redraw the chart...
  this.plot.handleClick(x, y, info.getPlotInfo());
}

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

/**
 * Handles a 'click' on the chart.  JFreeChart is not a UI component, so
 * some other object (for example, {@link ChartPanel}) needs to capture
 * the click event and pass it onto the JFreeChart object.
 * If you are not using JFreeChart in a client application, then this
 * method is not required.
 *
 * @param x  x-coordinate of the click (in Java2D space).
 * @param y  y-coordinate of the click (in Java2D space).
 * @param info  contains chart dimension and entity information
 *              (<code>null</code> not permitted).
 */
public void handleClick(int x, int y, ChartRenderingInfo info) {
  // pass the click on to the plot...
  // rely on the plot to post a plot change event and redraw the chart...
  this.plot.handleClick(x, y, info.getPlotInfo());
}

相关文章