Examples of Plot


Examples of org.jfree.chart.plot.Plot

         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)
         {
            // 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);
            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);
            }
            p.setNotify(savedNotify);
         }

      }

   }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

   /**
    * Restores the auto-range calculation on both axes.
    */
   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);
      restoreAutoDomainBounds();
      restoreAutoRangeBounds();
      plot.setNotify(savedNotify);
   }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

   /**
    * Restores the auto-range calculation on the domain axis.
    */
   public void restoreAutoDomainBounds()
   {
      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);
      }
   }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

   /**
    * Restores the auto-range calculation on the range axis.
    */
   public void restoreAutoRangeBounds()
   {
      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);
      }
   }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

      // go through each zoom menu item and decide whether or not to
      // enable it...
      boolean isDomainZoomable = false;
      boolean isRangeZoomable = false;
      Plot plot = (this.chart != null ? this.chart.getPlot() : null);
      if (plot instanceof Zoomable)
      {
         Zoomable z = (Zoomable) plot;
         isDomainZoomable = z.isDomainZoomable();
         isRangeZoomable = z.isRangeZoomable();
View Full Code Here

Examples of org.jfree.chart.plot.Plot

    public void mouseWheelMoved(MouseWheelEvent e) {
        JFreeChart chart = this.chartPanel.getChart();
        if (chart == null) {
            return;
        }
        Plot plot = chart.getPlot();
        if (plot instanceof Zoomable) {
            Zoomable zoomable = (Zoomable) plot;
            handleZoomable(zoomable, e);
        }
        else if (plot instanceof PiePlot) {
View Full Code Here

Examples of org.jfree.chart.plot.Plot

        Point2D p = this.chartPanel.translateScreenToJava2D(e.getPoint());
        if (!pinfo.getDataArea().contains(p)) {
            return;
        }

        Plot plot = (Plot) zoomable;
        // do not notify while zooming each axis
        boolean notifyState = plot.isNotify();
        plot.setNotify(false);
        int clicks = e.getWheelRotation();
        double zf = 1.0 + this.zoomFactor;
        if (clicks < 0) {
            zf = 1.0 / zf;
        }
        if (chartPanel.isDomainZoomable()) {
            zoomable.zoomDomainAxes(zf, pinfo, p, true);
        }
        if (chartPanel.isRangeZoomable()) {
            zoomable.zoomRangeAxes(zf, pinfo, p, true);
        }
        plot.setNotify(notifyState)// this generates the change event too
    }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

        }

        // calculate the adjusted data area taking into account the 3D effect...
        double xOffset = 0.0;
        double yOffset = 0.0;
        Plot plot = getPlot();
        if (plot instanceof CategoryPlot) {
            CategoryPlot cp = (CategoryPlot) plot;
            CategoryItemRenderer r = cp.getRenderer();
            if (r instanceof Effect3D) {
                Effect3D e3D = (Effect3D) r;
View Full Code Here

Examples of org.jfree.chart.plot.Plot

    /**
     * Rescales the axis to ensure that all data is visible.
     */
    protected void autoAdjustRange() {

        Plot plot = getPlot();
        if (plot == null) {
            return// no plot, no data
        }

        if (plot instanceof ValueAxisPlot) {
View Full Code Here

Examples of org.jfree.chart.plot.Plot

     * Adjusts the axis range to match the data range that the axis is
     * required to display.
     */
   @Override
    protected void autoAdjustRange() {
        Plot plot = getPlot();
        if (plot == null) {
            return// no plot, no data
        }

        if (plot instanceof ValueAxisPlot) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.