You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(165) |
Nov
(296) |
Dec
(92) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(84) |
Feb
(20) |
Mar
(20) |
Apr
(42) |
May
(26) |
Jun
(30) |
Jul
(77) |
Aug
(151) |
Sep
(61) |
Oct
(259) |
Nov
(160) |
Dec
(76) |
2007 |
Jan
(159) |
Feb
(155) |
Mar
(183) |
Apr
(113) |
May
(110) |
Jun
(178) |
Jul
(56) |
Aug
(21) |
Sep
(50) |
Oct
(251) |
Nov
(218) |
Dec
(42) |
2008 |
Jan
(14) |
Feb
(37) |
Mar
(60) |
Apr
(77) |
May
(146) |
Jun
(256) |
Jul
(72) |
Aug
(51) |
Sep
(283) |
Oct
(22) |
Nov
(55) |
Dec
(53) |
2009 |
Jan
(56) |
Feb
(45) |
Mar
(56) |
Apr
(98) |
May
(84) |
Jun
(87) |
Jul
(32) |
Aug
(6) |
Sep
(19) |
Oct
|
Nov
(10) |
Dec
(6) |
2010 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(158) |
Nov
(17) |
Dec
(15) |
2012 |
Jan
(9) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(22) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(259) |
Aug
(125) |
Sep
(24) |
Oct
(8) |
Nov
(132) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(26) |
Mar
(17) |
Apr
(8) |
May
|
Jun
(31) |
Jul
(126) |
Aug
(22) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(21) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(19) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mu...@us...> - 2014-07-01 15:26:25
|
Revision: 3222 http://sourceforge.net/p/jfreechart/code/3222 Author: mungady Date: 2014-07-01 15:26:17 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Removed URLUtilities. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardCategoryURLGenerator.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardCategoryURLGenerator.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardCategoryURLGenerator.java 2014-07-01 15:25:42 UTC (rev 3221) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardCategoryURLGenerator.java 2014-07-01 15:26:17 UTC (rev 3222) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * --------------------------------- * StandardCategoryURLGenerator.java * --------------------------------- - * (C) Copyright 2002-2013, by Richard Atkinson and Contributors. + * (C) Copyright 2002-2014, by Richard Atkinson and Contributors. * * Original Author: Richard Atkinson; * Contributors: David Gilbert (for Object Refinery Limited); @@ -56,6 +56,8 @@ package org.jfree.chart.urls; import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import org.jfree.chart.util.ParamChecks; import org.jfree.data.category.CategoryDataset; @@ -110,8 +112,10 @@ String seriesParameterName, String categoryParameterName) { ParamChecks.nullNotPermitted(prefix, "prefix"); - ParamChecks.nullNotPermitted(seriesParameterName, "seriesParameterName"); - ParamChecks.nullNotPermitted(categoryParameterName, "categoryParameterName"); + ParamChecks.nullNotPermitted(seriesParameterName, + "seriesParameterName"); + ParamChecks.nullNotPermitted(categoryParameterName, + "categoryParameterName"); this.prefix = prefix; this.seriesParameterName = seriesParameterName; this.categoryParameterName = categoryParameterName; @@ -128,17 +132,21 @@ * @return The generated URL. */ @Override - public String generateURL(CategoryDataset dataset, int series, - int category) { + public String generateURL(CategoryDataset dataset, int series, + int category) { String url = this.prefix; Comparable seriesKey = dataset.getRowKey(series); Comparable categoryKey = dataset.getColumnKey(category); - boolean firstParameter = url.indexOf("?") == -1; + boolean firstParameter = !url.contains("?"); url += firstParameter ? "?" : "&"; - url += this.seriesParameterName + "=" + URLUtilities.encode( - seriesKey.toString(), "UTF-8"); - url += "&" + this.categoryParameterName + "=" - + URLUtilities.encode(categoryKey.toString(), "UTF-8"); + try { + url += this.seriesParameterName + "=" + URLEncoder.encode( + seriesKey.toString(), "UTF-8"); + url += "&" + this.categoryParameterName + "=" + + URLEncoder.encode(categoryKey.toString(), "UTF-8"); + } catch (UnsupportedEncodingException ex) { + throw new RuntimeException(ex); // this won't happen :) + } return url; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 15:25:49
|
Revision: 3221 http://sourceforge.net/p/jfreechart/code/3221 Author: mungady Date: 2014-07-01 15:25:42 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/StandardDialScale.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/StandardDialScale.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/StandardDialScale.java 2014-07-01 15:25:16 UTC (rev 3220) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/StandardDialScale.java 2014-07-01 15:25:42 UTC (rev 3221) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ---------------------- * StandardDialScale.java * ---------------------- - * (C) Copyright 2006-2013, by Object Refinery Limited. + * (C) Copyright 2006-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -198,7 +198,7 @@ * orientation as Java's <code>Arc2D</code> class). * @param extent the extent (in degrees, counter-clockwise). * @param majorTickIncrement the interval between major tick marks (must - * be > 0). + * be > 0). * @param minorTickCount the number of minor ticks between major tick * marks. */ @@ -379,7 +379,7 @@ * Sets the increment (in data units) between major tick labels and sends a * {@link DialLayerChangeEvent} to all registered listeners. * - * @param increment the increment (must be > 0). + * @param increment the increment (must be > 0). * * @see #getMajorTickIncrement() */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 15:25:26
|
Revision: 3220 http://sourceforge.net/p/jfreechart/code/3220 Author: mungady Date: 2014-07-01 15:25:16 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/CategoryStepRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/CategoryStepRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/CategoryStepRenderer.java 2014-07-01 15:24:08 UTC (rev 3219) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/CategoryStepRenderer.java 2014-07-01 15:25:16 UTC (rev 3220) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -28,7 +28,7 @@ * CategoryStepRenderer.java * ------------------------- * - * (C) Copyright 2004-2008, by Brian Cole and Contributors. + * (C) Copyright 2004-2014, by Brian Cole and Contributors. * * Original Author: Brian Cole; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -77,7 +77,7 @@ * included in the JFreeChart Demo Collection: * <br><br> * <img src="../../../../../images/CategoryStepRendererSample.png" - * alt="CategoryStepRendererSample.png" /> + * alt="CategoryStepRendererSample.png"> */ public class CategoryStepRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 15:24:17
|
Revision: 3219 http://sourceforge.net/p/jfreechart/code/3219 Author: mungady Date: 2014-07-01 15:24:08 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardPieURLGenerator.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardPieURLGenerator.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardPieURLGenerator.java 2014-07-01 10:49:48 UTC (rev 3218) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/StandardPieURLGenerator.java 2014-07-01 15:24:08 UTC (rev 3219) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ---------------------------- * StandardPieURLGenerator.java * ---------------------------- - * (C) Copyright 2002-2013, by Richard Atkinson and Contributors. + * (C) Copyright 2002-2014, by Richard Atkinson and Contributors. * * Original Author: Richard Atkinson; * Contributors: David Gilbert (for Object Refinery Limited); @@ -52,8 +52,10 @@ package org.jfree.chart.urls; import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + import org.jfree.chart.util.ParamChecks; - import org.jfree.data.general.PieDataset; import org.jfree.util.ObjectUtilities; @@ -69,10 +71,10 @@ private String prefix = "index.html"; /** The category parameter name. */ - private String categoryParameterName = "category"; + private String categoryParamName = "category"; /** The pie index parameter name. */ - private String indexParameterName = "pieIndex"; + private String indexParamName = "pieIndex"; /** * Default constructor. @@ -84,7 +86,7 @@ /** * Creates a new generator. * - * @param prefix the prefix (<code>null</code> not permitted). + * @param prefix the prefix ({@code null} not permitted). */ public StandardPieURLGenerator(String prefix) { this(prefix, "category"); @@ -93,38 +95,36 @@ /** * Creates a new generator. * - * @param prefix the prefix (<code>null</code> not permitted). - * @param categoryParameterName the category parameter name - * (<code>null</code> not permitted). + * @param prefix the prefix ({@code null} not permitted). + * @param categoryParamName the category parameter name ({@code null} not + * permitted). */ - public StandardPieURLGenerator(String prefix, - String categoryParameterName) { - this(prefix, categoryParameterName, "pieIndex"); + public StandardPieURLGenerator(String prefix, String categoryParamName) { + this(prefix, categoryParamName, "pieIndex"); } /** * Creates a new generator. * - * @param prefix the prefix (<code>null</code> not permitted). - * @param categoryParameterName the category parameter name - * (<code>null</code> not permitted). - * @param indexParameterName the index parameter name (<code>null</code> - * permitted). + * @param prefix the prefix ({@code null} not permitted). + * @param categoryParamName the category parameter name ({@code null} not + * permitted). + * @param indexParamName the index parameter name ({@code null} permitted). */ - public StandardPieURLGenerator(String prefix, String categoryParameterName, - String indexParameterName) { + public StandardPieURLGenerator(String prefix, String categoryParamName, + String indexParamName) { ParamChecks.nullNotPermitted(prefix, "prefix"); - ParamChecks.nullNotPermitted(categoryParameterName, "categoryParameterName"); + ParamChecks.nullNotPermitted(categoryParamName, "categoryParamName"); this.prefix = prefix; - this.categoryParameterName = categoryParameterName; - this.indexParameterName = indexParameterName; + this.categoryParamName = categoryParamName; + this.indexParamName = indexParamName; } /** * Generates a URL. * * @param dataset the dataset (ignored). - * @param key the item key (<code>null</code> not permitted). + * @param key the item key ({@code null} not permitted). * @param pieIndex the pie index. * * @return A string containing the generated URL. @@ -133,25 +133,27 @@ public String generateURL(PieDataset dataset, Comparable key, int pieIndex) { String url = this.prefix; - if (url.indexOf("?") > -1) { - url += "&" + this.categoryParameterName + "=" - + URLUtilities.encode(key.toString(), "UTF-8"); + try { + if (url.contains("?")) { + url += "&" + this.categoryParamName + "=" + + URLEncoder.encode(key.toString(), "UTF-8"); + } else { + url += "?" + this.categoryParamName + "=" + + URLEncoder.encode(key.toString(), "UTF-8"); + } + if (this.indexParamName != null) { + url += "&" + this.indexParamName + "=" + pieIndex; + } + } catch (UnsupportedEncodingException e) { // this won't happen :) + throw new RuntimeException(e); } - else { - url += "?" + this.categoryParameterName + "=" - + URLUtilities.encode(key.toString(), "UTF-8"); - } - if (this.indexParameterName != null) { - url += "&" + this.indexParameterName + "=" - + String.valueOf(pieIndex); - } return url; } /** * Tests if this object is equal to another. * - * @param obj the object (<code>null</code> permitted). + * @param obj the object ({@code null} permitted). * * @return A boolean. */ @@ -167,11 +169,10 @@ if (!this.prefix.equals(that.prefix)) { return false; } - if (!this.categoryParameterName.equals(that.categoryParameterName)) { + if (!this.categoryParamName.equals(that.categoryParamName)) { return false; } - if (!ObjectUtilities.equal(this.indexParameterName, - that.indexParameterName)) { + if (!ObjectUtilities.equal(this.indexParamName, that.indexParamName)) { return false; } return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:49:55
|
Revision: 3218 http://sourceforge.net/p/jfreechart/code/3218 Author: mungady Date: 2014-07-01 10:49:48 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix SONAR warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/TimeSeriesChartDemo1.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/TimeSeriesChartDemo1.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/TimeSeriesChartDemo1.java 2014-07-01 10:49:06 UTC (rev 3217) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/TimeSeriesChartDemo1.java 2014-07-01 10:49:48 UTC (rev 3218) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------- * TimeSeriesChartDemo1.java * ------------------------- - * (C) Copyright 2003-2011, by Object Refinery Limited and Contributors. + * (C) Copyright 2003-2014, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): ; @@ -71,7 +71,7 @@ private static final long serialVersionUID = 1L; - { + static { // set a theme using the new shadow generator feature available in // 1.0.14 - for backwards compatibility it is not enabled by default ChartFactory.setChartTheme(new StandardChartTheme("JFree/Shadow", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:49:14
|
Revision: 3217 http://sourceforge.net/p/jfreechart/code/3217 Author: mungady Date: 2014-07-01 10:49:06 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix SONAR warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/PieChartDemo1.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/PieChartDemo1.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/PieChartDemo1.java 2014-07-01 10:46:25 UTC (rev 3216) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/demo/PieChartDemo1.java 2014-07-01 10:49:06 UTC (rev 3217) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------ * PieChartDemo1.java * ------------------ - * (C) Copyright 2003-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2003-2014, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): ; @@ -73,7 +73,7 @@ private static final long serialVersionUID = 1L; - { + static { // set a theme using the new shadow generator feature available in // 1.0.14 - for backwards compatibility it is not enabled by default ChartFactory.setChartTheme(new StandardChartTheme("JFree/Shadow", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:46:29
|
Revision: 3216 http://sourceforge.net/p/jfreechart/code/3216 Author: mungady Date: 2014-07-01 10:46:25 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Remove main(). Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/RelativeDateFormat.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/RelativeDateFormat.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/RelativeDateFormat.java 2014-07-01 10:44:17 UTC (rev 3215) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/RelativeDateFormat.java 2014-07-01 10:46:25 UTC (rev 3216) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ----------------------- * RelativeDateFormat.java * ----------------------- - * (C) Copyright 2006-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2006-2014, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Michael Siemer; @@ -582,38 +582,4 @@ return clone; } - /** - * Some test code. - * - * @param args ignored. - */ - public static void main(String[] args) { - GregorianCalendar c0 = new GregorianCalendar(2006, 10, 1, 0, 0, 0); - GregorianCalendar c1 = new GregorianCalendar(2006, 10, 1, 11, 37, 43); - c1.set(Calendar.MILLISECOND, 123); - - System.out.println("Default: "); - RelativeDateFormat rdf = new RelativeDateFormat(c0.getTime().getTime()); - System.out.println(rdf.format(c1.getTime())); - System.out.println(); - - System.out.println("Hide milliseconds: "); - rdf.setSecondFormatter(new DecimalFormat("0")); - System.out.println(rdf.format(c1.getTime())); - System.out.println(); - - System.out.println("Show zero day output: "); - rdf.setShowZeroDays(true); - System.out.println(rdf.format(c1.getTime())); - System.out.println(); - - System.out.println("Alternative suffixes: "); - rdf.setShowZeroDays(false); - rdf.setDaySuffix(":"); - rdf.setHourSuffix(":"); - rdf.setMinuteSuffix(":"); - rdf.setSecondSuffix(""); - System.out.println(rdf.format(c1.getTime())); - System.out.println(); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:44:20
|
Revision: 3215 http://sourceforge.net/p/jfreechart/code/3215 Author: mungady Date: 2014-07-01 10:44:17 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix SONAR warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYSeries.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYSeries.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYSeries.java 2014-07-01 10:42:02 UTC (rev 3214) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYSeries.java 2014-07-01 10:44:17 UTC (rev 3215) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------- * XYSeries.java * ------------- - * (C) Copyright 2001-2013, Object Refinery Limited and Contributors. + * (C) Copyright 2001-2014, Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Aaron Metzger; @@ -936,7 +936,8 @@ copy.add(clone); } catch (SeriesException e) { - System.err.println("Unable to add cloned data item."); + throw new RuntimeException( + "Unable to add cloned data item.", e); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:42:09
|
Revision: 3214 http://sourceforge.net/p/jfreechart/code/3214 Author: mungady Date: 2014-07-01 10:42:02 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Remove main(). Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/MonthDateFormat.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/MonthDateFormat.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/MonthDateFormat.java 2014-07-01 10:41:14 UTC (rev 3213) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/MonthDateFormat.java 2014-07-01 10:42:02 UTC (rev 3214) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------------- * MonthDateFormat.java * -------------------- - * (C) Copyright 2005-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2005-2014, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -104,7 +104,7 @@ * @param zone the time zone (<code>null</code> not permitted). * @param chars the maximum number of characters to use from the month * names (that are obtained from the date symbols of the - * default locale). If this value is <= 0, the entire + * default locale). If this value is <= 0, the entire * month name is used in each case. */ public MonthDateFormat(TimeZone zone, int chars) { @@ -117,7 +117,7 @@ * @param locale the locale (<code>null</code> not permitted). * @param chars the maximum number of characters to use from the month * names (that are obtained from the date symbols of the - * default locale). If this value is <= 0, the entire + * default locale). If this value is <= 0, the entire * month name is used in each case. */ public MonthDateFormat(Locale locale, int chars) { @@ -251,62 +251,4 @@ } return true; } - - /** - * Some test code. - * - * @param args ignored. - */ - public static void main(String[] args) { - MonthDateFormat mdf = new MonthDateFormat(Locale.UK, 2); - System.out.println("UK:"); - System.out.println(mdf.format(new Month(1, 2005).getStart())); - System.out.println(mdf.format(new Month(2, 2005).getStart())); - System.out.println(mdf.format(new Month(3, 2005).getStart())); - System.out.println(mdf.format(new Month(4, 2005).getStart())); - System.out.println(mdf.format(new Month(5, 2005).getStart())); - System.out.println(mdf.format(new Month(6, 2005).getStart())); - System.out.println(mdf.format(new Month(7, 2005).getStart())); - System.out.println(mdf.format(new Month(8, 2005).getStart())); - System.out.println(mdf.format(new Month(9, 2005).getStart())); - System.out.println(mdf.format(new Month(10, 2005).getStart())); - System.out.println(mdf.format(new Month(11, 2005).getStart())); - System.out.println(mdf.format(new Month(12, 2005).getStart())); - System.out.println(); - - mdf = new MonthDateFormat(Locale.GERMANY, 2); - System.out.println("GERMANY:"); - System.out.println(mdf.format(new Month(1, 2005).getStart())); - System.out.println(mdf.format(new Month(2, 2005).getStart())); - System.out.println(mdf.format(new Month(3, 2005).getStart())); - System.out.println(mdf.format(new Month(4, 2005).getStart())); - System.out.println(mdf.format(new Month(5, 2005).getStart())); - System.out.println(mdf.format(new Month(6, 2005).getStart())); - System.out.println(mdf.format(new Month(7, 2005).getStart())); - System.out.println(mdf.format(new Month(8, 2005).getStart())); - System.out.println(mdf.format(new Month(9, 2005).getStart())); - System.out.println(mdf.format(new Month(10, 2005).getStart())); - System.out.println(mdf.format(new Month(11, 2005).getStart())); - System.out.println(mdf.format(new Month(12, 2005).getStart())); - System.out.println(); - - mdf = new MonthDateFormat(Locale.FRANCE, 2); - System.out.println("FRANCE:"); - System.out.println(mdf.format(new Month(1, 2005).getStart())); - System.out.println(mdf.format(new Month(2, 2005).getStart())); - System.out.println(mdf.format(new Month(3, 2005).getStart())); - System.out.println(mdf.format(new Month(4, 2005).getStart())); - System.out.println(mdf.format(new Month(5, 2005).getStart())); - System.out.println(mdf.format(new Month(6, 2005).getStart())); - System.out.println(mdf.format(new Month(7, 2005).getStart())); - System.out.println(mdf.format(new Month(8, 2005).getStart())); - System.out.println(mdf.format(new Month(9, 2005).getStart())); - System.out.println(mdf.format(new Month(10, 2005).getStart())); - System.out.println(mdf.format(new Month(11, 2005).getStart())); - System.out.println(mdf.format(new Month(12, 2005).getStart())); - System.out.println(); - - SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); - sdf.setNumberFormat(null); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:41:21
|
Revision: 3213 http://sourceforge.net/p/jfreechart/code/3213 Author: mungady Date: 2014-07-01 10:41:14 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/title/DateTitle.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/title/DateTitle.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/title/DateTitle.java 2014-07-01 10:34:10 UTC (rev 3212) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/title/DateTitle.java 2014-07-01 10:41:14 UTC (rev 3213) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------- * DateTitle.java * -------------- - * (C) Copyright 2000-2008, by David Berry and Contributors. + * (C) Copyright 2000-2014, by David Berry and Contributors. * * Original Author: David Berry; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -64,7 +64,7 @@ * A chart title that displays the date. * <p> * Keep in mind that a chart can have several titles, and that they can appear - * at the top, left, right or bottom of the chart - a <code>DateTitle</code> + * at the top, left, right or bottom of the chart - a {@code DateTitle} * will commonly appear at the bottom of a chart, although you can place it * anywhere. * <P> @@ -93,9 +93,9 @@ * Creates a new chart title that displays the current date with the * specified style (for the default locale). * <P> - * The date style should be one of: <code>SHORT</code>, - * <code>MEDIUM</code>, <code>LONG</code> or <code>FULL</code> - * (defined in <code>java.util.DateFormat</code>). + * The date style should be one of: {@code SHORT}, + * {@code MEDIUM}, {@code LONG} or {@code FULL} + * (defined in {@code java.util.DateFormat}). * * @param style the date style. */ @@ -107,11 +107,11 @@ /** * Creates a new chart title that displays the current date. * <p> - * The date style should be one of: <code>SHORT</code>, - * <code>MEDIUM</code>, <code>LONG</code> or <code>FULL</code> (defined - * in <code>java.util.DateFormat</code>). + * The date style should be one of: {@code SHORT}, + * {@code MEDIUM}, {@code LONG} or {@code FULL} (defined + * in {@code java.util.DateFormat}). * <P> - * For the locale, you can use <code>Locale.getDefault()</code> for the + * For the locale, you can use {@code Locale.getDefault()} for the * default locale. * * @param style the date style. @@ -128,11 +128,11 @@ /** * Creates a new chart title that displays the current date. * <p> - * The date style should be one of: <code>SHORT</code>, - * <code>MEDIUM</code>, <code>LONG</code> or <code>FULL</code> (defined - * in <code>java.util.DateFormat<code>). + * The date style should be one of: {@code SHORT}, + * {@code MEDIUM}, {@code LONG} or {@code FULL} (defined + * in {@code java.util.DateFormat}). * <P> - * For the locale, you can use <code>Locale.getDefault()</code> for the + * For the locale, you can use {@code Locale.getDefault()} for the * default locale. * * @param style the date style. @@ -149,10 +149,8 @@ * title (not null). */ public DateTitle(int style, Locale locale, Font font, Paint paint, - RectangleEdge position, - HorizontalAlignment horizontalAlignment, - VerticalAlignment verticalAlignment, - RectangleInsets padding) { + RectangleEdge position, HorizontalAlignment horizontalAlignment, + VerticalAlignment verticalAlignment, RectangleInsets padding) { super(DateFormat.getDateInstance(style, locale).format(new Date()), font, paint, position, horizontalAlignment, verticalAlignment, padding); @@ -161,11 +159,11 @@ /** * Set the format of the date. * <P> - * The date style should be one of: <code>SHORT</code>, - * <code>MEDIUM</code>, <code>LONG</code> or <code>FULL</code> (defined - * in <code>java.util.DateFormat</code>). + * The date style should be one of: {@code SHORT}, + * {@code MEDIUM}, {@code LONG} or {@code FULL} (defined + * in {@code java.util.DateFormat}). * <P> - * For the locale, you can use <code>Locale.getDefault()</code> for the + * For the locale, you can use {@code Locale.getDefault()} for the * default locale. * * @param style the date style. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:34:13
|
Revision: 3212 http://sourceforge.net/p/jfreechart/code/3212 Author: mungady Date: 2014-07-01 10:34:10 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerToolTipGenerator.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerXYToolTipGenerator.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerToolTipGenerator.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerToolTipGenerator.java 2014-07-01 10:29:29 UTC (rev 3211) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerToolTipGenerator.java 2014-07-01 10:34:10 UTC (rev 3212) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------------------ * BoxAndWhiskerToolTipGenerator.java * ------------------------------------ - * (C) Copyright 2004-2008, by David Browning and Contributors. + * (C) Copyright 2004-2014, by David Browning and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -56,16 +56,16 @@ * The tooltip text and item label text are composed using a * {@link java.text.MessageFormat} object, that can aggregate some or all of * the following string values into a message. - * <table> - * <tr><td>0</td><td>Series Name</td></tr> - * <tr><td>1</td><td>X (value or date)</td></tr> - * <tr><td>2</td><td>Mean</td></tr> - * <tr><td>3</td><td>Median</td></tr> - * <tr><td>4</td><td>Minimum</td></tr> - * <tr><td>5</td><td>Maximum</td></tr> - * <tr><td>6</td><td>Quartile 1</td></tr> - * <tr><td>7</td><td>Quartile 3</td></tr> - * </table> + * <ul> + * <li>0 : Series Name</li> + * <li>1 : X (value or date)</li> + * <li>2 : Mean</li> + * <li>3 : Median</li> + * <li>4 : Minimum</li> + * <li>5 : Maximum</li> + * <li>6 : Quartile 1</li> + * <li>7 : Quartile 3</li> + * </ul> */ public class BoxAndWhiskerToolTipGenerator extends StandardCategoryToolTipGenerator Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerXYToolTipGenerator.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerXYToolTipGenerator.java 2014-07-01 10:29:29 UTC (rev 3211) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/labels/BoxAndWhiskerXYToolTipGenerator.java 2014-07-01 10:34:10 UTC (rev 3212) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------------------ * BoxAndWhiskerXYToolTipGenerator.java * ------------------------------------ - * (C) Copyright 2003-2008, by David Browning and Contributors. + * (C) Copyright 2003-2014, by David Browning and Contributors. * * Original Author: David Browning; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -65,16 +65,16 @@ * The tooltip text and item label text are composed using a * {@link java.text.MessageFormat} object, that can aggregate some or all of * the following string values into a message. - * <table> - * <tr><td>0</td><td>Series Name</td></tr> - * <tr><td>1</td><td>X (value or date)</td></tr> - * <tr><td>2</td><td>Mean</td></tr> - * <tr><td>3</td><td>Median</td></tr> - * <tr><td>4</td><td>Minimum</td></tr> - * <tr><td>5</td><td>Maximum</td></tr> - * <tr><td>6</td><td>Quartile 1</td></tr> - * <tr><td>7</td><td>Quartile 3</td></tr> - * </table> + * <ul> + * <li>0 : Series Name</li> + * <li>1 : X (value or date)</li> + * <li>2 : Mean</li> + * <li>3 : Median</li> + * <li>4 : Minimum</li> + * <li>5 : Maximum</li> + * <li>6 : Quartile 1</li> + * <li>7 : Quartile 3</li> + * </ul> */ public class BoxAndWhiskerXYToolTipGenerator extends StandardXYToolTipGenerator implements XYToolTipGenerator, Cloneable, Serializable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:29:42
|
Revision: 3211 http://sourceforge.net/p/jfreechart/code/3211 Author: mungady Date: 2014-07-01 10:29:29 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainCategoryPlot.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedRangeCategoryPlot.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainCategoryPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainCategoryPlot.java 2014-07-01 10:26:37 UTC (rev 3210) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainCategoryPlot.java 2014-07-01 10:29:29 UTC (rev 3211) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------------- * CombinedDomainCategoryPlot.java * ------------------------------- - * (C) Copyright 2003-2013, by Object Refinery Limited. + * (C) Copyright 2003-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Nicolas Brodu; @@ -170,7 +170,7 @@ * must ensure that the subplot has a non-null range axis. * * @param subplot the subplot (<code>null</code> not permitted). - * @param weight the weight (must be >= 1). + * @param weight the weight (must be >= 1). */ public void add(CategoryPlot subplot, int weight) { ParamChecks.nullNotPermitted(subplot, "subplot"); @@ -538,7 +538,7 @@ * axis. NOTE: This method is intended for internal JFreeChart use, and * is public only so that code in the axis classes can call it. Since, * for this class, the domain axis is a {@link CategoryAxis} - * (not a <code>ValueAxis</code}) and subplots have independent range axes, + * (not a {@code ValueAxis}) and subplots have independent range axes, * the JFreeChart code will never call this method (although this is not * checked/enforced). * Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java 2014-07-01 10:26:37 UTC (rev 3210) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java 2014-07-01 10:29:29 UTC (rev 3211) @@ -1,763 +1,763 @@ -/* =========================================================== - * JFreeChart : a free chart library for the Java(tm) platform - * =========================================================== - * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. - * - * Project Info: http://www.jfree.org/jfreechart/index.html - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * 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. - * - * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners.] - * - * ------------------------- - * CombinedDomainXYPlot.java - * ------------------------- - * (C) Copyright 2001-2012, by Bill Kelemen and Contributors. - * - * Original Author: Bill Kelemen; - * Contributor(s): David Gilbert (for Object Refinery Limited); - * Anthony Boulestreau; - * David Basten; - * Kevin Frechette (for ISTI); - * Nicolas Brodu; - * Petr Kubanek (bug 1606205); - * - * Changes: - * -------- - * 06-Dec-2001 : Version 1 (BK); - * 12-Dec-2001 : Removed unnecessary 'throws' clause from constructor (DG); - * 18-Dec-2001 : Added plotArea attribute and get/set methods (BK); - * 22-Dec-2001 : Fixed bug in chartChanged with multiple combinations of - * CombinedPlots (BK); - * 08-Jan-2002 : Moved to new package com.jrefinery.chart.combination (DG); - * 25-Feb-2002 : Updated import statements (DG); - * 28-Feb-2002 : Readded "this.plotArea = plotArea" that was deleted from - * draw() method (BK); - * 26-Mar-2002 : Added an empty zoom method (this method needs to be written so - * that combined plots will support zooming (DG); - * 29-Mar-2002 : Changed the method createCombinedAxis adding the creation of - * OverlaidSymbolicAxis and CombinedSymbolicAxis(AB); - * 23-Apr-2002 : Renamed CombinedPlot-->MultiXYPlot, and simplified the - * structure (DG); - * 23-May-2002 : Renamed (again) MultiXYPlot-->CombinedXYPlot (DG); - * 19-Jun-2002 : Added get/setGap() methods suggested by David Basten (DG); - * 25-Jun-2002 : Removed redundant imports (DG); - * 16-Jul-2002 : Draws shared axis after subplots (to fix missing gridlines), - * added overrides of 'setSeriesPaint()' and 'setXYItemRenderer()' - * that pass changes down to subplots (KF); - * 09-Oct-2002 : Added add(XYPlot) method (DG); - * 26-Mar-2003 : Implemented Serializable (DG); - * 16-May-2003 : Renamed CombinedXYPlot --> CombinedDomainXYPlot (DG); - * 04-Aug-2003 : Removed leftover code that was causing domain axis drawing - * problem (DG); - * 08-Aug-2003 : Adjusted totalWeight in remove() method (DG); - * 21-Aug-2003 : Implemented Cloneable (DG); - * 11-Sep-2003 : Fix cloning support (subplots) (NB); - * 15-Sep-2003 : Fixed error in cloning (DG); - * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG); - * 17-Sep-2003 : Updated handling of 'clicks' (DG); - * 12-Nov-2004 : Implemented the new Zoomable interface (DG); - * 25-Nov-2004 : Small update to clone() implementation (DG); - * 21-Feb-2005 : The getLegendItems() method now returns the fixed legend - * items if set (DG); - * 05-May-2005 : Removed unused draw() method (DG); - * ------------- JFREECHART 1.0.x --------------------------------------------- - * 23-Aug-2006 : Override setFixedRangeAxisSpace() to update subplots (DG); - * 06-Feb-2007 : Fixed bug 1606205, draw shared axis after subplots (DG); - * 23-Mar-2007 : Reverted previous patch (bug fix 1606205) (DG); - * 17-Apr-2007 : Added null argument checks to findSubplot() (DG); - * 27-Nov-2007 : Modified setFixedRangeAxisSpaceForSubplots() so as not to - * trigger change event in subplots (DG); - * 28-Jan-2008 : Reset fixed range axis space in subplots for each call to - * draw() (DG); - * 27-Mar-2008 : Add documentation for getDataRange() method (DG); - * 31-Mar-2008 : Updated getSubplots() to return EMPTY_LIST for null - * subplots, as suggested by Richard West (DG); - * 28-Apr-2008 : Fixed zooming problem (see bug 1950037) (DG); - * 11-Aug-2008 : Don't store totalWeight of subplots, calculate it as - * required (DG); - * 21-Dec-2011 : Apply patch 3447161 by Ulrich Voigt and Martin Hoeller (MH); - * - */ - -package org.jfree.chart.plot; - -import java.awt.Graphics2D; -import java.awt.geom.Point2D; -import java.awt.geom.Rectangle2D; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.jfree.chart.LegendItemCollection; -import org.jfree.chart.axis.AxisSpace; -import org.jfree.chart.axis.AxisState; -import org.jfree.chart.axis.NumberAxis; -import org.jfree.chart.axis.ValueAxis; -import org.jfree.chart.event.PlotChangeEvent; -import org.jfree.chart.event.PlotChangeListener; -import org.jfree.chart.renderer.xy.XYItemRenderer; -import org.jfree.chart.util.ParamChecks; -import org.jfree.chart.util.ShadowGenerator; -import org.jfree.data.Range; -import org.jfree.ui.RectangleEdge; -import org.jfree.ui.RectangleInsets; -import org.jfree.util.ObjectUtilities; - -/** - * An extension of {@link XYPlot} that contains multiple subplots that share a - * common domain axis. - */ -public class CombinedDomainXYPlot extends XYPlot - implements PlotChangeListener { - - /** For serialization. */ - private static final long serialVersionUID = -7765545541261907383L; - - /** Storage for the subplot references. */ - private List subplots; - - /** The gap between subplots. */ - private double gap = 5.0; - - /** Temporary storage for the subplot areas. */ - private transient Rectangle2D[] subplotAreas; - // TODO: the subplot areas needs to be moved out of the plot into the plot - // state - - /** - * Default constructor. - */ - public CombinedDomainXYPlot() { - this(new NumberAxis()); - } - - /** - * Creates a new combined plot that shares a domain axis among multiple - * subplots. - * - * @param domainAxis the shared axis. - */ - public CombinedDomainXYPlot(ValueAxis domainAxis) { - - super(null, // no data in the parent plot - domainAxis, - null, // no range axis - null); // no renderer - - this.subplots = new java.util.ArrayList(); - - } - - /** - * Returns a string describing the type of plot. - * - * @return The type of plot. - */ - @Override - public String getPlotType() { - return "Combined_Domain_XYPlot"; - } - - /** - * Sets the orientation for the plot (also changes the orientation for all - * the subplots to match). - * - * @param orientation the orientation (<code>null</code> not allowed). - */ - @Override - public void setOrientation(PlotOrientation orientation) { - super.setOrientation(orientation); - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot plot = (XYPlot) iterator.next(); - plot.setOrientation(orientation); - } - } - - /** - * Sets the shadow generator for the plot (and all subplots) and sends - * a {@link PlotChangeEvent} to all registered listeners. - * - * @param generator the new generator (<code>null</code> permitted). - */ - @Override - public void setShadowGenerator(ShadowGenerator generator) { - setNotify(false); - super.setShadowGenerator(generator); - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot plot = (XYPlot) iterator.next(); - plot.setShadowGenerator(generator); - } - setNotify(true); - } - - /** - * Returns a range representing the extent of the data values in this plot - * (obtained from the subplots) that will be rendered against the specified - * axis. NOTE: This method is intended for internal JFreeChart use, and - * is public only so that code in the axis classes can call it. Since - * only the domain axis is shared between subplots, the JFreeChart code - * will only call this method for the domain values (although this is not - * checked/enforced). - * - * @param axis the axis. - * - * @return The range (possibly <code>null</code>). - */ - @Override - public Range getDataRange(ValueAxis axis) { - Range result = null; - if (this.subplots != null) { - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot subplot = (XYPlot) iterator.next(); - result = Range.combine(result, subplot.getDataRange(axis)); - } - } - return result; - } - - /** - * Returns the gap between subplots, measured in Java2D units. - * - * @return The gap (in Java2D units). - * - * @see #setGap(double) - */ - public double getGap() { - return this.gap; - } - - /** - * Sets the amount of space between subplots and sends a - * {@link PlotChangeEvent} to all registered listeners. - * - * @param gap the gap between subplots (in Java2D units). - * - * @see #getGap() - */ - public void setGap(double gap) { - this.gap = gap; - fireChangeEvent(); - } - - /** - * Adds a subplot (with a default 'weight' of 1) and sends a - * {@link PlotChangeEvent} to all registered listeners. - * <P> - * The domain axis for the subplot will be set to <code>null</code>. You - * must ensure that the subplot has a non-null range axis. - * - * @param subplot the subplot (<code>null</code> not permitted). - */ - public void add(XYPlot subplot) { - // defer argument checking - add(subplot, 1); - } - - /** - * Adds a subplot with the specified weight and sends a - * {@link PlotChangeEvent} to all registered listeners. The weight - * determines how much space is allocated to the subplot relative to all - * the other subplots. - * <P> - * The domain axis for the subplot will be set to <code>null</code>. You - * must ensure that the subplot has a non-null range axis. - * - * @param subplot the subplot (<code>null</code> not permitted). - * @param weight the weight (must be >= 1). - */ - public void add(XYPlot subplot, int weight) { - ParamChecks.nullNotPermitted(subplot, "subplot"); - if (weight <= 0) { - throw new IllegalArgumentException("Require weight >= 1."); - } - - // store the plot and its weight - subplot.setParent(this); - subplot.setWeight(weight); - subplot.setInsets(RectangleInsets.ZERO_INSETS, false); - subplot.setDomainAxis(null); - subplot.addChangeListener(this); - this.subplots.add(subplot); - - ValueAxis axis = getDomainAxis(); - if (axis != null) { - axis.configure(); - } - fireChangeEvent(); - } - - /** - * Removes a subplot from the combined chart and sends a - * {@link PlotChangeEvent} to all registered listeners. - * - * @param subplot the subplot (<code>null</code> not permitted). - */ - public void remove(XYPlot subplot) { - ParamChecks.nullNotPermitted(subplot, "subplot"); - int position = -1; - int size = this.subplots.size(); - int i = 0; - while (position == -1 && i < size) { - if (this.subplots.get(i) == subplot) { - position = i; - } - i++; - } - if (position != -1) { - this.subplots.remove(position); - subplot.setParent(null); - subplot.removeChangeListener(this); - ValueAxis domain = getDomainAxis(); - if (domain != null) { - domain.configure(); - } - fireChangeEvent(); - } - } - - /** - * Returns the list of subplots. The returned list may be empty, but is - * never <code>null</code>. - * - * @return An unmodifiable list of subplots. - */ - public List getSubplots() { - if (this.subplots != null) { - return Collections.unmodifiableList(this.subplots); - } - else { - return Collections.EMPTY_LIST; - } - } - - /** - * Calculates the axis space required. - * - * @param g2 the graphics device. - * @param plotArea the plot area. - * - * @return The space. - */ - @Override - protected AxisSpace calculateAxisSpace(Graphics2D g2, - Rectangle2D plotArea) { - - AxisSpace space = new AxisSpace(); - PlotOrientation orientation = getOrientation(); - - // work out the space required by the domain axis... - AxisSpace fixed = getFixedDomainAxisSpace(); - if (fixed != null) { - if (orientation == PlotOrientation.HORIZONTAL) { - space.setLeft(fixed.getLeft()); - space.setRight(fixed.getRight()); - } - else if (orientation == PlotOrientation.VERTICAL) { - space.setTop(fixed.getTop()); - space.setBottom(fixed.getBottom()); - } - } - else { - ValueAxis xAxis = getDomainAxis(); - RectangleEdge xEdge = Plot.resolveDomainAxisLocation( - getDomainAxisLocation(), orientation); - if (xAxis != null) { - space = xAxis.reserveSpace(g2, this, plotArea, xEdge, space); - } - } - - Rectangle2D adjustedPlotArea = space.shrink(plotArea, null); - - // work out the maximum height or width of the non-shared axes... - int n = this.subplots.size(); - int totalWeight = 0; - for (int i = 0; i < n; i++) { - XYPlot sub = (XYPlot) this.subplots.get(i); - totalWeight += sub.getWeight(); - } - this.subplotAreas = new Rectangle2D[n]; - double x = adjustedPlotArea.getX(); - double y = adjustedPlotArea.getY(); - double usableSize = 0.0; - if (orientation == PlotOrientation.HORIZONTAL) { - usableSize = adjustedPlotArea.getWidth() - this.gap * (n - 1); - } - else if (orientation == PlotOrientation.VERTICAL) { - usableSize = adjustedPlotArea.getHeight() - this.gap * (n - 1); - } - - for (int i = 0; i < n; i++) { - XYPlot plot = (XYPlot) this.subplots.get(i); - - // calculate sub-plot area - if (orientation == PlotOrientation.HORIZONTAL) { - double w = usableSize * plot.getWeight() / totalWeight; - this.subplotAreas[i] = new Rectangle2D.Double(x, y, w, - adjustedPlotArea.getHeight()); - x = x + w + this.gap; - } - else if (orientation == PlotOrientation.VERTICAL) { - double h = usableSize * plot.getWeight() / totalWeight; - this.subplotAreas[i] = new Rectangle2D.Double(x, y, - adjustedPlotArea.getWidth(), h); - y = y + h + this.gap; - } - - AxisSpace subSpace = plot.calculateRangeAxisSpace(g2, - this.subplotAreas[i], null); - space.ensureAtLeast(subSpace); - - } - - return space; - } - - /** - * Draws the plot within the specified area on a graphics device. - * - * @param g2 the graphics device. - * @param area the plot area (in Java2D space). - * @param anchor an anchor point in Java2D space (<code>null</code> - * permitted). - * @param parentState the state from the parent plot, if there is one - * (<code>null</code> permitted). - * @param info collects chart drawing information (<code>null</code> - * permitted). - */ - @Override - public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, - PlotState parentState, PlotRenderingInfo info) { - - // set up info collection... - if (info != null) { - info.setPlotArea(area); - } - - // adjust the drawing area for plot insets (if any)... - RectangleInsets insets = getInsets(); - insets.trim(area); - - setFixedRangeAxisSpaceForSubplots(null); - AxisSpace space = calculateAxisSpace(g2, area); - Rectangle2D dataArea = space.shrink(area, null); - - // set the width and height of non-shared axis of all sub-plots - setFixedRangeAxisSpaceForSubplots(space); - - // draw the shared axis - ValueAxis axis = getDomainAxis(); - RectangleEdge edge = getDomainAxisEdge(); - double cursor = RectangleEdge.coordinate(dataArea, edge); - AxisState axisState = axis.draw(g2, cursor, area, dataArea, edge, info); - if (parentState == null) { - parentState = new PlotState(); - } - parentState.getSharedAxisStates().put(axis, axisState); - - // draw all the subplots - for (int i = 0; i < this.subplots.size(); i++) { - XYPlot plot = (XYPlot) this.subplots.get(i); - PlotRenderingInfo subplotInfo = null; - if (info != null) { - subplotInfo = new PlotRenderingInfo(info.getOwner()); - info.addSubplotInfo(subplotInfo); - } - plot.draw(g2, this.subplotAreas[i], anchor, parentState, - subplotInfo); - } - - if (info != null) { - info.setDataArea(dataArea); - } - - } - - /** - * Returns a collection of legend items for the plot. - * - * @return The legend items. - */ - @Override - public LegendItemCollection getLegendItems() { - LegendItemCollection result = getFixedLegendItems(); - if (result == null) { - result = new LegendItemCollection(); - if (this.subplots != null) { - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot plot = (XYPlot) iterator.next(); - LegendItemCollection more = plot.getLegendItems(); - result.addAll(more); - } - } - } - return result; - } - - /** - * Multiplies the range on the range axis/axes by the specified factor. - * - * @param factor the zoom factor. - * @param info the plot rendering info (<code>null</code> not permitted). - * @param source the source point (<code>null</code> not permitted). - */ - @Override - public void zoomRangeAxes(double factor, PlotRenderingInfo info, - Point2D source) { - zoomRangeAxes(factor, info, source, false); - } - - /** - * Multiplies the range on the range axis/axes by the specified factor. - * - * @param factor the zoom factor. - * @param state the plot state. - * @param source the source point (in Java2D coordinates). - * @param useAnchor use source point as zoom anchor? - */ - @Override - public void zoomRangeAxes(double factor, PlotRenderingInfo state, - Point2D source, boolean useAnchor) { - // delegate 'state' and 'source' argument checks... - XYPlot subplot = findSubplot(state, source); - if (subplot != null) { - subplot.zoomRangeAxes(factor, state, source, useAnchor); - } - else { - // if the source point doesn't fall within a subplot, we do the - // zoom on all subplots... - Iterator iterator = getSubplots().iterator(); - while (iterator.hasNext()) { - subplot = (XYPlot) iterator.next(); - subplot.zoomRangeAxes(factor, state, source, useAnchor); - } - } - } - - /** - * Zooms in on the range axes. - * - * @param lowerPercent the lower bound. - * @param upperPercent the upper bound. - * @param info the plot rendering info (<code>null</code> not permitted). - * @param source the source point (<code>null</code> not permitted). - */ - @Override - public void zoomRangeAxes(double lowerPercent, double upperPercent, - PlotRenderingInfo info, Point2D source) { - // delegate 'info' and 'source' argument checks... - XYPlot subplot = findSubplot(info, source); - if (subplot != null) { - subplot.zoomRangeAxes(lowerPercent, upperPercent, info, source); - } - else { - // if the source point doesn't fall within a subplot, we do the - // zoom on all subplots... - Iterator iterator = getSubplots().iterator(); - while (iterator.hasNext()) { - subplot = (XYPlot) iterator.next(); - subplot.zoomRangeAxes(lowerPercent, upperPercent, info, source); - } - } - } - - /** - * Pans all range axes by the specified percentage. - * - * @param panRange the distance to pan (as a percentage of the axis length). - * @param info the plot info - * @param source the source point where the pan action started. - * - * @since 1.0.15 - */ - @Override - public void panRangeAxes(double panRange, PlotRenderingInfo info, - Point2D source) { - - XYPlot subplot = findSubplot(info, source); - if (subplot != null) { - PlotRenderingInfo subplotInfo = info.getSubplotInfo( - info.getSubplotIndex(source)); - if (subplotInfo == null) { - return; - } - - for (int i = 0; i < subplot.getRangeAxisCount(); i++) { - ValueAxis rangeAxis = subplot.getRangeAxis(i); - rangeAxis.pan(panRange); - } - } - } - - /** - * Returns the subplot (if any) that contains the (x, y) point (specified - * in Java2D space). - * - * @param info the chart rendering info (<code>null</code> not permitted). - * @param source the source point (<code>null</code> not permitted). - * - * @return A subplot (possibly <code>null</code>). - */ - public XYPlot findSubplot(PlotRenderingInfo info, Point2D source) { - ParamChecks.nullNotPermitted(info, "info"); - ParamChecks.nullNotPermitted(source, "source"); - XYPlot result = null; - int subplotIndex = info.getSubplotIndex(source); - if (subplotIndex >= 0) { - result = (XYPlot) this.subplots.get(subplotIndex); - } - return result; - } - - /** - * Sets the item renderer FOR ALL SUBPLOTS. Registered listeners are - * notified that the plot has been modified. - * <P> - * Note: usually you will want to set the renderer independently for each - * subplot, which is NOT what this method does. - * - * @param renderer the new renderer. - */ - @Override - public void setRenderer(XYItemRenderer renderer) { - super.setRenderer(renderer); // not strictly necessary, since the - // renderer set for the - // parent plot is not used - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot plot = (XYPlot) iterator.next(); - plot.setRenderer(renderer); - } - } - - /** - * Sets the fixed range axis space and sends a {@link PlotChangeEvent} to - * all registered listeners. - * - * @param space the space (<code>null</code> permitted). - */ - @Override - public void setFixedRangeAxisSpace(AxisSpace space) { - super.setFixedRangeAxisSpace(space); - setFixedRangeAxisSpaceForSubplots(space); - fireChangeEvent(); - } - - /** - * Sets the size (width or height, depending on the orientation of the - * plot) for the domain axis of each subplot. - * - * @param space the space. - */ - protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space) { - Iterator iterator = this.subplots.iterator(); - while (iterator.hasNext()) { - XYPlot plot = (XYPlot) iterator.next(); - plot.setFixedRangeAxisSpace(space, false); - } - } - - /** - * Handles a 'click' on the plot by updating the anchor values. - * - * @param x x-coordinate, where the click occured. - * @param y y-coordinate, where the click occured. - * @param info object containing information about the plot dimensions. - */ - @Override - public void handleClick(int x, int y, PlotRenderingInfo info) { - Rectangle2D dataArea = info.getDataArea(); - if (dataArea.contains(x, y)) { - for (int i = 0; i < this.subplots.size(); i++) { - XYPlot subplot = (XYPlot) this.subplots.get(i); - PlotRenderingInfo subplotInfo = info.getSubplotInfo(i); - subplot.handleClick(x, y, subplotInfo); - } - } - } - - /** - * Receives a {@link PlotChangeEvent} and responds by notifying all - * listeners. - * - * @param event the event. - */ - @Override - public void plotChanged(PlotChangeEvent event) { - notifyListeners(event); - } - - /** - * Tests this plot for equality with another object. - * - * @param obj the other object. - * - * @return <code>true</code> or <code>false</code>. - */ - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof CombinedDomainXYPlot)) { - return false; - } - CombinedDomainXYPlot that = (CombinedDomainXYPlot) obj; - if (this.gap != that.gap) { - return false; - } - if (!ObjectUtilities.equal(this.subplots, that.subplots)) { - return false; - } - return super.equals(obj); - } - - /** - * Returns a clone of the annotation. - * - * @return A clone. - * - * @throws CloneNotSupportedException this class will not throw this - * exception, but subclasses (if any) might. - */ - @Override - public Object clone() throws CloneNotSupportedException { - - CombinedDomainXYPlot result = (CombinedDomainXYPlot) super.clone(); - result.subplots = (List) ObjectUtilities.deepClone(this.subplots); - for (Iterator it = result.subplots.iterator(); it.hasNext();) { - Plot child = (Plot) it.next(); - child.setParent(result); - } - - // after setting up all the subplots, the shared domain axis may need - // reconfiguring - ValueAxis domainAxis = result.getDomainAxis(); - if (domainAxis != null) { - domainAxis.configure(); - } - - return result; - - } - -} +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * 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. + * + * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners.] + * + * ------------------------- + * CombinedDomainXYPlot.java + * ------------------------- + * (C) Copyright 2001-2014, by Bill Kelemen and Contributors. + * + * Original Author: Bill Kelemen; + * Contributor(s): David Gilbert (for Object Refinery Limited); + * Anthony Boulestreau; + * David Basten; + * Kevin Frechette (for ISTI); + * Nicolas Brodu; + * Petr Kubanek (bug 1606205); + * + * Changes: + * -------- + * 06-Dec-2001 : Version 1 (BK); + * 12-Dec-2001 : Removed unnecessary 'throws' clause from constructor (DG); + * 18-Dec-2001 : Added plotArea attribute and get/set methods (BK); + * 22-Dec-2001 : Fixed bug in chartChanged with multiple combinations of + * CombinedPlots (BK); + * 08-Jan-2002 : Moved to new package com.jrefinery.chart.combination (DG); + * 25-Feb-2002 : Updated import statements (DG); + * 28-Feb-2002 : Readded "this.plotArea = plotArea" that was deleted from + * draw() method (BK); + * 26-Mar-2002 : Added an empty zoom method (this method needs to be written so + * that combined plots will support zooming (DG); + * 29-Mar-2002 : Changed the method createCombinedAxis adding the creation of + * OverlaidSymbolicAxis and CombinedSymbolicAxis(AB); + * 23-Apr-2002 : Renamed CombinedPlot-->MultiXYPlot, and simplified the + * structure (DG); + * 23-May-2002 : Renamed (again) MultiXYPlot-->CombinedXYPlot (DG); + * 19-Jun-2002 : Added get/setGap() methods suggested by David Basten (DG); + * 25-Jun-2002 : Removed redundant imports (DG); + * 16-Jul-2002 : Draws shared axis after subplots (to fix missing gridlines), + * added overrides of 'setSeriesPaint()' and 'setXYItemRenderer()' + * that pass changes down to subplots (KF); + * 09-Oct-2002 : Added add(XYPlot) method (DG); + * 26-Mar-2003 : Implemented Serializable (DG); + * 16-May-2003 : Renamed CombinedXYPlot --> CombinedDomainXYPlot (DG); + * 04-Aug-2003 : Removed leftover code that was causing domain axis drawing + * problem (DG); + * 08-Aug-2003 : Adjusted totalWeight in remove() method (DG); + * 21-Aug-2003 : Implemented Cloneable (DG); + * 11-Sep-2003 : Fix cloning support (subplots) (NB); + * 15-Sep-2003 : Fixed error in cloning (DG); + * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG); + * 17-Sep-2003 : Updated handling of 'clicks' (DG); + * 12-Nov-2004 : Implemented the new Zoomable interface (DG); + * 25-Nov-2004 : Small update to clone() implementation (DG); + * 21-Feb-2005 : The getLegendItems() method now returns the fixed legend + * items if set (DG); + * 05-May-2005 : Removed unused draw() method (DG); + * ------------- JFREECHART 1.0.x --------------------------------------------- + * 23-Aug-2006 : Override setFixedRangeAxisSpace() to update subplots (DG); + * 06-Feb-2007 : Fixed bug 1606205, draw shared axis after subplots (DG); + * 23-Mar-2007 : Reverted previous patch (bug fix 1606205) (DG); + * 17-Apr-2007 : Added null argument checks to findSubplot() (DG); + * 27-Nov-2007 : Modified setFixedRangeAxisSpaceForSubplots() so as not to + * trigger change event in subplots (DG); + * 28-Jan-2008 : Reset fixed range axis space in subplots for each call to + * draw() (DG); + * 27-Mar-2008 : Add documentation for getDataRange() method (DG); + * 31-Mar-2008 : Updated getSubplots() to return EMPTY_LIST for null + * subplots, as suggested by Richard West (DG); + * 28-Apr-2008 : Fixed zooming problem (see bug 1950037) (DG); + * 11-Aug-2008 : Don't store totalWeight of subplots, calculate it as + * required (DG); + * 21-Dec-2011 : Apply patch 3447161 by Ulrich Voigt and Martin Hoeller (MH); + * + */ + +package org.jfree.chart.plot; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.jfree.chart.LegendItemCollection; +import org.jfree.chart.axis.AxisSpace; +import org.jfree.chart.axis.AxisState; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.axis.ValueAxis; +import org.jfree.chart.event.PlotChangeEvent; +import org.jfree.chart.event.PlotChangeListener; +import org.jfree.chart.renderer.xy.XYItemRenderer; +import org.jfree.chart.util.ParamChecks; +import org.jfree.chart.util.ShadowGenerator; +import org.jfree.data.Range; +import org.jfree.ui.RectangleEdge; +import org.jfree.ui.RectangleInsets; +import org.jfree.util.ObjectUtilities; + +/** + * An extension of {@link XYPlot} that contains multiple subplots that share a + * common domain axis. + */ +public class CombinedDomainXYPlot extends XYPlot + implements PlotChangeListener { + + /** For serialization. */ + private static final long serialVersionUID = -7765545541261907383L; + + /** Storage for the subplot references. */ + private List subplots; + + /** The gap between subplots. */ + private double gap = 5.0; + + /** Temporary storage for the subplot areas. */ + private transient Rectangle2D[] subplotAreas; + // TODO: the subplot areas needs to be moved out of the plot into the plot + // state + + /** + * Default constructor. + */ + public CombinedDomainXYPlot() { + this(new NumberAxis()); + } + + /** + * Creates a new combined plot that shares a domain axis among multiple + * subplots. + * + * @param domainAxis the shared axis. + */ + public CombinedDomainXYPlot(ValueAxis domainAxis) { + + super(null, // no data in the parent plot + domainAxis, + null, // no range axis + null); // no renderer + + this.subplots = new java.util.ArrayList(); + + } + + /** + * Returns a string describing the type of plot. + * + * @return The type of plot. + */ + @Override + public String getPlotType() { + return "Combined_Domain_XYPlot"; + } + + /** + * Sets the orientation for the plot (also changes the orientation for all + * the subplots to match). + * + * @param orientation the orientation (<code>null</code> not allowed). + */ + @Override + public void setOrientation(PlotOrientation orientation) { + super.setOrientation(orientation); + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot plot = (XYPlot) iterator.next(); + plot.setOrientation(orientation); + } + } + + /** + * Sets the shadow generator for the plot (and all subplots) and sends + * a {@link PlotChangeEvent} to all registered listeners. + * + * @param generator the new generator (<code>null</code> permitted). + */ + @Override + public void setShadowGenerator(ShadowGenerator generator) { + setNotify(false); + super.setShadowGenerator(generator); + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot plot = (XYPlot) iterator.next(); + plot.setShadowGenerator(generator); + } + setNotify(true); + } + + /** + * Returns a range representing the extent of the data values in this plot + * (obtained from the subplots) that will be rendered against the specified + * axis. NOTE: This method is intended for internal JFreeChart use, and + * is public only so that code in the axis classes can call it. Since + * only the domain axis is shared between subplots, the JFreeChart code + * will only call this method for the domain values (although this is not + * checked/enforced). + * + * @param axis the axis. + * + * @return The range (possibly <code>null</code>). + */ + @Override + public Range getDataRange(ValueAxis axis) { + Range result = null; + if (this.subplots != null) { + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot subplot = (XYPlot) iterator.next(); + result = Range.combine(result, subplot.getDataRange(axis)); + } + } + return result; + } + + /** + * Returns the gap between subplots, measured in Java2D units. + * + * @return The gap (in Java2D units). + * + * @see #setGap(double) + */ + public double getGap() { + return this.gap; + } + + /** + * Sets the amount of space between subplots and sends a + * {@link PlotChangeEvent} to all registered listeners. + * + * @param gap the gap between subplots (in Java2D units). + * + * @see #getGap() + */ + public void setGap(double gap) { + this.gap = gap; + fireChangeEvent(); + } + + /** + * Adds a subplot (with a default 'weight' of 1) and sends a + * {@link PlotChangeEvent} to all registered listeners. + * <P> + * The domain axis for the subplot will be set to <code>null</code>. You + * must ensure that the subplot has a non-null range axis. + * + * @param subplot the subplot (<code>null</code> not permitted). + */ + public void add(XYPlot subplot) { + // defer argument checking + add(subplot, 1); + } + + /** + * Adds a subplot with the specified weight and sends a + * {@link PlotChangeEvent} to all registered listeners. The weight + * determines how much space is allocated to the subplot relative to all + * the other subplots. + * <P> + * The domain axis for the subplot will be set to <code>null</code>. You + * must ensure that the subplot has a non-null range axis. + * + * @param subplot the subplot (<code>null</code> not permitted). + * @param weight the weight (must be >= 1). + */ + public void add(XYPlot subplot, int weight) { + ParamChecks.nullNotPermitted(subplot, "subplot"); + if (weight <= 0) { + throw new IllegalArgumentException("Require weight >= 1."); + } + + // store the plot and its weight + subplot.setParent(this); + subplot.setWeight(weight); + subplot.setInsets(RectangleInsets.ZERO_INSETS, false); + subplot.setDomainAxis(null); + subplot.addChangeListener(this); + this.subplots.add(subplot); + + ValueAxis axis = getDomainAxis(); + if (axis != null) { + axis.configure(); + } + fireChangeEvent(); + } + + /** + * Removes a subplot from the combined chart and sends a + * {@link PlotChangeEvent} to all registered listeners. + * + * @param subplot the subplot (<code>null</code> not permitted). + */ + public void remove(XYPlot subplot) { + ParamChecks.nullNotPermitted(subplot, "subplot"); + int position = -1; + int size = this.subplots.size(); + int i = 0; + while (position == -1 && i < size) { + if (this.subplots.get(i) == subplot) { + position = i; + } + i++; + } + if (position != -1) { + this.subplots.remove(position); + subplot.setParent(null); + subplot.removeChangeListener(this); + ValueAxis domain = getDomainAxis(); + if (domain != null) { + domain.configure(); + } + fireChangeEvent(); + } + } + + /** + * Returns the list of subplots. The returned list may be empty, but is + * never <code>null</code>. + * + * @return An unmodifiable list of subplots. + */ + public List getSubplots() { + if (this.subplots != null) { + return Collections.unmodifiableList(this.subplots); + } + else { + return Collections.EMPTY_LIST; + } + } + + /** + * Calculates the axis space required. + * + * @param g2 the graphics device. + * @param plotArea the plot area. + * + * @return The space. + */ + @Override + protected AxisSpace calculateAxisSpace(Graphics2D g2, + Rectangle2D plotArea) { + + AxisSpace space = new AxisSpace(); + PlotOrientation orientation = getOrientation(); + + // work out the space required by the domain axis... + AxisSpace fixed = getFixedDomainAxisSpace(); + if (fixed != null) { + if (orientation == PlotOrientation.HORIZONTAL) { + space.setLeft(fixed.getLeft()); + space.setRight(fixed.getRight()); + } + else if (orientation == PlotOrientation.VERTICAL) { + space.setTop(fixed.getTop()); + space.setBottom(fixed.getBottom()); + } + } + else { + ValueAxis xAxis = getDomainAxis(); + RectangleEdge xEdge = Plot.resolveDomainAxisLocation( + getDomainAxisLocation(), orientation); + if (xAxis != null) { + space = xAxis.reserveSpace(g2, this, plotArea, xEdge, space); + } + } + + Rectangle2D adjustedPlotArea = space.shrink(plotArea, null); + + // work out the maximum height or width of the non-shared axes... + int n = this.subplots.size(); + int totalWeight = 0; + for (int i = 0; i < n; i++) { + XYPlot sub = (XYPlot) this.subplots.get(i); + totalWeight += sub.getWeight(); + } + this.subplotAreas = new Rectangle2D[n]; + double x = adjustedPlotArea.getX(); + double y = adjustedPlotArea.getY(); + double usableSize = 0.0; + if (orientation == PlotOrientation.HORIZONTAL) { + usableSize = adjustedPlotArea.getWidth() - this.gap * (n - 1); + } + else if (orientation == PlotOrientation.VERTICAL) { + usableSize = adjustedPlotArea.getHeight() - this.gap * (n - 1); + } + + for (int i = 0; i < n; i++) { + XYPlot plot = (XYPlot) this.subplots.get(i); + + // calculate sub-plot area + if (orientation == PlotOrientation.HORIZONTAL) { + double w = usableSize * plot.getWeight() / totalWeight; + this.subplotAreas[i] = new Rectangle2D.Double(x, y, w, + adjustedPlotArea.getHeight()); + x = x + w + this.gap; + } + else if (orientation == PlotOrientation.VERTICAL) { + double h = usableSize * plot.getWeight() / totalWeight; + this.subplotAreas[i] = new Rectangle2D.Double(x, y, + adjustedPlotArea.getWidth(), h); + y = y + h + this.gap; + } + + AxisSpace subSpace = plot.calculateRangeAxisSpace(g2, + this.subplotAreas[i], null); + space.ensureAtLeast(subSpace); + + } + + return space; + } + + /** + * Draws the plot within the specified area on a graphics device. + * + * @param g2 the graphics device. + * @param area the plot area (in Java2D space). + * @param anchor an anchor point in Java2D space (<code>null</code> + * permitted). + * @param parentState the state from the parent plot, if there is one + * (<code>null</code> permitted). + * @param info collects chart drawing information (<code>null</code> + * permitted). + */ + @Override + public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, + PlotState parentState, PlotRenderingInfo info) { + + // set up info collection... + if (info != null) { + info.setPlotArea(area); + } + + // adjust the drawing area for plot insets (if any)... + RectangleInsets insets = getInsets(); + insets.trim(area); + + setFixedRangeAxisSpaceForSubplots(null); + AxisSpace space = calculateAxisSpace(g2, area); + Rectangle2D dataArea = space.shrink(area, null); + + // set the width and height of non-shared axis of all sub-plots + setFixedRangeAxisSpaceForSubplots(space); + + // draw the shared axis + ValueAxis axis = getDomainAxis(); + RectangleEdge edge = getDomainAxisEdge(); + double cursor = RectangleEdge.coordinate(dataArea, edge); + AxisState axisState = axis.draw(g2, cursor, area, dataArea, edge, info); + if (parentState == null) { + parentState = new PlotState(); + } + parentState.getSharedAxisStates().put(axis, axisState); + + // draw all the subplots + for (int i = 0; i < this.subplots.size(); i++) { + XYPlot plot = (XYPlot) this.subplots.get(i); + PlotRenderingInfo subplotInfo = null; + if (info != null) { + subplotInfo = new PlotRenderingInfo(info.getOwner()); + info.addSubplotInfo(subplotInfo); + } + plot.draw(g2, this.subplotAreas[i], anchor, parentState, + subplotInfo); + } + + if (info != null) { + info.setDataArea(dataArea); + } + + } + + /** + * Returns a collection of legend items for the plot. + * + * @return The legend items. + */ + @Override + public LegendItemCollection getLegendItems() { + LegendItemCollection result = getFixedLegendItems(); + if (result == null) { + result = new LegendItemCollection(); + if (this.subplots != null) { + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot plot = (XYPlot) iterator.next(); + LegendItemCollection more = plot.getLegendItems(); + result.addAll(more); + } + } + } + return result; + } + + /** + * Multiplies the range on the range axis/axes by the specified factor. + * + * @param factor the zoom factor. + * @param info the plot rendering info (<code>null</code> not permitted). + * @param source the source point (<code>null</code> not permitted). + */ + @Override + public void zoomRangeAxes(double factor, PlotRenderingInfo info, + Point2D source) { + zoomRangeAxes(factor, info, source, false); + } + + /** + * Multiplies the range on the range axis/axes by the specified factor. + * + * @param factor the zoom factor. + * @param state the plot state. + * @param source the source point (in Java2D coordinates). + * @param useAnchor use source point as zoom anchor? + */ + @Override + public void zoomRangeAxes(double factor, PlotRenderingInfo state, + Point2D source, boolean useAnchor) { + // delegate 'state' and 'source' argument checks... + XYPlot subplot = findSubplot(state, source); + if (subplot != null) { + subplot.zoomRangeAxes(factor, state, source, useAnchor); + } + else { + // if the source point doesn't fall within a subplot, we do the + // zoom on all subplots... + Iterator iterator = getSubplots().iterator(); + while (iterator.hasNext()) { + subplot = (XYPlot) iterator.next(); + subplot.zoomRangeAxes(factor, state, source, useAnchor); + } + } + } + + /** + * Zooms in on the range axes. + * + * @param lowerPercent the lower bound. + * @param upperPercent the upper bound. + * @param info the plot rendering info (<code>null</code> not permitted). + * @param source the source point (<code>null</code> not permitted). + */ + @Override + public void zoomRangeAxes(double lowerPercent, double upperPercent, + PlotRenderingInfo info, Point2D source) { + // delegate 'info' and 'source' argument checks... + XYPlot subplot = findSubplot(info, source); + if (subplot != null) { + subplot.zoomRangeAxes(lowerPercent, upperPercent, info, source); + } + else { + // if the source point doesn't fall within a subplot, we do the + // zoom on all subplots... + Iterator iterator = getSubplots().iterator(); + while (iterator.hasNext()) { + subplot = (XYPlot) iterator.next(); + subplot.zoomRangeAxes(lowerPercent, upperPercent, info, source); + } + } + } + + /** + * Pans all range axes by the specified percentage. + * + * @param panRange the distance to pan (as a percentage of the axis length). + * @param info the plot info + * @param source the source point where the pan action started. + * + * @since 1.0.15 + */ + @Override + public void panRangeAxes(double panRange, PlotRenderingInfo info, + Point2D source) { + + XYPlot subplot = findSubplot(info, source); + if (subplot != null) { + PlotRenderingInfo subplotInfo = info.getSubplotInfo( + info.getSubplotIndex(source)); + if (subplotInfo == null) { + return; + } + + for (int i = 0; i < subplot.getRangeAxisCount(); i++) { + ValueAxis rangeAxis = subplot.getRangeAxis(i); + rangeAxis.pan(panRange); + } + } + } + + /** + * Returns the subplot (if any) that contains the (x, y) point (specified + * in Java2D space). + * + * @param info the chart rendering info (<code>null</code> not permitted). + * @param source the source point (<code>null</code> not permitted). + * + * @return A subplot (possibly <code>null</code>). + */ + public XYPlot findSubplot(PlotRenderingInfo info, Point2D source) { + ParamChecks.nullNotPermitted(info, "info"); + ParamChecks.nullNotPermitted(source, "source"); + XYPlot result = null; + int subplotIndex = info.getSubplotIndex(source); + if (subplotIndex >= 0) { + result = (XYPlot) this.subplots.get(subplotIndex); + } + return result; + } + + /** + * Sets the item renderer FOR ALL SUBPLOTS. Registered listeners are + * notified that the plot has been modified. + * <P> + * Note: usually you will want to set the renderer independently for each + * subplot, which is NOT what this method does. + * + * @param renderer the new renderer. + */ + @Override + public void setRenderer(XYItemRenderer renderer) { + super.setRenderer(renderer); // not strictly necessary, since the + // renderer set for the + // parent plot is not used + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot plot = (XYPlot) iterator.next(); + plot.setRenderer(renderer); + } + } + + /** + * Sets the fixed range axis space and sends a {@link PlotChangeEvent} to + * all registered listeners. + * + * @param space the space (<code>null</code> permitted). + */ + @Override + public void setFixedRangeAxisSpace(AxisSpace space) { + super.setFixedRangeAxisSpace(space); + setFixedRangeAxisSpaceForSubplots(space); + fireChangeEvent(); + } + + /** + * Sets the size (width or height, depending on the orientation of the + * plot) for the domain axis of each subplot. + * + * @param space the space. + */ + protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space) { + Iterator iterator = this.subplots.iterator(); + while (iterator.hasNext()) { + XYPlot plot = (XYPlot) iterator.next(); + plot.setFixedRangeAxisSpace(space, false); + } + } + + /** + * Handles a 'click' on the plot by updating the anchor values. + * + * @param x x-coordinate, where the click occured. + * @param y y-coordinate, where the click occured. + * @param info object containing information about the plot dimensions. + */ + @Override + public void handleClick(int x, int y, PlotRenderingInfo info) { + Rectangle2D dataArea = info.getDataArea(); + if (dataArea.contains(x, y)) { + for (int i = 0; i < this.subplots.size(); i++) { + XYPlot subplot = (XYPlot) this.subplots.get(i); + PlotRenderingInfo subplotInfo = info.getSubplotInfo(i); + subplot.handleClick(x, y, subplotInfo); + } + } + } + + /** + * Receives a {@link PlotChangeEvent} and responds by notifying all + * listeners. + * + * @param event the event. + */ + @Override + public void plotChanged(PlotChangeEvent event) { + notifyListeners(event); + } + + /** + * Tests this plot for equality with another object. + * + * @param obj the other object. + * + * @return <code>true</code> or <code>false</code>. + */ + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof CombinedDomainXYPlot)) { + return false; + } + CombinedDomainXYPlot that = (CombinedDomainXYPlot) obj; + if (this.gap != that.gap) { + return false; + } + if (!ObjectUtilities.equal(this.subplots, that.subplots)) { + return false; + } + return super.equals(obj); + } + + /** + * Returns a clone of the annotation. + * + * @return A clone. + * + * @throws CloneNotSupportedException this class will not throw this + * exception, but subclasses (if any) might. + */ + @Override + public Object clone() throws CloneNotSupportedException { + + CombinedDomainXYPlot result = (CombinedDomainXYPlot) super.clone(); + result.subplots = (List) ObjectUtilities.deepClone(this.subplots); + for (Iterator it = result.subplots.iterator(); it.hasNext();) { + Plot child = (Plot) it.next(); + child.setParent(result); + } + + // after setting up all the subplots, the shared domain axis may need + // reconfiguring + ValueAxis domainAxis = result.getDomainAxis(); + if (domainAxis != null) { + domainAxis.configure(); + } + + return result; + + } + +} Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedRangeCategoryPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedRangeCategoryPlot.java 2014-07-01 10:26:37 UTC (rev 3210) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedRangeCategoryPlot.java 2014-07-01 10:29:29 UTC (rev 3211) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------------ * CombinedRangeCategoryPlot.java * ------------------------------ - * (C) Copyright 2003-2013, by Object Refinery Limited. + * (C) Copyright 2003-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Nicolas Brodu; @@ -163,7 +163,7 @@ * axis for the subplot will be set to <code>null</code>. * * @param subplot the subplot (<code>null</code> not permitted). - * @param weight the weight (must be >= 1). + * @param weight the weight (must be >= 1). */ public void add(CategoryPlot subplot, int weight) { ParamChecks.nullNotPermitted(subplot, "subplot"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:26:39
|
Revision: 3210 http://sourceforge.net/p/jfreechart/code/3210 Author: mungady Date: 2014-07-01 10:26:37 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialPlot.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialTextAnnotation.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialPlot.java 2014-07-01 10:25:38 UTC (rev 3209) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialPlot.java 2014-07-01 10:26:37 UTC (rev 3210) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------- * DialPlot.java * ------------- - * (C) Copyright 2006-2013, by Object Refinery Limited. + * (C) Copyright 2006-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -73,7 +73,7 @@ * program included in the JFreeChart Demo Collection: * <br><br> * <img src="../../../../../images/DialPlotSample.png" - * alt="DialPlotSample.png" /> + * alt="DialPlotSample.png"> * * @since 1.0.7 */ @@ -700,8 +700,8 @@ /** * A utility method that computes a rectangle using relative radius values. * - * @param rect the reference rectangle (<code>null</code> not permitted). - * @param radiusW the width radius (must be > 0.0) + * @param rect the reference rectangle ({@code null} not permitted). + * @param radiusW the width radius (must be > 0.0) * @param radiusH the height radius. * * @return A new rectangle. Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialTextAnnotation.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialTextAnnotation.java 2014-07-01 10:25:38 UTC (rev 3209) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/dial/DialTextAnnotation.java 2014-07-01 10:26:37 UTC (rev 3210) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ----------------------- * DialTextAnnotation.java * ----------------------- - * (C) Copyright 2006-2013, by Object Refinery Limited. + * (C) Copyright 2006-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -114,7 +114,7 @@ /** * Returns the label text. * - * @return The label text (never <code>null</code). + * @return The label text (never {@code null}). * * @see #setLabel(String) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:25:40
|
Revision: 3209 http://sourceforge.net/p/jfreechart/code/3209 Author: mungady Date: 2014-07-01 10:25:38 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix SONAR warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java 2014-07-01 10:25:21 UTC (rev 3208) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java 2014-07-01 10:25:38 UTC (rev 3209) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------------------- * BoxAndWhiskerRenderer.java * -------------------------- - * (C) Copyright 2003-2013, by David Browning and Contributors. + * (C) Copyright 2003-2014, by David Browning and Contributors. * * Original Author: David Browning (for the Australian Institute of Marine * Science); @@ -135,7 +135,7 @@ * JFreeChart Demo Collection: * <br><br> * <img src="../../../../../images/BoxAndWhiskerRendererSample.png" - * alt="BoxAndWhiskerRendererSample.png" /> + * alt="BoxAndWhiskerRendererSample.png"> */ public class BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:25:23
|
Revision: 3208 http://sourceforge.net/p/jfreechart/code/3208 Author: mungady Date: 2014-07-01 10:25:21 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix SONAR warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/TimeSeriesURLGenerator.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/TimeSeriesURLGenerator.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/TimeSeriesURLGenerator.java 2014-07-01 10:24:14 UTC (rev 3207) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/urls/TimeSeriesURLGenerator.java 2014-07-01 10:25:21 UTC (rev 3208) @@ -52,10 +52,12 @@ package org.jfree.chart.urls; import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.text.DateFormat; import java.util.Date; + import org.jfree.chart.util.ParamChecks; - import org.jfree.data.xy.XYDataset; /** @@ -165,20 +167,28 @@ @Override public String generateURL(XYDataset dataset, int series, int item) { String result = this.prefix; - boolean firstParameter = result.indexOf("?") == -1; + boolean firstParameter = !result.contains("?"); Comparable seriesKey = dataset.getSeriesKey(series); if (seriesKey != null) { result += firstParameter ? "?" : "&"; - result += this.seriesParameterName + "=" + URLUtilities.encode( - seriesKey.toString(), "UTF-8"); + try { + result += this.seriesParameterName + "=" + URLEncoder.encode( + seriesKey.toString(), "UTF-8"); + } catch (UnsupportedEncodingException ex) { + throw new RuntimeException(ex); + } firstParameter = false; } long x = (long) dataset.getXValue(series, item); String xValue = this.dateFormat.format(new Date(x)); result += firstParameter ? "?" : "&"; - result += this.itemParameterName + "=" + URLUtilities.encode(xValue, - "UTF-8"); + try { + result += this.itemParameterName + "=" + URLEncoder.encode(xValue, + "UTF-8"); + } catch (UnsupportedEncodingException ex) { + throw new RuntimeException(ex); + } return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:24:17
|
Revision: 3207 http://sourceforge.net/p/jfreechart/code/3207 Author: mungady Date: 2014-07-01 10:24:14 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/WaterfallBarRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/WaterfallBarRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/WaterfallBarRenderer.java 2014-07-01 10:23:53 UTC (rev 3206) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/WaterfallBarRenderer.java 2014-07-01 10:24:14 UTC (rev 3207) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------- * WaterfallBarRenderer.java * ------------------------- - * (C) Copyright 2003-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2003-2014, by Object Refinery Limited and Contributors. * * Original Author: Darshan Shah; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -103,7 +103,7 @@ * Demo Collection: * <br><br> * <img src="../../../../../images/WaterfallBarRendererSample.png" - * alt="WaterfallBarRendererSample.png" /> + * alt="WaterfallBarRendererSample.png"> */ public class WaterfallBarRenderer extends BarRenderer { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:23:59
|
Revision: 3206 http://sourceforge.net/p/jfreechart/code/3206 Author: mungady Date: 2014-07-01 10:23:53 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedBarRenderer3D.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedBarRenderer3D.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedBarRenderer3D.java 2014-07-01 10:23:33 UTC (rev 3205) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedBarRenderer3D.java 2014-07-01 10:23:53 UTC (rev 3206) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------------- * StackedBarRenderer3D.java * ------------------------- - * (C) Copyright 2000-2013, by Serge V. Grachov and Contributors. + * (C) Copyright 2000-2014, by Serge V. Grachov and Contributors. * * Original Author: Serge V. Grachov; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -125,7 +125,7 @@ * JFreeChart Demo Collection: * <br><br> * <img src="../../../../../images/StackedBarRenderer3DSample.png" - * alt="StackedBarRenderer3DSample.png" /> + * alt="StackedBarRenderer3DSample.png"> */ public class StackedBarRenderer3D extends BarRenderer3D implements Cloneable, PublicCloneable, Serializable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:23:36
|
Revision: 3205 http://sourceforge.net/p/jfreechart/code/3205 Author: mungady Date: 2014-07-01 10:23:33 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LevelRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LevelRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LevelRenderer.java 2014-07-01 10:22:24 UTC (rev 3204) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LevelRenderer.java 2014-07-01 10:23:33 UTC (rev 3205) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------ * LevelRenderer.java * ------------------ - * (C) Copyright 2004-2009, by Object Refinery Limited. + * (C) Copyright 2004-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Peter Kolb (patch 2511330); @@ -79,7 +79,7 @@ * Demo Collection: * <br><br> * <img src="../../../../../images/LevelRendererSample.png" - * alt="LevelRendererSample.png" /> + * alt="LevelRendererSample.png"> */ public class LevelRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:22:32
|
Revision: 3204 http://sourceforge.net/p/jfreechart/code/3204 Author: mungady Date: 2014-07-01 10:22:24 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/MeterPlot.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/MeterPlot.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/MeterPlot.java 2014-07-01 10:21:57 UTC (rev 3203) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/MeterPlot.java 2014-07-01 10:22:24 UTC (rev 3204) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------- * MeterPlot.java * -------------- - * (C) Copyright 2000-2013, by Hari and Contributors. + * (C) Copyright 2000-2014, by Hari and Contributors. * * Original Author: Hari (ou...@ho...); * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -357,7 +357,7 @@ * Sets the tick size and sends a {@link PlotChangeEvent} to all * registered listeners. * - * @param size the tick size (must be > 0). + * @param size the tick size (must be > 0). * * @see #getTickSize() */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:22:05
|
Revision: 3203 http://sourceforge.net/p/jfreechart/code/3203 Author: mungady Date: 2014-07-01 10:21:57 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/Crosshair.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/Crosshair.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/Crosshair.java 2014-07-01 10:18:37 UTC (rev 3202) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/Crosshair.java 2014-07-01 10:21:57 UTC (rev 3203) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------- * Crosshair.java * -------------- - * (C) Copyright 2009-2013, by Object Refinery Limited. + * (C) Copyright 2009-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -657,7 +657,8 @@ * * @return An independent copy of this instance. * - * @throws java.lang.CloneNotSupportedException + * @throws java.lang.CloneNotSupportedException if there is a problem with + * cloning. */ @Override public Object clone() throws CloneNotSupportedException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:18:45
|
Revision: 3202 http://sourceforge.net/p/jfreechart/code/3202 Author: mungady Date: 2014-07-01 10:18:37 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/servlet/DisplayChart.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/servlet/DisplayChart.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/servlet/DisplayChart.java 2014-07-01 10:17:39 UTC (rev 3201) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/servlet/DisplayChart.java 2014-07-01 10:18:37 UTC (rev 3202) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ----------------- * DisplayChart.java * ----------------- - * (C) Copyright 2002-2013, by Richard Atkinson and Contributors. + * (C) Copyright 2002-2014, by Richard Atkinson and Contributors. * * Original Author: Richard Atkinson; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -58,16 +58,17 @@ * Servlet used for streaming charts to the client browser from the temporary * directory. You need to add this servlet and mapping to your deployment * descriptor (web.xml) in order to get it to work. The syntax is as follows: - * <xmp> - * <servlet> - * <servlet-name>DisplayChart</servlet-name> - * <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> - * </servlet> - * <servlet-mapping> - * <servlet-name>DisplayChart</servlet-name> - * <url-pattern>/servlet/DisplayChart</url-pattern> - * </servlet-mapping> - * </xmp> + * + * <xmp> + * <servlet> + * <servlet-name>DisplayChart</servlet-name> + * <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> + * </servlet> + * <servlet-mapping> + * <servlet-name>DisplayChart</servlet-name> + * <url-pattern>/servlet/DisplayChart</url-pattern> + * </servlet-mapping> + * </xmp> */ public class DisplayChart extends HttpServlet { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:17:49
|
Revision: 3201 http://sourceforge.net/p/jfreechart/code/3201 Author: mungady Date: 2014-07-01 10:17:39 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/DirectionalGradientPaintTransformer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/DirectionalGradientPaintTransformer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/DirectionalGradientPaintTransformer.java 2014-07-01 10:15:41 UTC (rev 3200) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/util/DirectionalGradientPaintTransformer.java 2014-07-01 10:17:39 UTC (rev 3201) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ---------------------------------------- * DirectionalGradientPaintTransformer.java * ---------------------------------------- - * (C) Copyright 2013 by Peter Kolb and Contributors. + * (C) Copyright 2013-2014 by Peter Kolb and Contributors. * * Original Author: Peter Kolb; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -49,7 +49,7 @@ * Transforms a <code>GradientPaint</code> to range over the width of a target * shape. The orientation of the resulting <code>GradientPaint</code> * depend on the coordinates of the original paint: - * <p> + * * <ul> * <li> If the original paint starts at 0,0 and ends at a point 0, y != 0, * the resulting paint will have a vertical orientation. @@ -64,9 +64,8 @@ * the upper right edge. Lines of equal color will have a 45 ∞ angle, * pointing downwards from left to right. * </ul> - * <p> - * In all cases, the cyclic flag of the original paint will be taken into - * account. + * <p>In all cases, the cyclic flag of the original paint will be taken into + * account.</p> * * @author Peter Kolb * @since 1.0.17 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:15:44
|
Revision: 3200 http://sourceforge.net/p/jfreechart/code/3200 Author: mungady Date: 2014-07-01 10:15:41 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/Series.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/Series.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/Series.java 2014-07-01 10:14:32 UTC (rev 3199) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/Series.java 2014-07-01 10:15:41 UTC (rev 3200) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ----------- * Series.java * ----------- - * (C) Copyright 2001-2013, by Object Refinery Limited. + * (C) Copyright 2001-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -412,6 +412,8 @@ * @param property the property key. * @param oldValue the old value. * @param newValue the new value. + * + * @throws PropertyVetoException if the change was vetoed. */ protected void fireVetoableChange(String property, Object oldValue, Object newValue) throws PropertyVetoException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:14:35
|
Revision: 3199 http://sourceforge.net/p/jfreechart/code/3199 Author: mungady Date: 2014-07-01 10:14:32 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/function/NormalDistributionFunction2D.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/function/NormalDistributionFunction2D.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/function/NormalDistributionFunction2D.java 2014-07-01 10:14:05 UTC (rev 3198) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/function/NormalDistributionFunction2D.java 2014-07-01 10:14:32 UTC (rev 3199) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * --------------------------------- * NormalDistributionFunction2D.java * --------------------------------- - * (C)opyright 2004-2009, by Object Refinery Limited. + * (C)opyright 2004-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -71,7 +71,7 @@ * Constructs a new normal distribution function. * * @param mean the mean. - * @param std the standard deviation (> 0). + * @param std the standard deviation (> 0). */ public NormalDistributionFunction2D(double mean, double std) { if (std <= 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-07-01 10:14:10
|
Revision: 3198 http://sourceforge.net/p/jfreechart/code/3198 Author: mungady Date: 2014-07-01 10:14:05 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Fix Javadoc warnings. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/DatasetUtilities.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/DatasetUtilities.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/DatasetUtilities.java 2014-07-01 10:11:26 UTC (rev 3197) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/general/DatasetUtilities.java 2014-07-01 10:14:05 UTC (rev 3198) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * --------------------- * DatasetUtilities.java * --------------------- - * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Andrzej Porebski (bug fix); @@ -490,7 +490,7 @@ * @param f the function (<code>null</code> not permitted). * @param start the start value for the range. * @param end the end value for the range. - * @param samples the number of sample points (must be > 1). + * @param samples the number of sample points (must be > 1). * @param seriesKey the key to give the resulting series * (<code>null</code> not permitted). * @@ -513,7 +513,7 @@ * @param f the function (<code>null</code> not permitted). * @param start the start value for the range. * @param end the end value for the range. - * @param samples the number of sample points (must be > 1). + * @param samples the number of sample points (must be > 1). * @param seriesKey the key to give the resulting series * (<code>null</code> not permitted). * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |