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


Java ValueAxis.getUpperBound方法代碼示例

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


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

示例1: shrinkSelectionYAxis

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
private void shrinkSelectionYAxis(double x, double y, Selection selectionObject, ValueAxis axis, int axisIndex,
		double zoomFactor) {
	Rectangle2D scaledDataArea = getScreenDataArea((int) x, (int) y);

	double minY = scaledDataArea.getMinY();
	double maxY = scaledDataArea.getMaxY();
	double partToTop = (y - minY) / (maxY - minY);

	double lowerDomain = axis.getLowerBound();
	double upperDomain = axis.getUpperBound();
	double middlePointTop = lowerDomain + (upperDomain - lowerDomain) * (1d - partToTop);
	double width = (upperDomain - lowerDomain) * zoomFactor;
	Range axisRange = new Range(middlePointTop - width / 2d, middlePointTop + width / 2d);
	for (String axisName : axisNameResolver.resolveYAxis(axisIndex)) {
		selectionObject.addDelimiter(axisName, axisRange);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:18,代碼來源:AbstractChartPanel.java

示例2: shrinkSelectionXAxis

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
private void shrinkSelectionXAxis(double x, double y, Selection selectionObject, ValueAxis axis, int axisIndex,
		double zoomFactor) {
	Rectangle2D scaledDataArea = getScreenDataArea((int) x, (int) y);

	double minX = scaledDataArea.getMinX();
	double maxX = scaledDataArea.getMaxX();
	double partToLeft = (x - minX) / (maxX - minX);

	double lowerDomain = axis.getLowerBound();
	double upperDomain = axis.getUpperBound();
	double middlePointLeft = lowerDomain + (upperDomain - lowerDomain) * partToLeft;
	double width = (upperDomain - lowerDomain) * zoomFactor;
	Range domainRange = new Range(middlePointLeft - width / 2d, middlePointLeft + width / 2d);
	for (String axisName : axisNameResolver.resolveXAxis(axisIndex)) {
		selectionObject.addDelimiter(axisName, domainRange);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:18,代碼來源:AbstractChartPanel.java

示例3: drawDomainTickBands

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {
    // draw the domain tick bands, if any...
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        final ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, end);
        }
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:31,代碼來源:XYPlot.java

示例4: drawRangeTickBands

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {

    // draw the range tick bands, if any...
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        final ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, end);
        }
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:32,代碼來源:XYPlot.java

示例5: selectCompleteDomainBounds

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的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.axis.ValueAxis; //導入方法依賴的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: drawDomainTickBands

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 * 
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    // draw the domain tick bands, if any...
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, 
                    previous, end);
        }
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:36,代碼來源:XYPlot.java

示例8: drawRangeTickBands

import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 * 
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {

    // draw the range tick bands, if any...
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea, 
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea, 
                    previous, end);
        }
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:37,代碼來源:XYPlot.java


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