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


Java Zoomable.getOrientation方法代码示例

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


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

示例1: setChart

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Sets the chart that is displayed in the panel.
 * 
 * @param chart
 *            the chart (<code>null</code> permitted).
 */

@Override
public void setChart(JFreeChart chart) {

	// stop listening for changes to the existing chart
	if (this.chart != null) {
		this.chart.removeChangeListener(this);
		this.chart.removeProgressListener(this);
	}

	// add the new chart
	this.chart = chart;
	if (chart != null) {
		this.chart.addChangeListener(this);
		this.chart.addProgressListener(this);
		Plot plot = chart.getPlot();
		this.domainZoomable = false;
		this.rangeZoomable = false;
		if (plot instanceof Zoomable) {
			Zoomable z = (Zoomable) plot;
			this.domainZoomable = z.isDomainZoomable();
			this.rangeZoomable = z.isRangeZoomable();
			this.orientation = z.getOrientation();
		}
	} else {
		this.domainZoomable = false;
		this.rangeZoomable = false;
	}

	repaint();

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:39,代码来源:AbstractChartPanel.java

示例2: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 * 
 * @param event
 *            details of the chart change event.
 */

@Override
public void chartChanged(ChartChangeEvent event) {
	Plot plot = this.chart.getPlot();
	if (plot instanceof Zoomable) {
		Zoomable z = (Zoomable) plot;
		this.orientation = z.getOrientation();
	}
	repaint();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:AbstractChartPanel.java

示例3: setChart

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Sets the chart that is displayed in the panel.
 *
 * @param chart  the chart (<code>null</code> permitted).
 */
public void setChart(JFreeChart chart) {
    // stop listening for changes to the existing chart
    if (this.chart != null) {
        this.chart.removeChangeListener(this);
        this.chart.removeProgressListener(this);
    }

    // add the new chart
    this.chart = chart;
    if (chart != null) {
        this.chart.addChangeListener(this);
        this.chart.addProgressListener(this);
        Plot plot = chart.getPlot();
        this.domainZoomable = false;
        this.rangeZoomable = false;
        if (plot instanceof Zoomable) {
            Zoomable z = (Zoomable) plot;
            this.domainZoomable = z.isDomainZoomable();
            this.rangeZoomable = z.isRangeZoomable();
            this.orientation = z.getOrientation();
        }
    }
    else {
        this.domainZoomable = false;
        this.rangeZoomable = false;
    }
    if (this.useBuffer) {
        this.refreshBuffer = true;
    }
    redraw();
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:37,代码来源:ChartComposite.java

示例4: zoom

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Zooms in on a selected region.
 *
 * @param selection  the selected region.
 */
public void zoom(Rectangle 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(selection.x, selection.y));
    PlotRenderingInfo plotInfo = this.info.getPlotInfo();
    Rectangle scaledDataArea = getScreenDataArea(
            (int) (selection.x + selection.width)/2, 
            (int) (selection.y + selection.height)/2);
    if ((selection.height > 0) && (selection.width > 0)) {

        double hLower = (selection.x - scaledDataArea.x) 
            / (double) scaledDataArea.width;
        double hUpper = (selection.x + selection.width - scaledDataArea.x) 
            / (double) scaledDataArea.width;
        double vLower = (scaledDataArea.y + scaledDataArea.height - selection.y - selection.height) 
            / (double) scaledDataArea.height;
        double vUpper = (scaledDataArea.y + scaledDataArea.height - selection.y) 
            / (double) scaledDataArea.height;
        Plot p = this.chart.getPlot();
        if (p instanceof Zoomable) {
            Zoomable z = (Zoomable) p;
            if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
                z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
            }
            else {
                z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
            }
        }

    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:42,代码来源:ChartComposite.java

示例5: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) 
    {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    this.redraw();
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:ChartComposite.java

示例6: setChart

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Sets the chart that is displayed in the panel.
 *
 * @param chart  the chart (<code>null</code> permitted).
 */
public void setChart(JFreeChart chart) {

    // stop listening for changes to the existing chart
    if (this.chart != null) {
        this.chart.removeChangeListener(this);
        this.chart.removeProgressListener(this);
    }

    // add the new chart
    this.chart = chart;
    if (chart != null) {
        this.chart.addChangeListener(this);
        this.chart.addProgressListener(this);
        Plot plot = chart.getPlot();
        this.domainZoomable = false;
        this.rangeZoomable = false;
        if (plot instanceof Zoomable) {
            Zoomable z = (Zoomable) plot;
            this.domainZoomable = z.isDomainZoomable();
            this.rangeZoomable = z.isRangeZoomable();
            this.orientation = z.getOrientation();
        }
    }
    else {
        this.domainZoomable = false;
        this.rangeZoomable = false;
    }
    if (this.useBuffer) {
        this.refreshBuffer = true;
    }
    repaint();

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:39,代码来源:ChartPanel.java

示例7: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:ChartPanel.java

示例8: zoom

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Zooms in on a selected region.
 *
 * @param selection  the selected region.
 */
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 = this.info.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 = this.chart.getPlot();
        if (p instanceof Zoomable) {
            Zoomable z = (Zoomable) p;
            if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
                z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
            }
            else {
                z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
            }
        }

    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:43,代码来源:ChartPanel.java

示例9: setChart

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Sets the chart that is displayed in the panel.
 *
 * @param chart  the chart (<code>null</code> permitted).
 */
public void setChart(JFreeChart chart) {
    // stop listening for changes to the existing chart
    if (this.chart != null) {
        this.chart.removeChangeListener(this);
        this.chart.removeProgressListener(this);
    }

    // add the new chart
    this.chart = chart;
    if (chart != null) {
        this.chart.addChangeListener(this);
        this.chart.addProgressListener(this);
        Plot plot = chart.getPlot();
        this.domainZoomable = false;
        this.rangeZoomable = false;
        if (plot instanceof Zoomable) {
            Zoomable z = (Zoomable) plot;
            this.domainZoomable = z.isDomainZoomable();
            this.rangeZoomable = z.isRangeZoomable();
            this.orientation = z.getOrientation();
        }
    }
    else {
        this.domainZoomable = false;
        this.rangeZoomable = false;
    }
    if (this.useBuffer) {
        this.refreshBuffer = true;
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:36,代码来源:ChartComposite.java

示例10: zoom

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Zooms in on a selected region.
 *
 * @param selection  the selected region.
 */
public void zoom(Rectangle 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(selection.x, selection.y));
    PlotRenderingInfo plotInfo = this.info.getPlotInfo();
    Rectangle scaledDataArea = getScreenDataArea(
            (selection.x + selection.width / 2),
            (selection.y + selection.height / 2));
    if ((selection.height > 0) && (selection.width > 0)) {

        double hLower = (selection.x - scaledDataArea.x)
            / (double) scaledDataArea.width;
        double hUpper = (selection.x + selection.width - scaledDataArea.x)
            / (double) scaledDataArea.width;
        double vLower = (scaledDataArea.y + scaledDataArea.height
                - selection.y - selection.height)
                / (double) scaledDataArea.height;
        double vUpper = (scaledDataArea.y + scaledDataArea.height
                - selection.y) / (double) scaledDataArea.height;
        Plot p = this.chart.getPlot();
        if (p instanceof Zoomable) {
            Zoomable z = (Zoomable) p;
            if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
                z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
            }
            else {
                z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
            }
        }

    }

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:43,代码来源:ChartComposite.java

示例11: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    this.canvas.redraw();
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:15,代码来源:ChartComposite.java

示例12: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:16,代码来源:ChartPanel.java

示例13: setChart

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Sets the chart that is displayed in the panel.
 *
 * @param chart  the chart ({@code null} permitted).
 */
public void setChart(JFreeChart chart) {

    // stop listening for changes to the existing chart
    if (this.chart != null) {
        this.chart.removeChangeListener(this);
        this.chart.removeProgressListener(this);
    }

    // add the new chart
    this.chart = chart;
    if (chart != null) {
        this.chart.addChangeListener(this);
        this.chart.addProgressListener(this);
        Plot plot = chart.getPlot();
        this.domainZoomable = false;
        this.rangeZoomable = false;
        if (plot instanceof Zoomable) {
            Zoomable z = (Zoomable) plot;
            this.domainZoomable = z.isDomainZoomable();
            this.rangeZoomable = z.isRangeZoomable();
            this.orientation = z.getOrientation();
        }
    }
    else {
        this.domainZoomable = false;
        this.rangeZoomable = false;
    }
    if (this.useBuffer) {
        this.refreshBuffer = true;
    }
    repaint();

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:39,代码来源:ChartPanel.java

示例14: zoom

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Zooms in on a selected region.
 *
 * @param selection  the selected region.
 */
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 = this.info.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 = this.chart.getPlot();
        if (p instanceof Zoomable) {
            Zoomable z = (Zoomable) p;
            if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
                z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
            }
            else {
                z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
                z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
            }
        }

    }

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:43,代码来源:ChartPanel.java

示例15: chartChanged

import org.jfree.chart.plot.Zoomable; //导入方法依赖的package包/类
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
开发者ID:opensim-org,项目名称:opensim-gui,代码行数:15,代码来源:ChartPanel.java


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