本文整理匯總了Java中org.jfree.chart.plot.PlotRenderingInfo.getSubplotIndex方法的典型用法代碼示例。如果您正苦於以下問題:Java PlotRenderingInfo.getSubplotIndex方法的具體用法?Java PlotRenderingInfo.getSubplotIndex怎麽用?Java PlotRenderingInfo.getSubplotIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.plot.PlotRenderingInfo
的用法示例。
在下文中一共展示了PlotRenderingInfo.getSubplotIndex方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getScreenDataArea
import org.jfree.chart.plot.PlotRenderingInfo; //導入方法依賴的package包/類
/**
* Returns the data area (the area inside the axes) for the plot or subplot, with the current
* scaling applied.
*
* @param x
* the x-coordinate (for subplot selection).
* @param y
* the y-coordinate (for subplot selection).
*
* @return The scaled data area.
*/
@Override
public Rectangle2D getScreenDataArea(int x, int y) {
PlotRenderingInfo plotInfo = this.info.getPlotInfo();
Rectangle2D result;
if (plotInfo.getSubplotCount() == 0) {
result = getScreenDataArea();
} else {
// get the origin of the zoom selection in the Java2D space used for
// drawing the chart (that is, before any scaling to fit the panel)
Point2D selectOrigin = translateScreenToJava2D(new Point(x, y));
int subplotIndex = plotInfo.getSubplotIndex(selectOrigin);
if (subplotIndex == -1) {
return null;
}
result = scale(plotInfo.getSubplotInfo(subplotIndex).getDataArea());
}
return result;
}
示例2: getScreenDataArea
import org.jfree.chart.plot.PlotRenderingInfo; //導入方法依賴的package包/類
/**
* Returns the data area (the area inside the axes) for the plot or subplot,
* with the current scaling applied.
*
* @param x the x-coordinate (for subplot selection).
* @param y the y-coordinate (for subplot selection).
*
* @return The scaled data area.
*/
public Rectangle getScreenDataArea(int x, int y) {
PlotRenderingInfo plotInfo = this.info.getPlotInfo();
Rectangle result;
if (plotInfo.getSubplotCount() == 0)
result = getScreenDataArea();
else {
// get the origin of the zoom selection in the Java2D space used for
// drawing the chart (that is, before any scaling to fit the panel)
Point2D selectOrigin = translateScreenToJava2D(new Point(x, y));
int subplotIndex = plotInfo.getSubplotIndex(selectOrigin);
if (subplotIndex == -1) {
return null;
}
result = scale(plotInfo.getSubplotInfo(subplotIndex).getDataArea());
}
return result;
}
示例3: getScreenDataArea
import org.jfree.chart.plot.PlotRenderingInfo; //導入方法依賴的package包/類
/**
* Returns the data area (the area inside the axes) for the plot or subplot,
* with the current scaling applied.
*
* @param x the x-coordinate (for subplot selection).
* @param y the y-coordinate (for subplot selection).
*
* @return The scaled data area.
*/
public Rectangle2D getScreenDataArea(int x, int y) {
PlotRenderingInfo plotInfo = this.info.getPlotInfo();
Rectangle2D result;
if (plotInfo.getSubplotCount() == 0) {
result = getScreenDataArea();
}
else {
// get the origin of the zoom selection in the Java2D space used for
// drawing the chart (that is, before any scaling to fit the panel)
Point2D selectOrigin = translateScreenToJava2D(new Point(x, y));
int subplotIndex = plotInfo.getSubplotIndex(selectOrigin);
if (subplotIndex == -1) {
return null;
}
result = scale(plotInfo.getSubplotInfo(subplotIndex).getDataArea());
}
return result;
}
示例4: findDataArea
import org.jfree.chart.plot.PlotRenderingInfo; //導入方法依賴的package包/類
/**
* Returns the data area (the area inside the axes) for the plot or subplot.
*
* @param point the selection point (for subplot selection).
*
* @return The data area.
*/
public Rectangle2D findDataArea(Point2D point) {
PlotRenderingInfo plotInfo = this.info.getPlotInfo();
Rectangle2D result;
if (plotInfo.getSubplotCount() == 0) {
result = plotInfo.getDataArea();
} else {
int subplotIndex = plotInfo.getSubplotIndex(point);
if (subplotIndex == -1) {
return null;
}
result = plotInfo.getSubplotInfo(subplotIndex).getDataArea();
}
return result;
}