當前位置: 首頁>>代碼示例>>Java>>正文


Java PlotRenderingInfo.getSubplotIndex方法代碼示例

本文整理匯總了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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:31,代碼來源:AbstractChartPanel.java

示例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;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:27,代碼來源:ChartComposite.java

示例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;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:28,代碼來源:ChartPanel.java

示例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;
}
 
開發者ID:jfree,項目名稱:jfreechart-fx,代碼行數:22,代碼來源:ChartCanvas.java


注:本文中的org.jfree.chart.plot.PlotRenderingInfo.getSubplotIndex方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。