当前位置: 首页>>代码示例>>Java>>正文


Java Plot.isNotify方法代码示例

本文整理汇总了Java中org.jfree.chart.plot.Plot.isNotify方法的典型用法代码示例。如果您正苦于以下问题:Java Plot.isNotify方法的具体用法?Java Plot.isNotify怎么用?Java Plot.isNotify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.plot.Plot的用法示例。


在下文中一共展示了Plot.isNotify方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shrinkSelectionOnCenter

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Zooms in on an anchor point (specified in screen coordinate space).
 * 
 * @param x
 *            the x value (in screen coordinates).
 * @param y
 *            the y value (in screen coordinates).
 */

public void shrinkSelectionOnCenter(double x, double y, MouseEvent selectionEvent) {
	Plot plot = this.chart.getPlot();
	if (plot == null) {
		return;
	}
	// here we tweak the notify flag on the plot so that only
	// one notification happens even though we update multiple
	// axes...
	boolean savedNotify = plot.isNotify();
	plot.setNotify(false);
	shrinkSelectionOnDomain(x, y, selectionEvent);
	shrinkSelectionOnRange(x, y, selectionEvent);
	plot.setNotify(savedNotify);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:AbstractChartPanel.java

示例2: enlargeSelectionOnCenter

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Zooms out on an anchor point (specified in screen coordinate space).
 * 
 * @param x
 *            the x value (in screen coordinates).
 * @param y
 *            the y value (in screen coordinates).
 */

public void enlargeSelectionOnCenter(double x, double y, MouseEvent selectionEvent) {
	Plot plot = this.chart.getPlot();
	if (plot == null) {
		return;
	}
	// here we tweak the notify flag on the plot so that only
	// one notification happens even though we update multiple
	// axes...
	boolean savedNotify = plot.isNotify();
	plot.setNotify(false);
	enlargeSelectionOnDomain(x, y, selectionEvent);
	enlargeSelectionOnRange(x, y, selectionEvent);
	plot.setNotify(savedNotify);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:AbstractChartPanel.java

示例3: restoreAutoBounds

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Restores the auto-range calculation on both axes.
 */

@Override
public void restoreAutoBounds() {
	Plot plot = this.chart.getPlot();
	if (plot == null) {
		return;
	}
	// here we tweak the notify flag on the plot so that only
	// one notification happens even though we update multiple
	// axes...
	boolean savedNotify = plot.isNotify();
	plot.setNotify(false);
	selectCompleteDomainBounds();
	selectCompleteRangeBounds();
	plot.setNotify(savedNotify);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:20,代码来源:AbstractChartPanel.java

示例4: handleZoomable

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Handle the case where a plot implements the {@link Zoomable} interface.
 *
 * @param zoomable  the zoomable plot.
 * @param e  the mouse wheel event.
 */
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable, 
        ScrollEvent e) {
    // don't zoom unless the mouse pointer is in the plot's data area
    ChartRenderingInfo info = canvas.getRenderingInfo();
    PlotRenderingInfo pinfo = info.getPlotInfo();
    Point2D p = new Point2D.Double(e.getX(), e.getY());
    if (pinfo.getDataArea().contains(p)) {
        Plot plot = (Plot) zoomable;
        // do not notify while zooming each axis
        boolean notifyState = plot.isNotify();
        plot.setNotify(false);
        int clicks = (int) e.getDeltaY();
        double zf = 1.0 + this.zoomFactor;
        if (clicks < 0) {
            zf = 1.0 / zf;
        }
        if (canvas.isDomainZoomable()) {
            zoomable.zoomDomainAxes(zf, pinfo, p, true);
        }
        if (canvas.isRangeZoomable()) {
            zoomable.zoomRangeAxes(zf, pinfo, p, true);
        }
        plot.setNotify(notifyState);  // this generates the change event too
    } 
}
 
开发者ID:jfree,项目名称:jfreechart-fx,代码行数:32,代码来源:ScrollHandlerFX.java

示例5: selectCompleteDomainBounds

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Restores the auto-range calculation on the domain axis.
 */

public void selectCompleteDomainBounds() {
	Plot plot = this.chart.getPlot();
	if (plot instanceof Zoomable) {
		Zoomable z = (Zoomable) plot;
		// here we tweak the notify flag on the plot so that only
		// one notification happens even though we update multiple
		// axes...
		boolean savedNotify = plot.isNotify();
		plot.setNotify(false);
		// we need to guard against this.zoomPoint being null
		Point2D zp = this.zoomPoint != null ? this.zoomPoint : new Point();
		z.zoomDomainAxes(0.0, this.info.getPlotInfo(), zp);
		plot.setNotify(savedNotify);

		if (plot instanceof XYPlot) {
			XYPlot xyPlot = (XYPlot) plot;
			Selection selectionObject = new Selection();
			for (int i = 0; i < xyPlot.getDomainAxisCount(); i++) {
				ValueAxis domain = xyPlot.getDomainAxis(i);
				Range axisRange = new Range(domain.getLowerBound(), domain.getUpperBound());
				for (String axisName : axisNameResolver.resolveXAxis(i)) {
					selectionObject.addDelimiter(axisName, axisRange);
				}
			}
			informSelectionListener(selectionObject, null);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:33,代码来源:AbstractChartPanel.java

示例6: selectCompleteRangeBounds

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
/**
 * Restores the auto-range calculation on the range axis.
 */

public void selectCompleteRangeBounds() {
	Plot plot = this.chart.getPlot();
	if (plot instanceof Zoomable) {
		Zoomable z = (Zoomable) plot;
		// here we tweak the notify flag on the plot so that only
		// one notification happens even though we update multiple
		// axes...
		boolean savedNotify = plot.isNotify();
		plot.setNotify(false);
		// we need to guard against this.zoomPoint being null
		Point2D zp = this.zoomPoint != null ? this.zoomPoint : new Point();
		z.zoomRangeAxes(0.0, this.info.getPlotInfo(), zp);
		plot.setNotify(savedNotify);

		if (plot instanceof XYPlot) {
			XYPlot xyPlot = (XYPlot) plot;
			Selection selectionObject = new Selection();
			for (int i = 0; i < xyPlot.getRangeAxisCount(); i++) {
				ValueAxis range = xyPlot.getRangeAxis(i);
				Range axisRange = new Range(range.getLowerBound(), range.getUpperBound());
				for (String axisName : axisNameResolver.resolveYAxis(i)) {
					selectionObject.addDelimiter(axisName, axisRange);
				}
			}
			informSelectionListener(selectionObject, null);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:33,代码来源:AbstractChartPanel.java

示例7: restoreAutoBounds

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
@Override
public void restoreAutoBounds() {
	Plot plot = getChart().getPlot();
	if (plot == null) {
		return;
	}
	// here we tweak the notify flag on the plot so that only
	// one notification happens even though we update multiple
	// axes...
	boolean savedNotify = plot.isNotify();
	plot.setNotify(false);

	if (plot instanceof LinkAndBrushPlot) {

		LinkAndBrushPlot LABPlot = (LinkAndBrushPlot) plot;

		List<Pair<Integer, Range>> zoomedDomainAxisRanges = new LinkedList<Pair<Integer, Range>>();
		List<Pair<Integer, Range>> zoomedRangeAxisRanges = new LinkedList<Pair<Integer, Range>>();

		zoomedDomainAxisRanges.addAll(LABPlot.restoreAutoDomainAxisBounds(zoomOnLinkAndBrushSelection));
		zoomedRangeAxisRanges.addAll(LABPlot.restoreAutoRangeAxisBounds(zoomOnLinkAndBrushSelection));

		if (zoomOnLinkAndBrushSelection) {
			informLinkAndBrushSelectionListeners(new LinkAndBrushSelection(SelectionType.RESTORE_AUTO_BOUNDS,
					zoomedDomainAxisRanges, zoomedRangeAxisRanges));
		} else {
			informLinkAndBrushSelectionListeners(new LinkAndBrushSelection(SelectionType.RESTORE_SELECTION,
					zoomedDomainAxisRanges, zoomedRangeAxisRanges));
		}

	} else {
		restoreAutoDomainBounds();
		restoreAutoRangeBounds();
	}

	plot.setNotify(savedNotify);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:38,代码来源:LinkAndBrushChartPanel.java

示例8: zoom

import org.jfree.chart.plot.Plot; //导入方法依赖的package包/类
@Override
public void zoom(Rectangle2D selection) {
	// 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((int) Math.ceil(selection.getX()),
			(int) Math.ceil(selection.getY())));
	PlotRenderingInfo plotInfo = getChartRenderingInfo().getPlotInfo();
	Rectangle2D scaledDataArea = getScreenDataArea((int) selection.getCenterX(), (int) selection.getCenterY());
	if ((selection.getHeight() > 0) && (selection.getWidth() > 0)) {

		double hLower = (selection.getMinX() - scaledDataArea.getMinX()) / scaledDataArea.getWidth();
		double hUpper = (selection.getMaxX() - scaledDataArea.getMinX()) / scaledDataArea.getWidth();
		double vLower = (scaledDataArea.getMaxY() - selection.getMaxY()) / scaledDataArea.getHeight();
		double vUpper = (scaledDataArea.getMaxY() - selection.getMinY()) / scaledDataArea.getHeight();

		Plot p = getChart().getPlot();
		if (p instanceof LinkAndBrushPlot) {

			PlotOrientation orientation = null;
			if (p instanceof XYPlot) {
				XYPlot xyPlot = (XYPlot) p;
				orientation = xyPlot.getOrientation();
			}
			if (p instanceof CategoryPlot) {
				CategoryPlot categoryPlot = (CategoryPlot) p;
				orientation = categoryPlot.getOrientation();
			}

			// here we tweak the notify flag on the plot so that only
			// one notification happens even though we update multiple
			// axes...

			boolean savedNotify = p.isNotify();
			p.setNotify(false);
			LinkAndBrushPlot LABPlot = (LinkAndBrushPlot) p;

			List<Pair<Integer, Range>> zoomedDomainAxisRanges = new LinkedList<Pair<Integer, Range>>();
			List<Pair<Integer, Range>> zoomedRangeAxisRanges = new LinkedList<Pair<Integer, Range>>();

			if (orientation == PlotOrientation.HORIZONTAL) {
				zoomedDomainAxisRanges.addAll(LABPlot.calculateDomainAxesZoom(vLower, vUpper,
						zoomOnLinkAndBrushSelection));
				zoomedRangeAxisRanges.addAll(LABPlot.calculateRangeAxesZoom(hLower, hUpper, plotInfo, selectOrigin,
						zoomOnLinkAndBrushSelection));
			} else {
				zoomedDomainAxisRanges.addAll(LABPlot.calculateDomainAxesZoom(hLower, hUpper,
						zoomOnLinkAndBrushSelection));
				zoomedRangeAxisRanges.addAll(LABPlot.calculateRangeAxesZoom(vLower, vUpper, plotInfo, selectOrigin,
						zoomOnLinkAndBrushSelection));
			}
			p.setNotify(savedNotify);

			if (zoomOnLinkAndBrushSelection) {
				informLinkAndBrushSelectionListeners(new LinkAndBrushSelection(SelectionType.ZOOM_IN,
						zoomedDomainAxisRanges, zoomedRangeAxisRanges));
			} else {
				informLinkAndBrushSelectionListeners(new LinkAndBrushSelection(SelectionType.SELECTION,
						zoomedDomainAxisRanges, zoomedRangeAxisRanges));
			}

		} else {
			super.zoom(selection);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:66,代码来源:LinkAndBrushChartPanel.java


注:本文中的org.jfree.chart.plot.Plot.isNotify方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。