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


Java XYPlot.getDomainAxisCount方法代碼示例

本文整理匯總了Java中org.jfree.chart.plot.XYPlot.getDomainAxisCount方法的典型用法代碼示例。如果您正苦於以下問題:Java XYPlot.getDomainAxisCount方法的具體用法?Java XYPlot.getDomainAxisCount怎麽用?Java XYPlot.getDomainAxisCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.plot.XYPlot的用法示例。


在下文中一共展示了XYPlot.getDomainAxisCount方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: resolveXAxis

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
@Override
public Collection<String> resolveXAxis(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.getDomainAxisCount(); i++) {
			ValueAxis domain = plot.getDomainAxis(i);
			names.add(domain.getLabel());
		}
	}
	return names;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:14,代碼來源:AbstractChartPanel.java

示例2: shrinkSelectionOnDomain

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
 * Decreases the length of the domain axis, centered about the given coordinate on the screen.
 * The length of the domain 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 shrinkSelectionOnDomain(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.getDomainAxisCount(); i++) {
			ValueAxis domain = plot.getDomainAxis(i);
			double zoomFactor = getZoomInFactor();
			shrinkSelectionXAxis(x, y, selectionObject, domain, i, zoomFactor);
		}
		informSelectionListener(selectionObject, selectionEvent);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:24,代碼來源:AbstractChartPanel.java

示例3: enlargeSelectionOnDomain

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
 * Increases the length of the domain axis, centered about the given coordinate on the screen.
 * The length of the domain 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 enlargeSelectionOnDomain(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.getDomainAxisCount(); i++) {
			ValueAxis domain = plot.getDomainAxis(i);
			double zoomFactor = getZoomOutFactor();
			shrinkSelectionXAxis(x, y, selectionObject, domain, i, zoomFactor);
		}
		informSelectionListener(selectionObject, selectionEvent);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:24,代碼來源:AbstractChartPanel.java

示例4: selectCompleteDomainBounds

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


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