From: <mu...@us...> - 2012-09-23 09:31:23
|
Revision: 2510 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=2510&view=rev Author: mungady Date: 2012-09-23 09:31:13 +0000 (Sun, 23 Sep 2012) Log Message: ----------- Fix some minor FindBugs warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CategoryPlot.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/XYPlot.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CategoryPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CategoryPlot.java 2012-09-23 09:26:21 UTC (rev 2509) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CategoryPlot.java 2012-09-23 09:31:13 UTC (rev 2510) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2011, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2012, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * - * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners.] * * ----------------- @@ -257,7 +257,7 @@ * renders each data item using a {@link CategoryItemRenderer}. */ public class CategoryPlot extends Plot implements ValueAxisPlot, Pannable, - Zoomable, AnnotationChangeListener, RendererChangeListener, + Zoomable, AnnotationChangeListener, RendererChangeListener, Cloneable, PublicCloneable, Serializable { /** For serialization. */ @@ -539,7 +539,7 @@ private LegendItemCollection fixedLegendItems; /** - * A flag that controls whether or not panning is enabled for the + * A flag that controls whether or not panning is enabled for the * range axis/axes. * * @since 1.0.13 @@ -548,7 +548,7 @@ /** * The shadow generator for the plot (<code>null</code> permitted). - * + * * @since 1.0.14 */ private ShadowGenerator shadowGenerator; @@ -658,7 +658,7 @@ this.rangeCrosshairPaint = DEFAULT_CROSSHAIR_PAINT; this.annotations = new java.util.ArrayList(); - + this.rangePannable = false; this.shadowGenerator = null; } @@ -1245,12 +1245,7 @@ */ public RectangleEdge getRangeAxisEdge(int index) { AxisLocation location = getRangeAxisLocation(index); - RectangleEdge result = Plot.resolveRangeAxisLocation(location, - this.orientation); - if (result == null) { - result = RectangleEdge.opposite(getRangeAxisEdge(0)); - } - return result; + return Plot.resolveRangeAxisLocation(location, this.orientation); } /** @@ -3379,7 +3374,7 @@ */ public void clearAnnotations() { for(int i = 0; i < this.annotations.size(); i++) { - CategoryAnnotation annotation + CategoryAnnotation annotation = (CategoryAnnotation) this.annotations.get(i); annotation.removeChangeListener(this); } @@ -3710,9 +3705,9 @@ BufferedImage shadowImage = this.shadowGenerator.createDropShadow( dataImage); g2 = savedG2; - g2.drawImage(shadowImage, (int) dataArea.getX() + g2.drawImage(shadowImage, (int) dataArea.getX() + this.shadowGenerator.calculateOffsetX(), - (int) dataArea.getY() + (int) dataArea.getY() + this.shadowGenerator.calculateOffsetY(), null); g2.drawImage(dataImage, (int) dataArea.getX(), (int) dataArea.getY(), null); @@ -4590,7 +4585,7 @@ * * @param pannable the new flag value. * - * @see #isRangePannable() + * @see #isRangePannable() * * @since 1.0.13 */ Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/XYPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/XYPlot.java 2012-09-23 09:26:21 UTC (rev 2509) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/XYPlot.java 2012-09-23 09:31:13 UTC (rev 2510) @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * - * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners.] * * ----------- @@ -595,11 +595,11 @@ /** * The shadow generator (<code>null</code> permitted). - * + * * @since 1.0.14 */ private ShadowGenerator shadowGenerator; - + /** * Creates a new <code>XYPlot</code> instance with no dataset, no axes and * no renderer. You should specify these items before using the plot. @@ -1055,12 +1055,7 @@ */ public RectangleEdge getDomainAxisEdge(int index) { AxisLocation location = getDomainAxisLocation(index); - RectangleEdge result = Plot.resolveDomainAxisLocation(location, - this.orientation); - if (result == null) { - result = RectangleEdge.opposite(getDomainAxisEdge()); - } - return result; + return Plot.resolveDomainAxisLocation(location, this.orientation); } /** @@ -1355,12 +1350,7 @@ */ public RectangleEdge getRangeAxisEdge(int index) { AxisLocation location = getRangeAxisLocation(index); - RectangleEdge result = Plot.resolveRangeAxisLocation(location, - this.orientation); - if (result == null) { - result = RectangleEdge.opposite(getRangeAxisEdge()); - } - return result; + return Plot.resolveRangeAxisLocation(location, this.orientation); } /** @@ -2135,7 +2125,7 @@ } /** - * Returns the paint for the minor grid lines (if any) plotted against the + * Returns the paint for the minor grid lines (if any) plotted against the * range axis. * * @return The paint (never <code>null</code>). @@ -3465,9 +3455,9 @@ BufferedImage shadowImage = this.shadowGenerator.createDropShadow(dataImage); g2 = savedG2; - g2.drawImage(shadowImage, (int) dataArea.getX() + g2.drawImage(shadowImage, (int) dataArea.getX() + this.shadowGenerator.calculateOffsetX(), - (int) dataArea.getY() + (int) dataArea.getY() + this.shadowGenerator.calculateOffsetY(), null); g2.drawImage(dataImage, (int) dataArea.getX(), (int) dataArea.getY(), null); @@ -3944,13 +3934,13 @@ while (iterator.hasNext()) { paintLine = false; ValueTick tick = (ValueTick) iterator.next(); - if ((tick.getTickType() == TickType.MINOR) + if ((tick.getTickType() == TickType.MINOR) && isDomainMinorGridlinesVisible()) { gridStroke = getDomainMinorGridlineStroke(); gridPaint = getDomainMinorGridlinePaint(); paintLine = true; } - else if ((tick.getTickType() == TickType.MAJOR) + else if ((tick.getTickType() == TickType.MAJOR) && isDomainGridlinesVisible()) { gridStroke = getDomainGridlineStroke(); gridPaint = getDomainGridlinePaint(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |