From: <mu...@us...> - 2007-07-10 09:33:47
|
Revision: 110 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=110&view=rev Author: mungady Date: 2007-07-10 02:33:45 -0700 (Tue, 10 Jul 2007) Log Message: ----------- 2007-07-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/CategoryPlot.java (getRangeAxisIndex): New method. Modified Paths: -------------- trunk/ChangeLog trunk/source/org/jfree/chart/plot/CategoryPlot.java Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-07-10 09:30:17 UTC (rev 109) +++ trunk/ChangeLog 2007-07-10 09:33:45 UTC (rev 110) @@ -1,3 +1,8 @@ +2007-07-10 David Gilbert <dav...@ob...> + + * source/org/jfree/chart/plot/CategoryPlot.java + (getRangeAxisIndex): New method. + 2007-07-06 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/category/BarRenderer.java Modified: trunk/source/org/jfree/chart/plot/CategoryPlot.java =================================================================== --- trunk/source/org/jfree/chart/plot/CategoryPlot.java 2007-07-10 09:30:17 UTC (rev 109) +++ trunk/source/org/jfree/chart/plot/CategoryPlot.java 2007-07-10 09:33:45 UTC (rev 110) @@ -953,6 +953,30 @@ } /** + * Returns the index of the specified axis, or <code>-1</code> if the axis + * is not assigned to the plot. + * + * @param axis the axis. + * + * @return The axis index. + * + * @see #getDomainAxisIndex(CategoryAxis) + * + * @since 1.0.7 + */ + public int getRangeAxisIndex(ValueAxis axis) { + int result = this.rangeAxes.indexOf(axis); + if (result < 0) { // try the parent plot + Plot parent = getParent(); + if (parent instanceof CategoryPlot) { + CategoryPlot p = (CategoryPlot) parent; + result = p.getRangeAxisIndex(axis); + } + } + return result; + } + + /** * Returns the range axis location. * * @return The location (never <code>null</code>). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |