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


Java XYPlot.getRangeAxisCount方法代码示例

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


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

示例1: updateYFieldValue

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Updates the preselected y-value.
 */
private void updateYFieldValue() {
	// update preselected y value because range axis has been changed
	if (mousePosition != null) {
		Rectangle2D plotArea = engine.getChartPanel().getScreenDataArea();
		if (engine.getChartPanel().getChart().getPlot() instanceof XYPlot) {
			XYPlot plot = (XYPlot) engine.getChartPanel().getChart().getPlot();

			// calculate y value
			for (int i = 0; i < plot.getRangeAxisCount(); i++) {
				ValueAxis config = plot.getRangeAxis(i);
				if (config != null && config.getLabel() != null) {
					if (config.getLabel().equals(String.valueOf(rangeAxisSelectionCombobox.getSelectedItem()))) {
						double chartY = config.java2DToValue(mousePosition.getY(), plotArea, plot.getRangeAxisEdge());
						yField.setText(String.valueOf(chartY));
					}
				}
			}
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:AddParallelLineDialog.java

示例2: resolveYAxis

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
@Override
public Collection<String> resolveYAxis(int axisIndex) {
	Plot p = chart.getPlot();
	Collection<String> names = new LinkedList<>();
	if (p instanceof XYPlot) {
		XYPlot plot = (XYPlot) p;
		for (int i = 0; i < plot.getRangeAxisCount(); i++) {
			ValueAxis domain = plot.getRangeAxis(i);
			names.add(domain.getLabel());
		}
	}
	return names;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:14,代码来源:AbstractChartPanel.java

示例3: shrinkSelectionOnRange

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Decreases the length of the range axis, centered about the given coordinate on the screen.
 * The length of the range axis is reduced by the value of {@link #getZoomInFactor()}.
 * 
 * @param x
 *            the x-coordinate (in screen coordinates).
 * @param y
 *            the y coordinate (in screen coordinates).
 */

public void shrinkSelectionOnRange(double x, double y, MouseEvent selectionEvent) {
	Plot p = this.chart.getPlot();
	if (p instanceof XYPlot) {
		XYPlot plot = (XYPlot) p;
		Selection selectionObject = new Selection();
		for (int i = 0; i < plot.getRangeAxisCount(); i++) {
			ValueAxis domain = plot.getRangeAxis(i);
			double zoomFactor = getZoomInFactor();
			shrinkSelectionYAxis(x, y, selectionObject, domain, i, zoomFactor);
		}
		informSelectionListener(selectionObject, selectionEvent);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:AbstractChartPanel.java

示例4: enlargeSelectionOnRange

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Increases the length the range axis, centered about the given coordinate on the screen. The
 * length of the range axis is increased by the value of {@link #getZoomOutFactor()}.
 * 
 * @param x
 *            the x coordinate (in screen coordinates).
 * @param y
 *            the y-coordinate (in screen coordinates).
 */

public void enlargeSelectionOnRange(double x, double y, MouseEvent selectionEvent) {
	Plot p = this.chart.getPlot();
	if (p instanceof XYPlot) {
		XYPlot plot = (XYPlot) p;
		Selection selectionObject = new Selection();
		for (int i = 0; i < plot.getRangeAxisCount(); i++) {
			ValueAxis domain = plot.getRangeAxis(i);
			double zoomFactor = getZoomOutFactor();
			shrinkSelectionYAxis(x, y, selectionObject, domain, i, zoomFactor);
		}
		informSelectionListener(selectionObject, selectionEvent);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:AbstractChartPanel.java

示例5: selectCompleteRangeBounds

import org.jfree.chart.plot.XYPlot; //导入方法依赖的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


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