From: <mu...@us...> - 2007-06-19 14:11:06
|
Revision: 9 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=9&view=rev Author: mungady Date: 2007-06-19 07:11:04 -0700 (Tue, 19 Jun 2007) Log Message: ----------- 2007-06-19 David Gilbert <dav...@ob...> * source/org/jfree/chart/entity/CategoryItemEntity.java (series): Removed, previously deprecated, (category): Likewise, (categoryIndex): Likewise, (CategoryItemEntity()): Likewise, (getSeries): Likewise, (setSeries): Likewise, (getCategory): Likewise, (setCategory): Likewise, (getCategoryIndex): Likewise, (setCategoryIndex): Likewise, * source/org/jfree/chart/entity/junit/CategoryItemEntityTests.java (testEquals): Updated for removed methods. Modified Paths: -------------- trunk/ChangeLog trunk/source/org/jfree/chart/entity/CategoryItemEntity.java trunk/tests/org/jfree/chart/entity/junit/CategoryItemEntityTests.java Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-06-19 14:02:02 UTC (rev 8) +++ trunk/ChangeLog 2007-06-19 14:11:04 UTC (rev 9) @@ -1,5 +1,21 @@ 2007-06-19 David Gilbert <dav...@ob...> + * source/org/jfree/chart/entity/CategoryItemEntity.java + (series): Removed, previously deprecated, + (category): Likewise, + (categoryIndex): Likewise, + (CategoryItemEntity()): Likewise, + (getSeries): Likewise, + (setSeries): Likewise, + (getCategory): Likewise, + (setCategory): Likewise, + (getCategoryIndex): Likewise, + (setCategoryIndex): Likewise, + * source/org/jfree/chart/entity/junit/CategoryItemEntityTests.java + (testEquals): Updated for removed methods. + +2007-06-19 David Gilbert <dav...@ob...> + * source/org/jfree/chart/ClipPath.java: Removed, * source/org/jfree/chart/DrawableLegendItem.java: Likewise. Modified: trunk/source/org/jfree/chart/entity/CategoryItemEntity.java =================================================================== --- trunk/source/org/jfree/chart/entity/CategoryItemEntity.java 2007-06-19 14:02:02 UTC (rev 8) +++ trunk/source/org/jfree/chart/entity/CategoryItemEntity.java 2007-06-19 14:11:04 UTC (rev 9) @@ -49,6 +49,7 @@ * 11-Jan-2005 : Removed deprecated code in preparation for 1.0.0 release (DG); * ------------- JFREECHART 1.0.x --------------------------------------------- * 18-May-2007 : Updated to use row and column keys to identify item (DG); + * 19-Jun-2007 : Removed deprecated code (DG); * */ @@ -71,31 +72,7 @@ /** The dataset. */ private CategoryDataset dataset; - - /** - * The series (zero-based index). - * - * @deprecated As of 1.0.6, this field is redundant as you can derive the - * index from the <code>rowKey</code> field. - */ - private int series; - - /** - * The category. - * - * @deprecated As of 1.0.6, this field is deprecated in favour of the - * <code>columnKey</code> field. - */ - private Object category; - /** - * The category index. - * - * @deprecated As of 1.0.6, this field is redundant as you can derive the - * index from the <code>columnKey</code> field. - */ - private int categoryIndex; - /** * The row key. * @@ -109,36 +86,6 @@ * @since 1.0.6 */ private Comparable columnKey; - - /** - * Creates a new category item entity. - * - * @param area the area (<code>null</code> not permitted). - * @param toolTipText the tool tip text. - * @param urlText the URL text for HTML image maps. - * @param dataset the dataset. - * @param series the series (zero-based index). - * @param category the category. - * @param categoryIndex the category index. - * - * @deprecated As of 1.0.6, use {@link #CategoryItemEntity(Shape, String, - * String, CategoryDataset, Comparable, Comparable)}. - */ - public CategoryItemEntity(Shape area, String toolTipText, String urlText, - CategoryDataset dataset, - int series, Object category, int categoryIndex) { - - super(area, toolTipText, urlText); - if (dataset == null) { - throw new IllegalArgumentException("Null 'dataset' argument."); - } - this.dataset = dataset; - this.series = series; - this.category = category; - this.categoryIndex = categoryIndex; - this.rowKey = dataset.getRowKey(series); - this.columnKey = dataset.getColumnKey(categoryIndex); - } /** * Creates a new entity instance for an item in the specified dataset. @@ -161,11 +108,6 @@ this.dataset = dataset; this.rowKey = rowKey; this.columnKey = columnKey; - - // populate the deprecated fields - this.series = dataset.getRowIndex(rowKey); - this.category = columnKey; - this.categoryIndex = dataset.getColumnIndex(columnKey); } /** @@ -219,8 +161,6 @@ */ public void setRowKey(Comparable rowKey) { this.rowKey = rowKey; - // update the deprecated field - this.series = this.dataset.getRowIndex(rowKey); } /** @@ -247,96 +187,9 @@ */ public void setColumnKey(Comparable columnKey) { this.columnKey = columnKey; - // update the deprecated fields - this.category = columnKey; - this.categoryIndex = this.dataset.getColumnIndex(columnKey); } /** - * Returns the series index. - * - * @return The series index. - * - * @see #setSeries(int) - * - * @deprecated As of 1.0.6, you can derive this information from the - * {@link #getRowKey()} method. - */ - public int getSeries() { - return this.series; - } - - /** - * Sets the series index. - * - * @param series the series index (zero-based). - * - * @see #getSeries() - * - * @deprecated As of 1.0.6, you should use {@link #setRowKey(Comparable)} - * to designate the series. - */ - public void setSeries(int series) { - this.series = series; - } - - /** - * Returns the category. - * - * @return The category (possibly <code>null</code>). - * - * @see #setCategory(Object) - * - * @deprecated The return type for this method should be - * <code>Comparable</code>, so it has been deprecated as of - * version 1.0.6 and replaced by {@link #getColumnKey()}. - */ - public Object getCategory() { - return this.category; - } - - /** - * Sets the category. - * - * @param category the category (<code>null</code> permitted). - * - * @see #getCategory() - * - * @deprecated As of version 1.0.6, use {@link #setColumnKey(Comparable)}. - */ - public void setCategory(Object category) { - this.category = category; - } - - /** - * Returns the category index. - * - * @return The index. - * - * @see #setCategoryIndex(int) - * - * @deprecated As of 1.0.6, you can derive this information from the - * {@link #getColumnKey()} method. - */ - public int getCategoryIndex() { - return this.categoryIndex; - } - - /** - * Sets the category index. - * - * @param index the category index. - * - * @see #getCategoryIndex() - * - * @deprecated As of 1.0.6, use {@link #setColumnKey(Comparable)} to - * designate the category. - */ - public void setCategoryIndex(int index) { - this.categoryIndex = index; - } - - /** * Returns a string representing this object (useful for debugging * purposes). * @@ -371,17 +224,6 @@ if (!ObjectUtilities.equal(this.dataset, that.dataset)) { return false; } - - // check the deprecated fields - if (this.categoryIndex != that.categoryIndex) { - return false; - } - if (this.series != that.series) { - return false; - } - if (!ObjectUtilities.equal(this.category, that.category)) { - return false; - } return super.equals(obj); } Modified: trunk/tests/org/jfree/chart/entity/junit/CategoryItemEntityTests.java =================================================================== --- trunk/tests/org/jfree/chart/entity/junit/CategoryItemEntityTests.java 2007-06-19 14:02:02 UTC (rev 8) +++ trunk/tests/org/jfree/chart/entity/junit/CategoryItemEntityTests.java 2007-06-19 14:11:04 UTC (rev 9) @@ -37,6 +37,7 @@ * Changes * ------- * 20-May-2004 : Version 1 (DG); + * 19-Jun-2007 : Updated for deprecation removals (DG); * */ @@ -90,9 +91,9 @@ d.addValue(3.0, "R2", "C1"); d.addValue(4.0, "R2", "C2"); CategoryItemEntity e1 = new CategoryItemEntity(new Rectangle2D.Double( - 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, 1, "C2", 1); + 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, "R2", "C2"); CategoryItemEntity e2 = new CategoryItemEntity(new Rectangle2D.Double( - 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, 1, "C2", 1); + 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, "R2", "C2"); assertTrue(e1.equals(e2)); e1.setArea(new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0)); @@ -110,21 +111,16 @@ e2.setURLText("New URL"); assertTrue(e1.equals(e2)); - e1.setCategory("C1"); + e1.setColumnKey("C1"); assertFalse(e1.equals(e2)); - e2.setCategory("C1"); + e2.setColumnKey("C1"); assertTrue(e1.equals(e2)); - e1.setCategoryIndex(0); + e1.setRowKey("R1"); assertFalse(e1.equals(e2)); - e2.setCategoryIndex(0); + e2.setRowKey("R1"); assertTrue(e1.equals(e2)); - e1.setSeries(0); - assertFalse(e1.equals(e2)); - e2.setSeries(0); - assertTrue(e1.equals(e2)); - } /** @@ -137,7 +133,7 @@ d.addValue(3.0, "R2", "C1"); d.addValue(4.0, "R2", "C2"); CategoryItemEntity e1 = new CategoryItemEntity(new Rectangle2D.Double( - 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, 1, "C2", 1); + 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, "C2", "C2"); CategoryItemEntity e2 = null; try { @@ -161,7 +157,7 @@ d.addValue(3.0, "R2", "C1"); d.addValue(4.0, "R2", "C2"); CategoryItemEntity e1 = new CategoryItemEntity(new Rectangle2D.Double( - 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, 1, "C2", 1); + 1.0, 2.0, 3.0, 4.0), "ToolTip", "URL", d, "R2", "C2"); CategoryItemEntity e2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); @@ -177,7 +173,6 @@ catch (Exception e) { e.printStackTrace(); } - boolean b = e1.equals(e2); assertEquals(e1, e2); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |