本文整理了Java中org.jfree.chart.plot.XYPlot.setDomainCrosshairValue()
方法的一些代码示例,展示了XYPlot.setDomainCrosshairValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.setDomainCrosshairValue()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:setDomainCrosshairValue
[英]Sets the domain crosshair value and sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
[中]设置域交叉线值,并向所有注册的侦听器发送PlotChangeEvent(前提是域交叉线可见)。
代码示例来源:origin: jfree/jfreechart
/**
* Sets the domain crosshair value and sends a {@link PlotChangeEvent} to
* all registered listeners (provided that the domain crosshair is visible).
*
* @param value the value.
*
* @see #getDomainCrosshairValue()
*/
public void setDomainCrosshairValue(double value) {
setDomainCrosshairValue(value, true);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets the domain crosshair value and sends a {@link PlotChangeEvent} to
* all registered listeners (provided that the domain crosshair is visible).
*
* @param value the value.
*
* @see #getDomainCrosshairValue()
*/
public void setDomainCrosshairValue(double value) {
setDomainCrosshairValue(value, 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
setDomainCrosshairValue(crosshairState.getCrosshairX(), false);
if (isDomainCrosshairVisible()) {
double x = getDomainCrosshairValue();
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
setDomainCrosshairValue(crosshairState.getCrosshairX(), false);
if (isDomainCrosshairVisible()) {
double x = getDomainCrosshairValue();
内容来源于网络,如有侵权,请联系作者删除!