From: David G. <mu...@us...> - 2005-12-12 14:11:46
|
Update of /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20728/source/org/jfree/chart/plot Modified Files: MeterPlot.java MultiplePiePlot.java PiePlot.java SpiderWebPlot.java Log Message: 2005-12-12 David Gilbert <dav...@ob...> * source/org/jfree/chart/LegendItem.java: (LegendItem(String, AttributedString, String, String, String, Shape, Paint)): Removed AttributedString argument, (LegendItem(String, AttributedString, String, String, String, Shape, Paint, Stroke, Paint)): Likewise, (LegendItem(String, AttributedString, String, String, String, Shape, Stroke, Paint)): Likewise, (LegendItem(String, AttributedString, String, String, String, boolean, Shape, boolean, Paint, boolean, Paint, Stroke, boolean, Shape, Stroke, Paint)): Likewise, (LegendItem(AttributedString, String, String, String, Shape, Paint)): New constructor, (LegendItem(AttributedString, String, String, String, Shape, Paint, Stroke, Paint)): Likewise, (LegendItem(AttributedString, String, String, String, Shape, Stroke, Paint)): Likewise, (LegendItem(AttributedString, String, String, String, boolean, Shape, boolean, Paint, boolean, Paint, Stroke, boolean, Shape, Stroke, Paint)): Likewise, (characterIteratorToString): New method, * source/org/jfree/chart/junit/LegendItemCollectionTests.java (testEquals): Updated for change to LegendItem constructor, (testSerialization): Likewise, (testCloning): Likewise, * source/org/jfree/chart/junit/LegendItemTests.java (testEquals): Updated for change to LegendItem constructor, (testSerialization): Likewise, (testCloning): Likewise, * source/org/jfree/chart/plot/MeterPlot.java (getLegendItems): Update for change to LegendItem constructor, * source/org/jfree/chart/plot/MultiplePiePlot.java (getLegendItems): Likewise, * source/org/jfree/chart/plot/PiePlot.java (drawItem): Use sectionOutlinesVisible flag, fix potential NullPointerException for entities, (getLegendItems): Update for change to LegendItem constructor, * source/org/jfree/chart/plot/SpiderWebPlot.java (getLegendItems): Likewise, * source/org/jfree/chart/renderer/DefaultPolarItemRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/WaferMapRenderer.java (getLegendCollection): Likewise, * source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/category/AreaRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/category/BarRenderer.java (getLegendItem): Likewise, plus reformatting, * source/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/category/LineAndShapeRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/StandardXYItemRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYAreaRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYAreaRenderer2.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYBarRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYBubbleRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java (getLegendItem): Likewise, * source/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java (getLegendItem): Likewise. ---------------------------------------------------------------------- Index: MultiplePiePlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/MultiplePiePlot.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MultiplePiePlot.java 19 Jul 2005 14:23:56 -0000 1.15 --- MultiplePiePlot.java 12 Dec 2005 14:11:31 -0000 1.16 *************** *** 17,23 **** * License for more details. * ! * You should have received a copy of the GNU Lesser General Public License ! * along with this library; if not, write to the Free Software Foundation, ! * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. --- 17,24 ---- * License for more details. * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ! * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. *************** *** 406,410 **** Stroke outlineStroke = plot.getSectionOutlineStroke(section); ! LegendItem item = new LegendItem(label, null, description, null, null, Plot.DEFAULT_LEGEND_ITEM_CIRCLE, paint, outlineStroke, outlinePaint); --- 407,411 ---- Stroke outlineStroke = plot.getSectionOutlineStroke(section); ! LegendItem item = new LegendItem(label, description, null, null, Plot.DEFAULT_LEGEND_ITEM_CIRCLE, paint, outlineStroke, outlinePaint); Index: MeterPlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/MeterPlot.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MeterPlot.java 10 Nov 2005 11:51:07 -0000 1.17 --- MeterPlot.java 12 Dec 2005 14:11:31 -0000 1.18 *************** *** 681,685 **** color = mi.getOutlinePaint(); } ! LegendItem item = new LegendItem(mi.getLabel(), null, mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), color); --- 681,685 ---- color = mi.getOutlinePaint(); } ! LegendItem item = new LegendItem(mi.getLabel(), mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), color); Index: SpiderWebPlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/SpiderWebPlot.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SpiderWebPlot.java 19 Jul 2005 14:23:54 -0000 1.14 --- SpiderWebPlot.java 12 Dec 2005 14:11:31 -0000 1.15 *************** *** 17,23 **** * License for more details. * ! * You should have received a copy of the GNU Lesser General Public License ! * along with this library; if not, write to the Free Software Foundation, ! * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. --- 17,24 ---- * License for more details. * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ! * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. *************** *** 876,880 **** Paint outlinePaint = getSeriesOutlinePaint(series); Stroke stroke = getSeriesOutlineStroke(series); ! LegendItem item = new LegendItem(label, null, description, null, null, shape, paint, stroke, outlinePaint); result.add(item); --- 877,881 ---- Paint outlinePaint = getSeriesOutlinePaint(series); Stroke stroke = getSeriesOutlineStroke(series); ! LegendItem item = new LegendItem(label, description, null, null, shape, paint, stroke, outlinePaint); result.add(item); Index: PiePlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/PiePlot.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** PiePlot.java 27 Oct 2005 15:56:58 -0000 1.23 --- PiePlot.java 12 Dec 2005 14:11:31 -0000 1.24 *************** *** 17,23 **** * License for more details. * ! * You should have received a copy of the GNU Lesser General Public License ! * along with this library; if not, write to the Free Software Foundation, ! * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. --- 17,24 ---- * License for more details. * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ! * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. *************** *** 1751,1755 **** Paint outlinePaint = getSectionOutlinePaint(section); Stroke outlineStroke = getSectionOutlineStroke(section); ! if (outlinePaint != null && outlineStroke != null) { g2.setPaint(outlinePaint); g2.setStroke(outlineStroke); --- 1752,1756 ---- Paint outlinePaint = getSectionOutlinePaint(section); Stroke outlineStroke = getSectionOutlineStroke(section); ! if (this.sectionOutlinesVisible) { g2.setPaint(outlinePaint); g2.setStroke(outlineStroke); *************** *** 1760,1765 **** // add an entity for the pie section if (state.getInfo() != null) { ! EntityCollection entities ! = state.getInfo().getOwner().getEntityCollection(); if (entities != null) { Comparable key = this.dataset.getKey(section); --- 1761,1765 ---- // add an entity for the pie section if (state.getInfo() != null) { ! EntityCollection entities = state.getEntityCollection(); if (entities != null) { Comparable key = this.dataset.getKey(section); *************** *** 1996,2009 **** } if (include) { ! String label = this.legendLabelGenerator.generateSectionLabel( ! this.dataset, key); AttributedString attributedLabel ! = this.legendLabelGenerator.generateAttributedSectionLabel( ! this.dataset, key); String description = label; String toolTipText = null; ! if (this.legendLabelToolTipGenerator != null) { ! toolTipText = this.legendLabelToolTipGenerator ! .generateSectionLabel(this.dataset, key); } String urlText = null; --- 1996,2008 ---- } if (include) { ! PieSectionLabelGenerator llg = getLegendLabelGenerator(); ! String label = llg.generateSectionLabel(this.dataset, key); AttributedString attributedLabel ! = llg.generateAttributedSectionLabel(this.dataset, key); String description = label; String toolTipText = null; ! PieSectionLabelGenerator ttg = getLegendLabelToolTipGenerator(); ! if (ttg != null) { ! toolTipText = ttg.generateSectionLabel(this.dataset, key); } String urlText = null; *************** *** 2011,2021 **** Paint outlinePaint = getSectionOutlinePaint(section); Stroke outlineStroke = getSectionOutlineStroke(section); ! LegendItem item = new LegendItem(label, attributedLabel, ! description, toolTipText, urlText, true, shape, ! true, paint, ! true, outlinePaint, outlineStroke, ! false, // line not visible ! new Line2D.Float(), ! new BasicStroke(), Color.black); result.add(item); --- 2010,2026 ---- Paint outlinePaint = getSectionOutlinePaint(section); Stroke outlineStroke = getSectionOutlineStroke(section); ! LegendItem item = null; ! if (attributedLabel != null) { ! item = new LegendItem(attributedLabel, description, ! toolTipText, urlText, true, shape, true, paint, ! true, outlinePaint, outlineStroke, false, ! new Line2D.Float(), new BasicStroke(), Color.black); ! } ! else { ! item = new LegendItem(label, description, toolTipText, ! urlText, true, shape, true, paint, true, ! outlinePaint, outlineStroke, false, ! new Line2D.Float(), new BasicStroke(), Color.black); ! } result.add(item); |