Java Code Examples for org.jfree.chart.axis.ValueAxis#zoomRange()

The following examples show how to use org.jfree.chart.axis.ValueAxis#zoomRange() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LinkAndBrushXYPlot.java    From rapidminer-studio with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public List<Pair<Integer, Range>> calculateRangeAxesZoom(double lowerPercent, double upperPercent,
		PlotRenderingInfo info, Point2D source, boolean zoomIn) {

	List<Pair<Integer, Range>> newRanges = new LinkedList<Pair<Integer, Range>>();

	for (int i = 0; i < getRangeAxisCount(); i++) {
		ValueAxis rangeAxis = getRangeAxis(i);
		if (rangeAxis != null) {
			if (rangeAxis instanceof LinkAndBrushAxis) {
				Range calculateZoomRange = ((LinkAndBrushAxis) rangeAxis).calculateZoomRange(lowerPercent, upperPercent,
						zoomIn);
				newRanges.add(new Pair<Integer, Range>(i, calculateZoomRange));
			} else if (zoomIn) {
				rangeAxis.zoomRange(lowerPercent, upperPercent);
			}
		}
	}

	return newRanges;
}
 
Example 2
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 3
Source File: jMutRepair_0030_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 4
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 5
Source File: Chart_14_CategoryPlot_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 6
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 7
Source File: jMutRepair_0021_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 8
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 9
Source File: Chart_19_CategoryPlot_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 10
Source File: Cardumen_006_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Zooms in on the range axes.
 * 
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param state  the plot state.
 * @param source  the source point (in Java2D space) for the zoom.
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent, 
                          PlotRenderingInfo state, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 11
Source File: XYPlot.java    From ECG-Viewer with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 12
Source File: 1_XYPlot.java    From SimFix with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 * 
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 13
Source File: 1_XYPlot.java    From SimFix with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 * 
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 14
Source File: XYPlot.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Zooms in on the domain axis/axes.  The new lower and upper bounds are
 * specified as percentages of the current axis range, where 0 percent is
 * the current lower bound and 100 percent is the current upper bound.
 *
 * @param lowerPercent  a percentage that determines the new lower bound
 *                      for the axis (e.g. 0.20 is twenty percent).
 * @param upperPercent  a percentage that determines the new upper bound
 *                      for the axis (e.g. 0.80 is eighty percent).
 * @param info  the plot rendering info.
 * @param source  the source point (ignored).
 *
 * @see #zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomDomainAxes(double lowerPercent, double upperPercent,
                           PlotRenderingInfo info, Point2D source) {
    for (ValueAxis xAxis : this.domainAxes.values()) {
        if (xAxis != null) {
            xAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 15
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 16
Source File: Cardumen_0082_t.java    From coming with MIT License 3 votes vote down vote up
/**
 * Zooms in on the domain axis/axes.  The new lower and upper bounds are
 * specified as percentages of the current axis range, where 0 percent is
 * the current lower bound and 100 percent is the current upper bound.
 *
 * @param lowerPercent  a percentage that determines the new lower bound
 *                      for the axis (e.g. 0.20 is twenty percent).
 * @param upperPercent  a percentage that determines the new upper bound
 *                      for the axis (e.g. 0.80 is eighty percent).
 * @param info  the plot rendering info.
 * @param source  the source point (ignored).
 *
 * @see #zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
 */
public void zoomDomainAxes(double lowerPercent, double upperPercent,
                           PlotRenderingInfo info, Point2D source) {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        ValueAxis domainAxis = (ValueAxis) this.domainAxes.get(i);
        if (domainAxis != null) {
            domainAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 17
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 18
Source File: Cardumen_0082_t.java    From coming with MIT License 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
        if (rangeAxis != null) {
            rangeAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 19
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}
 
Example 20
Source File: XYPlot.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Zooms in on the range axes.
 *
 * @param lowerPercent  the lower bound.
 * @param upperPercent  the upper bound.
 * @param info  the plot rendering info.
 * @param source  the source point.
 *
 * @see #zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
 */
@Override
public void zoomRangeAxes(double lowerPercent, double upperPercent,
                          PlotRenderingInfo info, Point2D source) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.zoomRange(lowerPercent, upperPercent);
        }
    }
}