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...> - 2015-09-10 04:45:52
|
Revision: 3324 http://sourceforge.net/p/jfreechart/code/3324 Author: mungady Date: 2015-09-10 04:45:49 +0000 (Thu, 10 Sep 2015) Log Message: ----------- 2015-09-10 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/xy/YIntervalRenderer.java (drawItem): Check item visibility and enlarge entity bounds. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java 2015-09-10 04:00:37 UTC (rev 3323) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java 2015-09-10 04:45:49 UTC (rev 3324) @@ -242,9 +242,10 @@ } // add an entity for the item... - if (entities != null) { - addEntity(entities, line.getBounds(), dataset, series, item, 0.0, - 0.0); + Shape hotspot = ShapeUtilities.createLineRegion(line, 4.0f); + if (entities != null && hotspot.intersects(dataArea)) { + addEntity(entities, hotspot, dataset, series, item, xx, + (yyHigh + yyLow) / 2); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-10 04:00:40
|
Revision: 3323 http://sourceforge.net/p/jfreechart/code/3323 Author: mungady Date: 2015-09-10 04:00:37 +0000 (Thu, 10 Sep 2015) Log Message: ----------- 2015-09-10 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/xy/YIntervalRenderer.java (drawItem): Check item visibility. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2015-09-09 20:02:13 UTC (rev 3322) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2015-09-10 04:00:37 UTC (rev 3323) @@ -1,3 +1,8 @@ +2015-09-10 David Gilbert <dav...@ob...> + + * org/jfree/chart/renderer/xy/YIntervalRenderer.java + (drawItem): Check item visibility. + 2015-09-09 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/xy/XYShapeRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java 2015-09-09 20:02:13 UTC (rev 3322) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/YIntervalRenderer.java 2015-09-10 04:00:37 UTC (rev 3323) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ---------------------- * YIntervalRenderer.java * ---------------------- - * (C) Copyright 2002-2014, by Object Refinery Limited. + * (C) Copyright 2002-2015, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -81,7 +81,7 @@ /** * A renderer that draws a line connecting the start and end Y values for an * {@link XYPlot}. The example shown here is generated by the - * <code>YIntervalRendererDemo1.java</code> program included in the JFreeChart + * {@code YIntervalRendererDemo1.java} program included in the JFreeChart * demo collection: * <br><br> * <img src="../../../../../images/YIntervalRendererSample.png" @@ -114,7 +114,7 @@ * Returns the generator for the item labels that appear near the lower * y-value. * - * @return The generator (possibly <code>null</code>). + * @return The generator (possibly {@code null}). * * @see #setAdditionalItemLabelGenerator(XYItemLabelGenerator) * @@ -127,10 +127,10 @@ /** * Sets the generator for the item labels that appear near the lower * y-value and sends a {@link RendererChangeEvent} to all registered - * listeners. If this is set to <code>null</code>, no item labels will be + * listeners. If this is set to {@code null}, no item labels will be * drawn. * - * @param generator the generator (<code>null</code> permitted). + * @param generator the generator ({@code null} permitted). * * @see #getAdditionalItemLabelGenerator() * @@ -146,10 +146,9 @@ * Returns the range of values the renderer requires to display all the * items from the specified dataset. * - * @param dataset the dataset (<code>null</code> permitted). + * @param dataset the dataset ({@code null} permitted). * - * @return The range (<code>null</code> if the dataset is <code>null</code> - * or empty). + * @return The range ({@code null} if the dataset is {@code null} or empty). */ @Override public Range findRangeBounds(XYDataset dataset) { @@ -171,7 +170,7 @@ * @param series the series index (zero-based). * @param item the item index (zero-based). * @param crosshairState crosshair information for the plot - * (<code>null</code> permitted). + * ({@code null} permitted). * @param pass the pass index (ignored here). */ @Override @@ -180,6 +179,11 @@ ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { + // do nothing if item is not visible + if (!getItemVisible(series, item)) { + return; + } + // setup for collecting optional entity info... EntityCollection entities = null; if (info != null) { @@ -283,7 +287,7 @@ /** * Tests this renderer for equality with an arbitrary object. * - * @param obj the object (<code>null</code> permitted). + * @param obj the object ({@code null} permitted). * * @return A boolean. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 20:02:15
|
Revision: 3322 http://sourceforge.net/p/jfreechart/code/3322 Author: mungady Date: 2015-09-09 20:02:13 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Update JFreeSVG to 3.0 Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ant/build-fx.xml branches/jfreechart-1.0.x-branch/ant/build.xml Modified: branches/jfreechart-1.0.x-branch/ant/build-fx.xml =================================================================== --- branches/jfreechart-1.0.x-branch/ant/build-fx.xml 2015-09-09 20:01:24 UTC (rev 3321) +++ branches/jfreechart-1.0.x-branch/ant/build-fx.xml 2015-09-09 20:02:13 UTC (rev 3322) @@ -25,7 +25,7 @@ <property name="jcommon.version" value="1.0.23" /> <property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/> <property name="jfreesvg.name" value="jfreesvg" /> - <property name="jfreesvg.version" value="2.1" /> + <property name="jfreesvg.version" value="3.0" /> <property name="orsonpdf.name" value="orsonpdf" /> <property name="orsonpdf.version" value="1.6-eval" /> <property name="orsoncharts.version" value="1.4-eval" /> Modified: branches/jfreechart-1.0.x-branch/ant/build.xml =================================================================== --- branches/jfreechart-1.0.x-branch/ant/build.xml 2015-09-09 20:01:24 UTC (rev 3321) +++ branches/jfreechart-1.0.x-branch/ant/build.xml 2015-09-09 20:02:13 UTC (rev 3322) @@ -25,7 +25,7 @@ <property name="jcommon.version" value="1.0.23" /> <property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/> <property name="jfreesvg.name" value="jfreesvg" /> - <property name="jfreesvg.version" value="2.1" /> + <property name="jfreesvg.version" value="3.0" /> <property name="orsonpdf.name" value="orsonpdf" /> <property name="orsonpdf.version" value="1.6-eval" /> <property name="orsoncharts.version" value="1.4-eval-nofx" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 20:01:27
|
Revision: 3321 http://sourceforge.net/p/jfreechart/code/3321 Author: mungady Date: 2015-09-09 20:01:24 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Update JFreeSVG to 3.0 Removed Paths: ------------- branches/jfreechart-1.0.x-branch/lib/jfreesvg-2.1.jar Deleted: branches/jfreechart-1.0.x-branch/lib/jfreesvg-2.1.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 20:01:06
|
Revision: 3320 http://sourceforge.net/p/jfreechart/code/3320 Author: mungady Date: 2015-09-09 20:01:05 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Update JFreeSVG to 3.0 Added Paths: ----------- branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar Added: branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar =================================================================== (Binary files differ) Index: branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar =================================================================== --- branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar 2015-09-09 19:41:10 UTC (rev 3319) +++ branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar 2015-09-09 20:01:05 UTC (rev 3320) Property changes on: branches/jfreechart-1.0.x-branch/lib/jfreesvg-3.0.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:41:13
|
Revision: 3319 http://sourceforge.net/p/jfreechart/code/3319 Author: mungady Date: 2015-09-09 19:41:10 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONObject.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONObject.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONObject.java 2015-09-09 19:38:47 UTC (rev 3318) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONObject.java 2015-09-09 19:41:10 UTC (rev 3319) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -44,7 +44,7 @@ * <code>JSONAware</code> or <code>JSONStreamAware</code> specific * behaviours will be ignored at this top level. * - * @see com.orsoncharts.util.json.JSONValue#writeJSONString(Object, Writer) + * @see org.jfree.data.json.impl.JSONValue#writeJSONString(Object, Writer) * * @param map the map to write (<code>null</code> permitted). * @param out the output writer (<code>null</code> not permitted). @@ -94,7 +94,7 @@ * If this map is also a {@link JSONAware}, <code>JSONAware</code> specific * behaviours will be omitted at this top level. * - * @see com.orsoncharts.util.json.JSONValue#toJSONString(Object) + * @see org.jfree.data.json.impl.JSONValue#toJSONString(Object) * * @param map the map (<code>null</code> permitted). * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:38:50
|
Revision: 3318 http://sourceforge.net/p/jfreechart/code/3318 Author: mungady Date: 2015-09-09 19:38:47 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONValue.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java 2015-09-09 19:35:21 UTC (rev 3317) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java 2015-09-09 19:38:47 UTC (rev 3318) @@ -49,7 +49,7 @@ * <code>JSONStreamAware</code> and <code>JSONAware</code> specific * behaviours will be ignored at this top level. * - * @see org.jfree.data.json.JSONValue#writeJSONString(Object, Writer) + * @see org.jfree.data.json.impl.JSONValue#writeJSONString(Object, Writer) * * @param list the list (<code>null</code> permitted). * @param out the output writer (<code>null</code> not permitted). @@ -101,7 +101,7 @@ * If this list is also a {@link JSONAware}, {@link JSONAware} specific * behaviours will be omitted at this top level. * - * @see org.jfree.data.json.JSONValue#toJSONString(Object) + * @see org.jfree.data.json.impl.JSONValue#toJSONString(Object) * * @param list the list (<code>null</code> permitted). * Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONValue.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONValue.java 2015-09-09 19:35:21 UTC (rev 3317) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONValue.java 2015-09-09 19:38:47 UTC (rev 3318) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -125,8 +125,8 @@ * "this" as the first parameter, use JSONObject.writeJSONString(Map, * Writer) or JSONArray.writeJSONString(List, Writer) instead. * - * @see com.orsoncharts.util.json.JSONObject#writeJSONString(Map, Writer) - * @see com.orsoncharts.util.json.JSONArray#writeJSONString(List, Writer) + * @see org.jfree.data.json.impl.JSONObject#writeJSONString(Map, Writer) + * @see org.jfree.data.json.impl.JSONArray#writeJSONString(List, Writer) * * @param value the value. * @param out the output writer. @@ -210,8 +210,8 @@ * "this" as the parameter, use JSONObject.toJSONString(Map) or * JSONArray.toJSONString(List) instead. * - * @see com.orsoncharts.util.json.JSONObject#toJSONString(Map) - * @see com.orsoncharts.util.json.JSONArray#toJSONString(List) + * @see org.jfree.data.json.impl.JSONObject#toJSONString(Map) + * @see org.jfree.data.json.impl.JSONArray#toJSONString(List) * * @param value the value. * @return JSON text, or "null" if value is null or it's an NaN or an INF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:35:23
|
Revision: 3317 http://sourceforge.net/p/jfreechart/code/3317 Author: mungady Date: 2015-09-09 19:35:21 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java 2015-09-09 19:32:19 UTC (rev 3316) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/impl/JSONArray.java 2015-09-09 19:35:21 UTC (rev 3317) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -49,7 +49,7 @@ * <code>JSONStreamAware</code> and <code>JSONAware</code> specific * behaviours will be ignored at this top level. * - * @see com.orsoncharts.util.json.JSONValue#writeJSONString(Object, Writer) + * @see org.jfree.data.json.JSONValue#writeJSONString(Object, Writer) * * @param list the list (<code>null</code> permitted). * @param out the output writer (<code>null</code> not permitted). @@ -101,7 +101,7 @@ * If this list is also a {@link JSONAware}, {@link JSONAware} specific * behaviours will be omitted at this top level. * - * @see com.orsoncharts.util.json.JSONValue#toJSONString(Object) + * @see org.jfree.data.json.JSONValue#toJSONString(Object) * * @param list the list (<code>null</code> permitted). * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:32:22
|
Revision: 3316 http://sourceforge.net/p/jfreechart/code/3316 Author: mungady Date: 2015-09-09 19:32:19 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/JSONUtils.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/JSONUtils.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/JSONUtils.java 2015-09-09 19:30:49 UTC (rev 3315) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/json/JSONUtils.java 2015-09-09 19:32:19 UTC (rev 3316) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -120,7 +120,7 @@ * Returns a string containing the data in JSON format. The format is... * <br><br> * Note that this method can be used with instances of - * {@link CategorDataset}. + * {@link CategoryDataset}. * * @param data the data ({@code null} not permitted). * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:30:52
|
Revision: 3315 http://sourceforge.net/p/jfreechart/code/3315 Author: mungady Date: 2015-09-09 19:30:49 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java 2015-09-09 19:28:51 UTC (rev 3314) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java 2015-09-09 19:30:49 UTC (rev 3315) @@ -487,7 +487,7 @@ * Returns the flag that controls whether or not rendering hints * ({@link ChartHints#KEY_BEGIN_ELEMENT} and * {@link ChartHints#KEY_END_ELEMENT}) that identify chart elements are - * added during rendering. The default value is {@link false}. + * added during rendering. The default value is {@code false}. * * @return A boolean. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:28:54
|
Revision: 3314 http://sourceforge.net/p/jfreechart/code/3314 Author: mungady Date: 2015-09-09 19:28:51 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValues2DItemKey.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValues2DItemKey.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValues2DItemKey.java 2015-09-09 19:26:15 UTC (rev 3313) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValues2DItemKey.java 2015-09-09 19:28:51 UTC (rev 3314) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -45,7 +45,7 @@ import org.jfree.util.ObjectUtilities; /** - * An object that references one data item in a {@link KeyedValues3D} data + * An object that references one data item in a {@link KeyedValues2D} data * structure. Instances of this class are immutable (subject to the caller * using series, row and column keys that are immutable). * @@ -64,8 +64,8 @@ /** * Creates a new instance. * - * @param rowKey the row key (<code>null</code> not permitted). - * @param columnKey the column key (<code>null</code> not permitted). + * @param rowKey the row key ({@code null} not permitted). + * @param columnKey the column key ({@code null} not permitted). */ public KeyedValues2DItemKey(R rowKey, C columnKey) { ParamChecks.nullNotPermitted(rowKey, "rowKey"); @@ -77,7 +77,7 @@ /** * Returns the row key. * - * @return The row key (never <code>null</code>). + * @return The row key (never {@code null}). */ public R getRowKey() { return this.rowKey; @@ -86,7 +86,7 @@ /** * Returns the column key. * - * @return The column key (never <code>null</code>). + * @return The column key (never {@code null}). */ public C getColumnKey() { return this.columnKey; @@ -104,7 +104,7 @@ /** * Tests this key for equality with an arbitrary object. * - * @param obj the object (<code>null</code> permitted). + * @param obj the object ({@code null} permitted). * * @return A boolean. */ @@ -154,5 +154,4 @@ return sb.toString(); } -} - +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 19:26:18
|
Revision: 3313 http://sourceforge.net/p/jfreechart/code/3313 Author: mungady Date: 2015-09-09 19:26:15 +0000 (Wed, 09 Sep 2015) Log Message: ----------- Javadoc fix Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java 2015-09-09 17:26:30 UTC (rev 3312) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/JFreeChart.java 2015-09-09 19:26:15 UTC (rev 3313) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -291,7 +291,7 @@ /** * Rendering hints that will be used for chart drawing. This should never - * be <code>null</code>. + * be {@code null}. */ private transient RenderingHints renderingHints; @@ -378,8 +378,8 @@ * of static methods that will return ready-made charts, and often this * is a more convenient way to create charts than using this constructor. * - * @param title the chart title (<code>null</code> permitted). - * @param plot the plot (<code>null</code> not permitted). + * @param title the chart title ({@code null} permitted). + * @param plot the plot ({@code null} not permitted). */ public JFreeChart(String title, Plot plot) { this(title, JFreeChart.DEFAULT_TITLE_FONT, plot, true); @@ -387,18 +387,18 @@ /** * Creates a new chart with the given title and plot. The - * <code>createLegend</code> argument specifies whether or not a legend + * {@code createLegend} argument specifies whether or not a legend * should be added to the chart. * <br><br> * Note that the {@link ChartFactory} class contains a range * of static methods that will return ready-made charts, and often this * is a more convenient way to create charts than using this constructor. * - * @param title the chart title (<code>null</code> permitted). + * @param title the chart title ({@code null} permitted). * @param titleFont the font for displaying the chart title - * (<code>null</code> permitted). + * ({@code null} permitted). * @param plot controller of the visual representation of the data - * (<code>null</code> not permitted). + * ({@code null} not permitted). * @param createLegend a flag indicating whether or not a legend should * be created for the chart. */ @@ -613,7 +613,7 @@ /** * Returns the padding between the chart border and the chart drawing area. * - * @return The padding (never <code>null</code>). + * @return The padding (never {@code null}). * * @see #setPadding(RectangleInsets) */ @@ -641,7 +641,7 @@ * the main title. However, multiple titles are supported - see the * {@link #addSubtitle(Title)} method. * - * @return The chart title (possibly <code>null</code>). + * @return The chart title (possibly {@code null}). * * @see #setTitle(TextTitle) */ @@ -652,10 +652,10 @@ /** * Sets the main title for the chart and sends a {@link ChartChangeEvent} * to all registered listeners. If you do not want a title for the - * chart, set it to <code>null</code>. If you want more than one title on + * chart, set it to {@code null}. If you want more than one title on * a chart, use the {@link #addSubtitle(Title)} method. * - * @param title the title (<code>null</code> permitted). + * @param title the title ({@code null} permitted). * * @see #getTitle() */ @@ -675,10 +675,10 @@ * registered listeners. This is a convenience method that ends up calling * the {@link #setTitle(TextTitle)} method. If there is an existing title, * its text is updated, otherwise a new title using the default font is - * added to the chart. If <code>text</code> is <code>null</code> the chart - * title is set to <code>null</code>. + * added to the chart. If {@code text} is {@code null} the chart + * title is set to {@code null}. * - * @param text the title text (<code>null</code> permitted). + * @param text the title text ({@code null} permitted). * * @see #getTitle() */ @@ -686,8 +686,7 @@ if (text != null) { if (this.title == null) { setTitle(new TextTitle(text, JFreeChart.DEFAULT_TITLE_FONT)); - } - else { + } else { this.title.setText(text); } } @@ -700,7 +699,7 @@ * Adds a legend to the plot and sends a {@link ChartChangeEvent} to all * registered listeners. * - * @param legend the legend (<code>null</code> not permitted). + * @param legend the legend ({@code null} not permitted). * * @see #removeLegend() */ @@ -721,11 +720,11 @@ } /** - * Returns the nth legend for a chart, or <code>null</code>. + * Returns the nth legend for a chart, or {@code null}. * * @param index the legend index (zero-based). * - * @return The legend (possibly <code>null</code>). + * @return The legend (possibly {@code null}). * * @see #addLegend(LegendTitle) */ @@ -759,7 +758,7 @@ /** * Returns the list of subtitles for the chart. * - * @return The subtitle list (possibly empty, but never <code>null</code>). + * @return The subtitle list (possibly empty, but never {@code null}). * * @see #setSubtitles(List) */ @@ -824,7 +823,7 @@ * Adds a chart subtitle, and notifies registered listeners that the chart * has been modified. * - * @param subtitle the subtitle (<code>null</code> not permitted). + * @param subtitle the subtitle ({@code null} not permitted). * * @see #getSubtitle(int) */ @@ -899,7 +898,7 @@ * Returns the plot cast as a {@link CategoryPlot}. * <p> * NOTE: if the plot is not an instance of {@link CategoryPlot}, then a - * <code>ClassCastException</code> is thrown. + * {@code ClassCastException} is thrown. * * @return The plot. * @@ -957,7 +956,7 @@ * Returns the current value stored in the rendering hints table for * {@link RenderingHints#KEY_TEXT_ANTIALIASING}. * - * @return The hint value (possibly <code>null</code>). + * @return The hint value (possibly {@code null}). * * @since 1.0.5 * @@ -995,7 +994,7 @@ * {@link RenderingHints#KEY_TEXT_ANTIALIASING} and sends a * {@link ChartChangeEvent} to all registered listeners. * - * @param val the new value (<code>null</code> permitted). + * @param val the new value ({@code null} permitted). * * @since 1.0.5 * @@ -1022,7 +1021,7 @@ * Sets the paint used to fill the chart background and sends a * {@link ChartChangeEvent} to all registered listeners. * - * @param paint the paint (<code>null</code> permitted). + * @param paint the paint ({@code null} permitted). * * @see #getBackgroundPaint() */ @@ -1044,10 +1043,10 @@ } /** - * Returns the background image for the chart, or <code>null</code> if + * Returns the background image for the chart, or {@code null} if * there is no image. * - * @return The image (possibly <code>null</code>). + * @return The image (possibly {@code null}). * * @see #setBackgroundImage(Image) */ @@ -1082,7 +1081,7 @@ /** * Returns the background image alignment. Alignment constants are defined - * in the <code>org.jfree.ui.Align</code> class in the JCommon class + * in the {@code org.jfree.ui.Align} class in the JCommon class * library. * * @return The alignment. @@ -1128,12 +1127,10 @@ * @see #getBackgroundImageAlpha() */ public void setBackgroundImageAlpha(float alpha) { - if (this.backgroundImageAlpha != alpha) { this.backgroundImageAlpha = alpha; fireChartChanged(); } - } /** @@ -1354,14 +1351,14 @@ * right of the specified area, and the area should be updated to reflect * the amount of space used by the title. * - * @param t the title (<code>null</code> not permitted). - * @param g2 the graphics device (<code>null</code> not permitted). + * @param t the title ({@code null} not permitted). + * @param g2 the graphics device ({@code null} not permitted). * @param area the chart area, excluding any existing titles - * (<code>null</code> not permitted). + * ({@code null} not permitted). * @param entities a flag that controls whether or not an entity * collection is returned for the title. * - * @return An entity collection for the title (possibly <code>null</code>). + * @return An entity collection for the title (possibly {@code null}). */ protected EntityCollection drawTitle(Title t, Graphics2D g2, Rectangle2D area, boolean entities) { @@ -1392,25 +1389,21 @@ area.setRect(area.getX(), Math.min(area.getY() + size.height, area.getMaxY()), area.getWidth(), Math.max(area.getHeight() - size.height, 0)); - } - else if (position == RectangleEdge.BOTTOM) { + } else if (position == RectangleEdge.BOTTOM) { Size2D size = t.arrange(g2, constraint); titleArea = createAlignedRectangle2D(size, area, t.getHorizontalAlignment(), VerticalAlignment.BOTTOM); retValue = t.draw(g2, titleArea, p); area.setRect(area.getX(), area.getY(), area.getWidth(), area.getHeight() - size.height); - } - else if (position == RectangleEdge.RIGHT) { + } else if (position == RectangleEdge.RIGHT) { Size2D size = t.arrange(g2, constraint); titleArea = createAlignedRectangle2D(size, area, HorizontalAlignment.RIGHT, t.getVerticalAlignment()); retValue = t.draw(g2, titleArea, p); area.setRect(area.getX(), area.getY(), area.getWidth() - size.width, area.getHeight()); - } - - else if (position == RectangleEdge.LEFT) { + } else if (position == RectangleEdge.LEFT) { Size2D size = t.arrange(g2, constraint); titleArea = createAlignedRectangle2D(size, area, HorizontalAlignment.LEFT, t.getVerticalAlignment()); @@ -1446,7 +1439,7 @@ * * @param width the width. * @param height the height. - * @param info carries back chart state information (<code>null</code> + * @param info carries back chart state information ({@code null} * permitted). * * @return A buffered image. @@ -1463,14 +1456,13 @@ * @param width the width. * @param height the height. * @param imageType the image type. - * @param info carries back chart state information (<code>null</code> + * @param info carries back chart state information ({@code null} * permitted). * * @return A buffered image. */ public BufferedImage createBufferedImage(int width, int height, - int imageType, - ChartRenderingInfo info) { + int imageType, ChartRenderingInfo info) { BufferedImage image = new BufferedImage(width, height, imageType); Graphics2D g2 = image.createGraphics(); draw(g2, new Rectangle2D.Double(0, 0, width, height), null, info); @@ -1509,7 +1501,6 @@ info); g2.dispose(); return image; - } /** @@ -1522,14 +1513,12 @@ * @param x x-coordinate of the click (in Java2D space). * @param y y-coordinate of the click (in Java2D space). * @param info contains chart dimension and entity information - * (<code>null</code> not permitted). + * ({@code null} not permitted). */ public void handleClick(int x, int y, ChartRenderingInfo info) { - // pass the click on to the plot... // rely on the plot to post a plot change event and redraw the chart... this.plot.handleClick(x, y, info.getPlotInfo()); - } /** @@ -1614,14 +1603,12 @@ * notification. */ protected void notifyListeners(ChartProgressEvent event) { - Object[] listeners = this.progressListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartProgressListener.class) { ((ChartProgressListener) listeners[i + 1]).chartProgress(event); } } - } /** @@ -1808,7 +1795,7 @@ /** * Information about the JFreeChart project. One instance of this class is - * assigned to <code>JFreeChart.INFO</code>. + * assigned to {@code JFreeChart.INFO}. */ class JFreeChartInfo extends ProjectInfo { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-09 17:26:32
|
Revision: 3312 http://sourceforge.net/p/jfreechart/code/3312 Author: mungady Date: 2015-09-09 17:26:30 +0000 (Wed, 09 Sep 2015) Log Message: ----------- 2015-09-09 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/xy/XYShapeRenderer.java (drawItem): Update crosshair state. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYShapeRenderer.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2015-09-06 07:55:27 UTC (rev 3311) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2015-09-09 17:26:30 UTC (rev 3312) @@ -1,3 +1,8 @@ +2015-09-09 David Gilbert <dav...@ob...> + + * org/jfree/chart/renderer/xy/XYShapeRenderer.java + (drawItem): Update crosshair state. + 2015-09-06 David Gilbert <dav...@ob...> * org/jfree/data/time/TimeSeries.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYShapeRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYShapeRenderer.java 2015-09-06 07:55:27 UTC (rev 3311) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYShapeRenderer.java 2015-09-09 17:26:30 UTC (rev 3312) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * -------------------- * XYShapeRenderer.java * -------------------- - * (C) Copyright 2008-2014 by Andreas Haumer, xS+S and Contributors. + * (C) Copyright 2008-2015 by Andreas Haumer, xS+S and Contributors. * * Original Author: Martin Hoeller (x Software + Systeme xS+S - Andreas * Haumer); @@ -40,6 +40,7 @@ * 16-Feb-2010 : Added findZBounds() (patch 2952086) (MH); * 19-Oct-2011 : Fixed NPE in findRangeBounds() (bug 3026341) (DG); * 03-Jul-2013 : Use ParamChecks (DG); + * 09-Sep-2015 : Add update for crosshair (DG); * */ @@ -85,7 +86,7 @@ * connecting the shape to the edges of the plot. * <br><br> * The example shown here is generated by the - * <code>XYShapeRendererDemo1.java</code> program included in the JFreeChart + * {@code XYShapeRendererDemo1.java} program included in the JFreeChart * demo collection: * <br><br> * <img src="../../../../../images/XYShapeRendererSample.png" @@ -130,7 +131,7 @@ private transient Stroke guideLineStroke; /** - * Creates a new <code>XYShapeRenderer</code> instance with default + * Creates a new {@code XYShapeRenderer} instance with default * attributes. */ public XYShapeRenderer() { @@ -148,7 +149,7 @@ /** * Returns the paint scale used by the renderer. * - * @return The paint scale (never <code>null</code>). + * @return The paint scale (never {@code null}). * * @see #setPaintScale(PaintScale) */ @@ -160,7 +161,7 @@ * Sets the paint scale used by the renderer and sends a * {@link RendererChangeEvent} to all registered listeners. * - * @param scale the scale (<code>null</code> not permitted). + * @param scale the scale ({@code null} not permitted). * * @see #getPaintScale() */ @@ -171,8 +172,8 @@ } /** - * Returns <code>true</code> if outlines should be drawn for shapes, and - * <code>false</code> otherwise. + * Returns {@code true} if outlines should be drawn for shapes, and + * {@code false} otherwise. * * @return A boolean. * @@ -200,11 +201,11 @@ } /** - * Returns <code>true</code> if the renderer should use the fill paint - * setting to fill shapes, and <code>false</code> if it should just + * Returns {@code true} if the renderer should use the fill paint + * setting to fill shapes, and {@code false} if it should just * use the regular paint. * <p> - * Refer to <code>XYLineAndShapeRendererDemo2.java</code> to see the + * Refer to {@code XYLineAndShapeRendererDemo2.java} to see the * effect of this flag. * * @return A boolean. @@ -286,7 +287,7 @@ /** * Returns the paint used to draw the guide lines. * - * @return The paint (never <code>null</code>). + * @return The paint (never {@code null}). * * @see #setGuideLinePaint(Paint) */ @@ -298,7 +299,7 @@ * Sets the paint used to draw the guide lines and sends a * {@link RendererChangeEvent} to all registered listeners. * - * @param paint the paint (<code>null</code> not permitted). + * @param paint the paint ({@code null} not permitted). * * @see #getGuideLinePaint() */ @@ -323,7 +324,7 @@ * Sets the stroke used to draw the guide lines and sends a * {@link RendererChangeEvent} to all registered listeners. * - * @param stroke the stroke (<code>null</code> not permitted). + * @param stroke the stroke ({@code null} not permitted). * * @see #getGuideLineStroke() */ @@ -337,9 +338,9 @@ * Returns the lower and upper bounds (range) of the x-values in the * specified dataset. * - * @param dataset the dataset (<code>null</code> permitted). + * @param dataset the dataset ({@code null} permitted). * - * @return The range (<code>null</code> if the dataset is <code>null</code> + * @return The range ({@code null} if the dataset is {@code null} * or empty). */ @Override @@ -360,9 +361,9 @@ * Returns the range of values the renderer requires to display all the * items from the specified dataset. * - * @param dataset the dataset (<code>null</code> permitted). + * @param dataset the dataset ({@code null} permitted). * - * @return The range (<code>null</code> if the dataset is <code>null</code> + * @return The range ({@code null} if the dataset is {@code null} * or empty). */ @Override @@ -382,16 +383,15 @@ /** * Return the range of z-values in the specified dataset. * - * @param dataset the dataset (<code>null</code> permitted). + * @param dataset the dataset ({@code null} permitted). * - * @return The range (<code>null</code> if the dataset is <code>null</code> + * @return The range ({@code null} if the dataset is {@code null} * or empty). */ public Range findZBounds(XYZDataset dataset) { if (dataset != null) { return DatasetUtilities.findZBounds(dataset); - } - else { + } else { return null; } } @@ -399,7 +399,7 @@ /** * Returns the number of passes required by this renderer. * - * @return <code>2</code>. + * @return {@code 2}. */ @Override public int getPassCount() { @@ -457,21 +457,18 @@ dataArea.getMaxY())); g2.draw(new Line2D.Double(dataArea.getMinX(), transX, dataArea.getMaxX(), transX)); - } - else { + } else { g2.draw(new Line2D.Double(transX, dataArea.getMinY(), transX, dataArea.getMaxY())); g2.draw(new Line2D.Double(dataArea.getMinX(), transY, dataArea.getMaxX(), transY)); } - } - else if (pass == 1) { + } else if (pass == 1) { Shape shape = getItemShape(series, item); if (orientation == PlotOrientation.HORIZONTAL) { shape = ShapeUtilities.createTranslatedShape(shape, transY, transX); - } - else if (orientation == PlotOrientation.VERTICAL) { + } else if (orientation == PlotOrientation.VERTICAL) { shape = ShapeUtilities.createTranslatedShape(shape, transX, transY); } @@ -492,6 +489,11 @@ g2.draw(shape); } } + + int domainAxisIndex = plot.getDomainAxisIndex(domainAxis); + int rangeAxisIndex = plot.getRangeAxisIndex(rangeAxis); + updateCrosshairValues(crosshairState, x, y, domainAxisIndex, + rangeAxisIndex, transX, transY, orientation); // add an entity for the item... if (entities != null) { @@ -504,7 +506,7 @@ /** * Get the paint for a given series and item from a dataset. * - * @param dataset the dataset.. + * @param dataset the dataset. * @param series the series index. * @param item the item index. * @@ -515,8 +517,7 @@ if (dataset instanceof XYZDataset) { double z = ((XYZDataset) dataset).getZValue(series, item); p = this.paintScale.getPaint(z); - } - else { + } else { if (this.useFillPaint) { p = getItemFillPaint(series, item); } @@ -529,15 +530,15 @@ /** * Tests this instance for equality with an arbitrary object. This method - * returns <code>true</code> if and only if: + * returns {@code true} if and only if: * <ul> - * <li><code>obj</code> is an instance of <code>XYShapeRenderer</code> (not - * <code>null</code>);</li> - * <li><code>obj</code> has the same field values as this - * <code>XYShapeRenderer</code>;</li> + * <li>{@code obj} is an instance of {@code XYShapeRenderer} (not + * {@code null});</li> + * <li>{@code obj} has the same field values as this + * {@code XYShapeRenderer};</li> * </ul> * - * @param obj the object (<code>null</code> permitted). + * @param obj the object ({@code null} permitted). * * @return A boolean. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-06 07:55:29
|
Revision: 3311 http://sourceforge.net/p/jfreechart/code/3311 Author: mungady Date: 2015-09-06 07:55:27 +0000 (Sun, 06 Sep 2015) Log Message: ----------- Javadoc formatting changes. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java 2015-09-06 07:41:59 UTC (rev 3310) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java 2015-09-06 07:55:27 UTC (rev 3311) @@ -167,7 +167,7 @@ * created. Use one of the other constructors if you require a different * time period. * - * @param name the series name (<code>null</code> not permitted). + * @param name the series name ({@code null} not permitted). */ public TimeSeries(Comparable name) { this(name, DEFAULT_DOMAIN_DESCRIPTION, DEFAULT_RANGE_DESCRIPTION); @@ -180,9 +180,9 @@ * where this is helpful is when generating a chart for the time series - * axis labels can be taken from the domain and range description. * - * @param name the name of the series (<code>null</code> not permitted). - * @param domain the domain description (<code>null</code> permitted). - * @param range the range description (<code>null</code> permitted). + * @param name the name of the series ({@code null} not permitted). + * @param domain the domain description ({@code null} permitted). + * @param range the range description ({@code null} permitted). * * @since 1.0.13 */ @@ -201,7 +201,7 @@ /** * Returns the domain description. * - * @return The domain description (possibly <code>null</code>). + * @return The domain description (possibly {@code null}). * * @see #setDomainDescription(String) */ @@ -210,11 +210,11 @@ } /** - * Sets the domain description and sends a <code>PropertyChangeEvent</code> - * (with the property name <code>Domain</code>) to all registered + * Sets the domain description and sends a {@code PropertyChangeEvent} + * (with the property name {@code Domain}) to all registered * property change listeners. * - * @param description the description (<code>null</code> permitted). + * @param description the description ({@code null} permitted). * * @see #getDomainDescription() */ @@ -227,7 +227,7 @@ /** * Returns the range description. * - * @return The range description (possibly <code>null</code>). + * @return The range description (possibly {@code null}). * * @see #setRangeDescription(String) */ @@ -236,10 +236,10 @@ } /** - * Sets the range description and sends a <code>PropertyChangeEvent</code> - * (with the property name <code>Range</code>) to all registered listeners. + * Sets the range description and sends a {@code PropertyChangeEvent} + * (with the property name {@code Range}) to all registered listeners. * - * @param description the description (<code>null</code> permitted). + * @param description the description ({@code null} permitted). * * @see #getRangeDescription() */ @@ -272,7 +272,7 @@ /** * Returns the maximum number of items that will be retained in the series. - * The default value is <code>Integer.MAX_VALUE</code>. + * The default value is {@code Integer.MAX_VALUE}. * * @return The maximum item count. * @@ -459,7 +459,7 @@ * If you add a data item with a {@link Year} for the time period, then all * subsequent data items must also have a {@link Year} for the time period. * - * @return The time period class (may be <code>null</code> but only for + * @return The time period class (may be {@code null} but only for * an empty series). */ public Class getTimePeriodClass() { @@ -485,10 +485,10 @@ * object is a clone of the item in the series, so modifying it will have * no effect on the data series. * - * @param period the period of interest (<code>null</code> not allowed). + * @param period the period of interest ({@code null} not allowed). * * @return The data item matching the specified period (or - * <code>null</code> if there is no match). + * {@code null} if there is no match). * * @see #getDataItem(int) */ @@ -597,7 +597,7 @@ * Returns the index for the item (if any) that corresponds to a time * period. * - * @param period the time period (<code>null</code> not permitted). + * @param period the time period ({@code null} not permitted). * * @return The index. */ @@ -613,7 +613,7 @@ * * @param index index of a value. * - * @return The value (possibly <code>null</code>). + * @return The value (possibly {@code null}). */ public Number getValue(int index) { return getRawDataItem(index).getValue(); @@ -621,11 +621,11 @@ /** * Returns the value for a time period. If there is no data item with the - * specified period, this method will return <code>null</code>. + * specified period, this method will return {@code null}. * - * @param period time period (<code>null</code> not permitted). + * @param period time period ({@code null} not permitted). * - * @return The value (possibly <code>null</code>). + * @return The value (possibly {@code null}). */ public Number getValue(RegularTimePeriod period) { int index = getIndex(period); @@ -639,8 +639,7 @@ * Adds a data item to the series and sends a {@link SeriesChangeEvent} to * all registered listeners. * - * @param item the (timeperiod, value) pair (<code>null</code> not - * permitted). + * @param item the (timeperiod, value) pair ({@code null} not permitted). */ public void add(TimeSeriesDataItem item) { add(item, true); @@ -650,8 +649,7 @@ * Adds a data item to the series and sends a {@link SeriesChangeEvent} to * all registered listeners. * - * @param item the (timeperiod, value) pair (<code>null</code> not - * permitted). + * @param item the (timeperiod, value) pair ({@code null} not permitted). * @param notify notify listeners? */ public void add(TimeSeriesDataItem item, boolean notify) { @@ -725,7 +723,7 @@ * Adds a new data item to the series and sends a {@link SeriesChangeEvent} * to all registered listeners. * - * @param period the time period (<code>null</code> not permitted). + * @param period the time period ({@code null} not permitted). * @param value the value. */ public void add(RegularTimePeriod period, double value) { @@ -737,7 +735,7 @@ * Adds a new data item to the series and sends a {@link SeriesChangeEvent} * to all registered listeners. * - * @param period the time period (<code>null</code> not permitted). + * @param period the time period ({@code null} not permitted). * @param value the value. * @param notify notify listeners? */ @@ -752,8 +750,8 @@ * a {@link org.jfree.data.general.SeriesChangeEvent} to all registered * listeners. * - * @param period the time period (<code>null</code> not permitted). - * @param value the value (<code>null</code> permitted). + * @param period the time period ({@code null} not permitted). + * @param value the value ({@code null} permitted). */ public void add(RegularTimePeriod period, Number value) { // defer argument checking... @@ -764,8 +762,8 @@ * Adds a new data item to the series and sends a {@link SeriesChangeEvent} * to all registered listeners. * - * @param period the time period (<code>null</code> not permitted). - * @param value the value (<code>null</code> permitted). + * @param period the time period ({@code null} not permitted). + * @param value the value ({@code null} permitted). * @param notify notify listeners? */ public void add(RegularTimePeriod period, Number value, boolean notify) { @@ -778,7 +776,7 @@ * Updates (changes) the value for a time period. Throws a * {@link SeriesException} if the period does not exist. * - * @param period the period (<code>null</code> not permitted). + * @param period the period ({@code null} not permitted). * @param value the value. * * @since 1.0.14 @@ -791,8 +789,8 @@ * Updates (changes) the value for a time period. Throws a * {@link SeriesException} if the period does not exist. * - * @param period the period (<code>null</code> not permitted). - * @param value the value (<code>null</code> permitted). + * @param period the period ({@code null} not permitted). + * @param value the value ({@code null} permitted). */ public void update(RegularTimePeriod period, Number value) { TimeSeriesDataItem temp = new TimeSeriesDataItem(period, value); @@ -808,7 +806,7 @@ * Updates (changes) the value of a data item. * * @param index the index of the data item. - * @param value the new value (<code>null</code> permitted). + * @param value the new value ({@code null} permitted). */ public void update(int index, Number value) { TimeSeriesDataItem item = (TimeSeriesDataItem) this.data.get(index); @@ -858,11 +856,11 @@ * Adds or updates an item in the times series and sends a * {@link SeriesChangeEvent} to all registered listeners. * - * @param period the time period to add/update (<code>null</code> not + * @param period the time period to add/update ({@code null} not * permitted). * @param value the new value. * - * @return A copy of the overwritten data item, or <code>null</code> if no + * @return A copy of the overwritten data item, or {@code null} if no * item was overwritten. */ public TimeSeriesDataItem addOrUpdate(RegularTimePeriod period, @@ -874,15 +872,15 @@ * Adds or updates an item in the times series and sends a * {@link SeriesChangeEvent} to all registered listeners. * - * @param period the time period to add/update (<code>null</code> not + * @param period the time period to add/update ({@code null} not * permitted). - * @param value the new value (<code>null</code> permitted). + * @param value the new value ({@code null} permitted). * - * @return A copy of the overwritten data item, or <code>null</code> if no + * @return A copy of the overwritten data item, or {@code null} if no * item was overwritten. */ public TimeSeriesDataItem addOrUpdate(RegularTimePeriod period, - Number value) { + Number value) { return addOrUpdate(new TimeSeriesDataItem(period, value)); } @@ -890,9 +888,9 @@ * Adds or updates an item in the times series and sends a * {@link SeriesChangeEvent} to all registered listeners. * - * @param item the data item (<code>null</code> not permitted). + * @param item the data item ({@code null} not permitted). * - * @return A copy of the overwritten data item, or <code>null</code> if no + * @return A copy of the overwritten data item, or {@code null} if no * item was overwritten. * * @since 1.0.14 @@ -1052,7 +1050,7 @@ * {@link SeriesChangeEvent} to all registered listeners. If there is no * item with the specified time period, this method does nothing. * - * @param period the period of the item to delete (<code>null</code> not + * @param period the period of the item to delete ({@code null} not * permitted). */ public void delete(RegularTimePeriod period) { @@ -1169,10 +1167,9 @@ * Creates a new timeseries by copying a subset of the data in this time * series. * - * @param start the first time period to copy (<code>null</code> not + * @param start the first time period to copy ({@code null} not * permitted). - * @param end the last time period to copy (<code>null</code> not - * permitted). + * @param end the last time period to copy ({@code null} not permitted). * * @return A time series containing a copy of this time series from start * until end. @@ -1215,7 +1212,7 @@ /** * Tests the series for equality with an arbitrary object. * - * @param obj the object to test against (<code>null</code> permitted). + * @param obj the object to test against ({@code null} permitted). * * @return A boolean. */ @@ -1292,7 +1289,7 @@ /** * Updates the cached values for the minimum and maximum data values. * - * @param item the item added (<code>null</code> not permitted). + * @param item the item added ({@code null} not permitted). * * @since 1.0.14 */ @@ -1309,7 +1306,7 @@ * Updates the cached values for the minimum and maximum data values on * the basis that the specified item has just been removed. * - * @param item the item added (<code>null</code> not permitted). + * @param item the item added ({@code null} not permitted). * * @since 1.0.14 */ @@ -1386,12 +1383,12 @@ * Creates a new (empty) time series with the specified name and class * of {@link RegularTimePeriod}. * - * @param name the series name (<code>null</code> not permitted). - * @param timePeriodClass the type of time period (<code>null</code> not + * @param name the series name ({@code null} not permitted). + * @param timePeriodClass the type of time period ({@code null} not * permitted). * * @deprecated As of 1.0.13, it is not necessary to specify the - * <code>timePeriodClass</code> as this will be inferred when the + * {@code timePeriodClass} as this will be inferred when the * first data item is added to the dataset. */ public TimeSeries(Comparable name, Class timePeriodClass) { @@ -1406,14 +1403,14 @@ * where this is helpful is when generating a chart for the time series - * axis labels can be taken from the domain and range description. * - * @param name the name of the series (<code>null</code> not permitted). - * @param domain the domain description (<code>null</code> permitted). - * @param range the range description (<code>null</code> permitted). - * @param timePeriodClass the type of time period (<code>null</code> not + * @param name the name of the series ({@code null} not permitted). + * @param domain the domain description ({@code null} permitted). + * @param range the range description ({@code null} permitted). + * @param timePeriodClass the type of time period ({@code null} not * permitted). * * @deprecated As of 1.0.13, it is not necessary to specify the - * <code>timePeriodClass</code> as this will be inferred when the + * {@code timePeriodClass} as this will be inferred when the * first data item is added to the dataset. */ public TimeSeries(Comparable name, String domain, String range, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-06 07:42:02
|
Revision: 3310 http://sourceforge.net/p/jfreechart/code/3310 Author: mungady Date: 2015-09-06 07:41:59 +0000 (Sun, 06 Sep 2015) Log Message: ----------- 2015-09-06 David Gilbert <dav...@ob...> * org/jfree/data/time/TimeSeries.java (findValueRange): Check for Double.NaN. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/tests/org/jfree/data/time/TimeSeriesTest.java Modified: branches/jfreechart-1.0.x-branch/tests/org/jfree/data/time/TimeSeriesTest.java =================================================================== --- branches/jfreechart-1.0.x-branch/tests/org/jfree/data/time/TimeSeriesTest.java 2015-09-06 07:41:22 UTC (rev 3309) +++ branches/jfreechart-1.0.x-branch/tests/org/jfree/data/time/TimeSeriesTest.java 2015-09-06 07:41:59 UTC (rev 3310) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * ------------------- * TimeSeriesTest.java * ------------------- - * (C) Copyright 2001-2014, by Object Refinery Limited. + * (C) Copyright 2001-2015, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -50,28 +50,30 @@ * 09-Jun-2009 : Added testAdd_TimeSeriesDataItem (DG); * 31-Aug-2009 : Added new test for createCopy() method (DG); * 03-Dec-2011 : Added testBug3446965() (DG); + * 06-Sep-2015 : Added test for findRangeBounds() (DG); * */ package org.jfree.data.time; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.Locale; -import java.util.TimeZone; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.Locale; +import java.util.TimeZone; + import org.jfree.chart.TestUtilities; import org.jfree.data.Range; - import org.jfree.data.general.SeriesChangeEvent; import org.jfree.data.general.SeriesChangeListener; import org.jfree.data.general.SeriesException; import org.jfree.date.MonthConstants; + import org.junit.Before; import org.junit.Test; @@ -1157,6 +1159,10 @@ ts.add(new Year(2016), null); assertEquals(new Range(1.0, 2.0), ts.findValueRange()); + // Double.NaN values are also ignored + ts.add(new Year(2017), Double.NaN); + assertEquals(new Range(1.0, 2.0), ts.findValueRange()); + ts.clear(); assertNull(ts.findValueRange()); @@ -1164,7 +1170,11 @@ ts.add(new Year(2014), null); assertTrue(ts.findValueRange().isNaNRange()); } - + + /** + * Tests for: + * public Range findValueRange(Range, TimePeriodAnchor, TimeZone) + */ @Test public void testFindValueRange2() { TimeZone tzone = TimeZone.getTimeZone("Europe/London"); @@ -1203,4 +1213,45 @@ assertTrue(ts.findValueRange(range, TimePeriodAnchor.MIDDLE, tzone).isNaNRange()); assertTrue(ts.findValueRange(range, TimePeriodAnchor.END, tzone).isNaNRange()); } + + /** + * Test findValueRange() method when there are Double.NaN values present. + */ + @Test + public void testFindValueRange3() { + TimeZone tzone = TimeZone.getTimeZone("Europe/London"); + Calendar calendar = new GregorianCalendar(tzone, Locale.UK); + calendar.clear(); + calendar.set(2015, Calendar.SEPTEMBER, 1, 6, 0); + long start = calendar.getTimeInMillis(); + calendar.clear(); + calendar.set(2015, Calendar.SEPTEMBER, 30, 18, 0); + long end = calendar.getTimeInMillis(); + Range range = new Range(start, end); + + TimeSeries ts = new TimeSeries("Time Series"); + assertNull(ts.findValueRange(range, TimePeriodAnchor.START, tzone)); + assertNull(ts.findValueRange(range, TimePeriodAnchor.MIDDLE, tzone)); + assertNull(ts.findValueRange(range, TimePeriodAnchor.END, tzone)); + + ts.add(new Day(1, 9, 2015), 1.0); + ts.add(new Day(2, 9, 2015), 99.0); + ts.add(new Day(30, 9, 2015), 2.0); + + assertEquals(new Range(2.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.START, tzone)); + assertEquals(new Range(1.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.MIDDLE, tzone)); + assertEquals(new Range(1.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.END, tzone)); + + ts.add(new Day(10, 9, 2015), Double.NaN); + assertEquals(new Range(2.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.START, tzone)); + assertEquals(new Range(1.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.MIDDLE, tzone)); + assertEquals(new Range(1.0, 99.0), + ts.findValueRange(range, TimePeriodAnchor.END, tzone)); + + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-09-06 07:41:24
|
Revision: 3309 http://sourceforge.net/p/jfreechart/code/3309 Author: mungady Date: 2015-09-06 07:41:22 +0000 (Sun, 06 Sep 2015) Log Message: ----------- 2015-09-06 David Gilbert <dav...@ob...> * org/jfree/data/time/TimeSeries.java (findValueRange): Check for Double.NaN. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2015-01-26 22:34:47 UTC (rev 3308) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2015-09-06 07:41:22 UTC (rev 3309) @@ -1,3 +1,14 @@ +2015-09-06 David Gilbert <dav...@ob...> + + * org/jfree/data/time/TimeSeries.java + (findValueRange): Check for Double.NaN. + +2014-08-31 David Gilbert <dav...@ob...> + + (Bug 986 fix from Vladimir Shirokov): + * org/jfree/chart/plot/CombinedDomainXYPlot.java + (datasetChanged): New method override. + 2014-08-29 David Gilbert <dav...@ob...> (Patch from Simon Legner attached to bug 1129) Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java 2015-01-26 22:34:47 UTC (rev 3308) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/TimeSeries.java 2015-09-06 07:41:22 UTC (rev 3309) @@ -2,7 +2,7 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2014, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2015, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * @@ -27,7 +27,7 @@ * --------------- * TimeSeries.java * --------------- - * (C) Copyright 2001-2014, by Object Refinery Limited. + * (C) Copyright 2001-2015, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Bryan Scott; @@ -85,7 +85,8 @@ * 03-Dec-2011 : Fixed bug 3446965 which affects the y-range calculation for * the series (DG); * 02-Jul-2013 : Use ParamChecks (DG); - * + * 06-Sep-2015 : Fix bug with Double.NaN values and findRangeBounds() (DG); + * */ package org.jfree.data.time; @@ -335,14 +336,13 @@ } /** - * Returns the range of y-values in the time series. Any <code>null</code> - * data values in the series will be ignored (except for the special case - * where all data values are <code>null</code>, in which case the return - * value is <code>Range(Double.NaN, Double.NaN)</code>). If the time - * series contains no items, this method will return <code>null</code>. + * Returns the range of y-values in the time series. Any {@code null} or + * {@code Double.NaN} data values in the series will be ignored (except for + * the special case where all data values are {@code null}, in which case + * the return value is {@code Range(Double.NaN, Double.NaN)}). If the time + * series contains no items, this method will return {@code null}. * - * @return The range of y-values in the time series (possibly - * <code>null</code>). + * @return The range of y-values in the time series (possibly {@code null}). * * @since 1.0.18 */ @@ -356,12 +356,11 @@ /** * Returns the range of y-values in the time series that fall within * the specified range of x-values. This is equivalent to - * <code>findValueRange(xRange, TimePeriodAnchor.MIDDLE, timeZone)</code>. + * {@code findValueRange(xRange, TimePeriodAnchor.MIDDLE, timeZone)}. * - * @param xRange the subrange of x-values (<code>null</code> not - * permitted). + * @param xRange the subrange of x-values ({@code null} not permitted). * @param timeZone the time zone used to convert x-values to time periods - * (<code>null</code> not permitted). + * ({@code null} not permitted). * * @return The range. * @@ -376,11 +375,11 @@ * x-values (where the x-values are interpreted as milliseconds since the * epoch and converted to time periods using the specified timezone). * - * @param xRange the subset of x-values to use (<code>null</code> not + * @param xRange the subset of x-values to use ({@code null} not * permitted). - * @param xAnchor the anchor point for the x-values (<code>null</code> + * @param xAnchor the anchor point for the x-values ({@code null} * not permitted). - * @param zone the time zone (<code>null</code> not permitted). + * @param zone the time zone ({@code null} not permitted). * * @return The range of y-values. * @@ -406,8 +405,8 @@ Number n = item.getValue(); if (n != null) { double v = n.doubleValue(); - lowY = Math.min(lowY, v); - highY = Math.max(highY, v); + lowY = minIgnoreNaN(lowY, v); + highY = maxIgnoreNaN(highY, v); } } } @@ -423,8 +422,8 @@ /** * Returns the smallest y-value in the series, ignoring any - * <code>null</code> and <code>Double.NaN</code> values. This method - * returns <code>Double.NaN</code> if there is no smallest y-value (for + * {@code null} and {@code Double.NaN} values. This method + * returns {@code Double.NaN} if there is no smallest y-value (for * example, when the series is empty). * * @return The smallest y-value. @@ -439,8 +438,8 @@ /** * Returns the largest y-value in the series, ignoring any - * <code>null</code> and <code>Double.NaN</code> values. This method - * returns <code>Double.NaN</code> if there is no largest y-value + * {@code null} and {@code Double.NaN} values. This method + * returns {@code Double.NaN} if there is no largest y-value * (for example, when the series is empty). * * @return The largest y-value. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2015-01-26 22:34:49
|
Revision: 3308 http://sourceforge.net/p/jfreechart/code/3308 Author: mungady Date: 2015-01-26 22:34:47 +0000 (Mon, 26 Jan 2015) Log Message: ----------- Javadoc updates Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/fx/ChartViewer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/fx/ChartViewer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/fx/ChartViewer.java 2014-09-08 20:06:47 UTC (rev 3307) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/fx/ChartViewer.java 2015-01-26 22:34:47 UTC (rev 3308) @@ -119,7 +119,7 @@ } @Override - protected String getUserAgentStylesheet() { + public String getUserAgentStylesheet() { return ChartViewer.class.getResource("chart-viewer.css") .toExternalForm(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-09-08 20:06:52
|
Revision: 3307 http://sourceforge.net/p/jfreechart/code/3307 Author: mungady Date: 2014-09-08 20:06:47 +0000 (Mon, 08 Sep 2014) Log Message: ----------- Javadoc updates Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/SymbolAxis.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/SymbolAxis.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/SymbolAxis.java 2014-08-31 04:51:52 UTC (rev 3306) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/axis/SymbolAxis.java 2014-09-08 20:06:47 UTC (rev 3307) @@ -77,6 +77,7 @@ * 15-Aug-2008 : Use alternate grid band paint when drawing (DG); * 02-Jul-2013 : Use ParamChecks (DG); * 19-Mar-2014 : Fix gridbands (bug #1056) (DG); + * 08-Sep-2014 : Update Javadocs for grid bands (DG): * */ @@ -163,7 +164,6 @@ this.gridBandAlternatePaint = DEFAULT_GRID_BAND_ALTERNATE_PAINT; setAutoTickUnitSelection(false, false); setAutoRangeStickyZero(false); - } /** @@ -178,11 +178,10 @@ } /** - * Returns <code>true</code> if the grid bands are showing, and - * <code>false</code> otherwise. + * Returns the flag that controls whether or not grid bands are drawn for + * the axis. The default value is {@code true}. * - * @return <code>true</code> if the grid bands are showing, and - * <code>false</code> otherwise. + * @return A boolean. * * @see #setGridBandsVisible(boolean) */ @@ -191,8 +190,12 @@ } /** - * Sets the visibility of the grid bands and notifies registered - * listeners that the axis has been modified. + * Sets the flag that controls whether or not grid bands are drawn for this + * axis and notifies registered listeners that the axis has been modified. + * Each band is the area between two adjacent gridlines + * running perpendicular to the axis. When the bands are drawn they are + * filled with the colors {@link #getGridBandPaint()} and + * {@link #getGridBandAlternatePaint()} in an alternating sequence. * * @param flag the new setting. * @@ -204,9 +207,12 @@ } /** - * Returns the paint used to color the grid bands. + * Returns the paint used to color grid bands (two colors are used + * alternately, the other is returned by + * {@link #getGridBandAlternatePaint()}). The default value is + * {@link #DEFAULT_GRID_BAND_PAINT}. * - * @return The grid band paint (never <code>null</code>). + * @return The paint (never {@code null}). * * @see #setGridBandPaint(Paint) * @see #isGridBandsVisible() @@ -216,10 +222,11 @@ } /** - * Sets the grid band paint and sends an {@link AxisChangeEvent} to - * all registered listeners. + * Sets the grid band paint and notifies registered listeners that the + * axis has been changed. See the {@link #setGridBandsVisible(boolean)} + * method for more information about grid bands. * - * @param paint the paint (<code>null</code> not permitted). + * @param paint the paint ({@code null} not permitted). * * @see #getGridBandPaint() */ @@ -230,12 +237,14 @@ } /** - * Returns the paint used for alternate grid bands. + * Returns the second paint used to color grid bands (two colors are used + * alternately, the other is returned by {@link #getGridBandPaint()}). + * The default value is {@link #DEFAULT_GRID_BAND_ALTERNATE_PAINT} + * (transparent). * - * @return The paint (never <code>null</code>). + * @return The paint (never {@code null}). * * @see #setGridBandAlternatePaint(Paint) - * @see #getGridBandPaint() * * @since 1.0.7 */ @@ -244,10 +253,11 @@ } /** - * Sets the paint used for alternate grid bands and sends a - * {@link AxisChangeEvent} to all registered listeners. + * Sets the grid band paint and notifies registered listeners that the + * axis has been changed. See the {@link #setGridBandsVisible(boolean)} + * method for more information about grid bands. * - * @param paint the paint (<code>null</code> not permitted). + * @param paint the paint ({@code null} not permitted). * * @see #getGridBandAlternatePaint() * @see #setGridBandPaint(Paint) @@ -306,18 +316,17 @@ } /** - * Draws the grid bands. Alternate bands are colored using - * <CODE>gridBandPaint</CODE> (<CODE>DEFAULT_GRID_BAND_PAINT</CODE> by - * default). + * Draws the grid bands (alternate bands are colored using + * {@link #getGridBandPaint()} and {@link #getGridBandAlternatePaint()}. * - * @param g2 the graphics target (<code>null</code> not permitted). + * @param g2 the graphics target ({@code null} not permitted). * @param plotArea the area within which the plot is drawn - * (<code>null</code> not permitted). + * ({@code null} not permitted). * @param dataArea the data area to which the axes are aligned - * (<code>null</code> not permitted). - * @param edge the edge to which the axis is aligned (<code>null</code> not + * ({@code null} not permitted). + * @param edge the edge to which the axis is aligned ({@code null} not * permitted). - * @param ticks the ticks (<code>null</code> not permitted). + * @param ticks the ticks ({@code null} not permitted). */ protected void drawGridBands(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge, List ticks) { @@ -335,15 +344,15 @@ * Draws the grid bands for the axis when it is at the top or bottom of * the plot. * - * @param g2 the graphics target (<code>null</code> not permitted). + * @param g2 the graphics target ({@code null} not permitted). * @param plotArea the area within which the plot is drawn (not used here). * @param dataArea the area for the data (to which the axes are aligned, - * <code>null</code> not permitted). + * {@code null} not permitted). * @param firstGridBandIsDark True: the first grid band takes the - * color of <CODE>gridBandPaint</CODE>. + * color of {@code gridBandPaint}. * False: the second grid band takes the - * color of <CODE>gridBandPaint</CODE>. - * @param ticks a list of ticks (<code>null</code> not permitted). + * color of {@code gridBandPaint}. + * @param ticks a list of ticks ({@code null} not permitted). */ protected void drawGridBandsHorizontal(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, @@ -371,8 +380,7 @@ RectangleEdge.BOTTOM); if (currentGridBandIsDark) { g2.setPaint(this.gridBandPaint); - } - else { + } else { g2.setPaint(this.gridBandAlternatePaint); } band = new Rectangle2D.Double(Math.min(xx1, xx2), @@ -387,15 +395,15 @@ * Draws the grid bands for an axis that is aligned to the left or * right of the data area (that is, a vertical axis). * - * @param g2 the graphics target (<code>null</code> not permitted). + * @param g2 the graphics target ({@code null} not permitted). * @param plotArea the area within which the plot is drawn (not used here). * @param dataArea the area for the data (to which the axes are aligned, - * <code>null</code> not permitted). + * {@code null} not permitted). * @param firstGridBandIsDark True: the first grid band takes the - * color of <CODE>gridBandPaint</CODE>. + * color of {@code gridBandPaint}. * False: the second grid band takes the - * color of <CODE>gridBandPaint</CODE>. - * @param ticks a list of ticks (<code>null</code> not permitted). + * color of {@code gridBandPaint}. + * @param ticks a list of ticks ({@code null} not permitted). */ protected void drawGridBandsVertical(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, boolean firstGridBandIsDark, @@ -423,8 +431,7 @@ RectangleEdge.LEFT); if (currentGridBandIsDark) { g2.setPaint(this.gridBandPaint); - } - else { + } else { g2.setPaint(this.gridBandAlternatePaint); } band = new Rectangle2D.Double(xx + outlineStrokeWidth, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-31 04:51:56
|
Revision: 3306 http://sourceforge.net/p/jfreechart/code/3306 Author: mungady Date: 2014-08-31 04:51:52 +0000 (Sun, 31 Aug 2014) Log Message: ----------- 2014-08-31 David Gilbert <dav...@ob...> (Bug 986 fix from Vladimir Shirokov): * org/jfree/chart/plot/CombinedDomainXYPlot.java (datasetChanged): New method override. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java 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-08-31 03:55:30 UTC (rev 3305) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/plot/CombinedDomainXYPlot.java 2014-08-31 04:51:52 UTC (rev 3306) @@ -36,6 +36,7 @@ * Kevin Frechette (for ISTI); * Nicolas Brodu; * Petr Kubanek (bug 1606205); + * Vladimir Shirokov (bug 986); * * Changes: * -------- @@ -94,6 +95,8 @@ * 21-Dec-2011 : Apply patch 3447161 by Ulrich Voigt and Martin Hoeller (MH); * 21-Jul-2014 : Override isRangePannable() and setRangePannable() - motivated * by patch #304 by Ulrich Voigt (DG); + * 31-Aug-2014 : Fix range axis bounds (bug 986, patch by Vladimir + * Shirokov) (DG); */ package org.jfree.chart.plot; @@ -116,6 +119,8 @@ import org.jfree.chart.util.ParamChecks; import org.jfree.chart.util.ShadowGenerator; import org.jfree.data.Range; +import org.jfree.data.general.DatasetChangeEvent; +import org.jfree.data.xy.XYDataset; import org.jfree.ui.RectangleEdge; import org.jfree.ui.RectangleInsets; import org.jfree.util.ObjectUtilities; @@ -130,7 +135,7 @@ /** For serialization. */ private static final long serialVersionUID = -7765545541261907383L; - /** Storage for the subplot references. */ + /** Storage for the subplot references (possibly empty but never null). */ private List<XYPlot> subplots; /** The gap between subplots. */ @@ -234,10 +239,8 @@ @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); + for (XYPlot p : this.subplots) { + p.setOrientation(orientation); } } @@ -251,10 +254,8 @@ 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); + for (XYPlot p : this.subplots) { + p.setShadowGenerator(generator); } setNotify(true); } @@ -274,13 +275,12 @@ */ @Override public Range getDataRange(ValueAxis axis) { + if (this.subplots == null) { + return null; + } 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)); - } + for (XYPlot p : this.subplots) { + result = Range.combine(result, p.getDataRange(axis)); } return result; } @@ -363,17 +363,12 @@ /** * Returns the list of subplots. The returned list may be empty, but is - * never <code>null</code>. + * never {@code null}. * * @return An unmodifiable list of subplots. */ public List getSubplots() { - if (this.subplots != null) { - return Collections.unmodifiableList(this.subplots); - } - else { - return Collections.EMPTY_LIST; - } + return Collections.unmodifiableList(this.subplots); } /** @@ -386,7 +381,7 @@ */ @Override protected AxisSpace calculateAxisSpace(Graphics2D g2, - Rectangle2D plotArea) { + Rectangle2D plotArea) { AxisSpace space = new AxisSpace(); PlotOrientation orientation = getOrientation(); @@ -563,19 +558,16 @@ */ @Override public void zoomRangeAxes(double factor, PlotRenderingInfo state, - Point2D source, boolean useAnchor) { + 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 { + } 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); + for (XYPlot p : this.subplots) { + p.zoomRangeAxes(factor, state, source, useAnchor); } } } @@ -595,14 +587,11 @@ XYPlot subplot = findSubplot(info, source); if (subplot != null) { subplot.zoomRangeAxes(lowerPercent, upperPercent, info, source); - } - else { + } 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); + for (XYPlot p : this.subplots) { + p.zoomRangeAxes(lowerPercent, upperPercent, info, source); } } } @@ -673,10 +662,8 @@ 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); + for (XYPlot p : this.subplots) { + p.setRenderer(renderer); } } @@ -700,18 +687,16 @@ * @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); + for (XYPlot p : this.subplots) { + p.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 x x-coordinate, where the click occurred. + * @param y y-coordinate, where the click occurred. * @param info object containing information about the plot dimensions. */ @Override @@ -727,6 +712,30 @@ } /** + * Receives notification of a change to the plot's dataset. + * <P> + * The axis ranges are updated if necessary. + * + * @param event information about the event (not used here). + */ + @Override + public void datasetChanged(DatasetChangeEvent event) { + super.datasetChanged(event); + if (this.subplots == null) { + return; // this can happen during plot construction + } + XYDataset dataset = null; + if (event.getDataset() instanceof XYDataset) { + dataset = (XYDataset) event.getDataset(); + } + for (XYPlot subplot : this.subplots) { + if (subplot.indexOf(dataset) >= 0) { + subplot.configureRangeAxes(); + } + } + } + + /** * Receives a {@link PlotChangeEvent} and responds by notifying all * listeners. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-31 03:51:44
|
Revision: 3304 http://sourceforge.net/p/jfreechart/code/3304 Author: mungady Date: 2014-08-31 03:51:35 +0000 (Sun, 31 Aug 2014) Log Message: ----------- maven bundle is redundant Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ant/build.xml Modified: branches/jfreechart-1.0.x-branch/ant/build.xml =================================================================== --- branches/jfreechart-1.0.x-branch/ant/build.xml 2014-08-31 03:49:57 UTC (rev 3303) +++ branches/jfreechart-1.0.x-branch/ant/build.xml 2014-08-31 03:51:35 UTC (rev 3304) @@ -21,7 +21,6 @@ <tstamp /> <property name="jfreechart.name" value="jfreechart" /> <property name="jfreechart.version" value="1.0.20-pre" /> - <property name="jfreechart-bundle-file" value="${jfreechart.name}-${jfreechart.version}-bundle.jar" /> <property name="jcommon.name" value="jcommon" /> <property name="jcommon.version" value="1.0.23" /> <property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/> @@ -323,33 +322,6 @@ </target> - <target name="maven-bundle" depends="zip" > - <!-- make a temporary distribution directory --> - <mkdir dir="distribution"/> - <!-- copy across LICENCE --> - <copy file="licence-LGPL.txt" tofile="distribution/LICENSE.txt"/> - - <filterchain id="version.filters"> - <replacetokens> - <token key="VERSION" value="${jfreechart.version}"/> - <token key="JCOMMON.VERSION" value="${jcommon.version}"/> - </replacetokens> - </filterchain> - <copy file="pom.xml" tofile="distribution/pom.xml"> - <filterchain refid="version.filters"/> - </copy> - - <!-- copy across runtime jar file --> - <copy file="lib/${jfreechart.name}-${jfreechart.version}.jar" tofile="distribution/${jfreechart.name}-${jfreechart.version}.jar"/> - - <!-- make the jar --> - <jar jarfile="${jfreechart-bundle-file}" basedir="distribution"/> - - <!-- delete the temporary distribution directory --> - <delete dir="distribution"/> - </target> - - <!-- COMPILE THE JUNIT TESTS. --> <target name="compile-tests" depends="compile,compile-experimental" @@ -410,7 +382,7 @@ <!-- ALL --> <target name="all" - depends="compile,compile-experimental,zip-javadocs,zip,targz,maven-bundle,source-jar" + depends="compile,compile-experimental,zip-javadocs,zip,targz,source-jar" description="Compiles JFreeChart, builds the jar files, generates the Javadoc HTML pages and creates distribution files (.zip and .tar.gz)."> <!-- delete the temporary distribution directory --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-31 03:50:02
|
Revision: 3303 http://sourceforge.net/p/jfreechart/code/3303 Author: mungady Date: 2014-08-31 03:49:57 +0000 (Sun, 31 Aug 2014) Log Message: ----------- maven bundle is redundant Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ant/build-fx.xml Modified: branches/jfreechart-1.0.x-branch/ant/build-fx.xml =================================================================== --- branches/jfreechart-1.0.x-branch/ant/build-fx.xml 2014-08-28 03:17:08 UTC (rev 3302) +++ branches/jfreechart-1.0.x-branch/ant/build-fx.xml 2014-08-31 03:49:57 UTC (rev 3303) @@ -21,7 +21,6 @@ <tstamp /> <property name="jfreechart.name" value="jfreechart" /> <property name="jfreechart.version" value="1.0.20-fx-pre" /> - <property name="jfreechart-bundle-file" value="${jfreechart.name}-${jfreechart.version}-bundle.jar" /> <property name="jcommon.name" value="jcommon" /> <property name="jcommon.version" value="1.0.23" /> <property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/> @@ -42,7 +41,6 @@ <include name="servlet.jar"/> </fileset> </path> - </target> <!-- Compile the JFreeChart classes --> @@ -302,33 +300,6 @@ </target> - <target name="maven-bundle" depends="zip" > - <!-- make a temporary distribution directory --> - <mkdir dir="distribution"/> - <!-- copy across LICENCE --> - <copy file="licence-LGPL.txt" tofile="distribution/LICENSE.txt"/> - - <filterchain id="version.filters"> - <replacetokens> - <token key="VERSION" value="${jfreechart.version}"/> - <token key="JCOMMON.VERSION" value="${jcommon.version}"/> - </replacetokens> - </filterchain> - <copy file="pom.xml" tofile="distribution/pom.xml"> - <filterchain refid="version.filters"/> - </copy> - - <!-- copy across runtime jar file --> - <copy file="lib/${jfreechart.name}-${jfreechart.version}.jar" tofile="distribution/${jfreechart.name}-${jfreechart.version}.jar"/> - - <!-- make the jar --> - <jar jarfile="${jfreechart-bundle-file}" basedir="distribution"/> - - <!-- delete the temporary distribution directory --> - <delete dir="distribution"/> - </target> - - <!-- COMPILE THE JUNIT TESTS. --> <target name="compile-tests" depends="compile,compile-experimental" @@ -389,7 +360,7 @@ <!-- ALL --> <target name="all" - depends="compile,compile-experimental,zip-javadocs,zip,targz,maven-bundle" + depends="compile,compile-experimental,zip-javadocs,zip,targz" description="Compiles JFreeChart, builds the jar files, generates the Javadoc HTML pages and creates distribution files (.zip and .tar.gz)."> <!-- delete the temporary distribution directory --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-28 03:17:13
|
Revision: 3302 http://sourceforge.net/p/jfreechart/code/3302 Author: mungady Date: 2014-08-28 03:17:08 +0000 (Thu, 28 Aug 2014) Log Message: ----------- 2014-08-29 David Gilbert <dav...@ob...> (Patch from Simon Legner attached to bug 1129) * org/jfree/chart/ChartPanel.java (actionPerformed): Localise error messages, (saveAsSVG): Likewise, (saveAsPDF): Likewise. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/chart/ChartPanel.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle.properties branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle_de.properties Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-25 05:59:20 UTC (rev 3301) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-28 03:17:08 UTC (rev 3302) @@ -1,5 +1,25 @@ +2014-08-29 David Gilbert <dav...@ob...> + + (Patch from Simon Legner attached to bug 1129) + * org/jfree/chart/ChartPanel.java + (actionPerformed): Localise error messages, + (saveAsSVG): Likewise, + (saveAsPDF): Likewise. + 2014-08-24 David Gilbert <dav...@ob...> + * org/jfree/chart/renderer/BarRenderer3D.java + (drawItem): Add element hinting, + * org/jfree/chart/renderer/IntervalBarRenderer.java + (drawInterval): Add element hinting, + * org/jfree/chart/renderer/LayeredBarRenderer.java + (drawHorizontalItem): Add element hinting, + (drawVerticalItem): Likewise, + * org/jfree/chart/renderer/LevelRenderer.java + (drawItem): Add element hinting. + +2014-08-24 David Gilbert <dav...@ob...> + * org/jfree/chart/renderer/AbstractRenderer.java (beginElementGroup): New method, (endElementGroup): Likewise, Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/ChartPanel.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/ChartPanel.java 2014-08-25 05:59:20 UTC (rev 3301) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/ChartPanel.java 2014-08-28 03:17:08 UTC (rev 3302) @@ -44,6 +44,7 @@ * Ulrich Voigt - patch 2686040; * Alessandro Borges - patch 1460845; * Martin Hoeller; + * Simon Legner - patch from bug 1129; * * Changes (from 28-Jun-2001) * -------------------------- @@ -170,6 +171,7 @@ * 02-Jul-2013 : Use ParamChecks class (DG); * 12-Sep-2013 : Provide auto-detection for JFreeSVG and OrsonPDF * libraries (no compile time dependencies) (DG); + * 29-Aug-2014 : Localisation updates from patch attached to bug 1129 (SL); * */ @@ -1722,16 +1724,18 @@ doSaveAs(); } catch (IOException e) { - JOptionPane.showMessageDialog(this, "I/O error occurred.", - "Save As PNG", JOptionPane.WARNING_MESSAGE); + JOptionPane.showMessageDialog(this, "I/O error occurred.", + localizationResources.getString("Save_as_PNG"), + JOptionPane.WARNING_MESSAGE); } } else if (command.equals(SAVE_AS_SVG_COMMAND)) { try { saveAsSVG(null); } catch (IOException e) { - JOptionPane.showMessageDialog(this, "I/O error occurred.", - "Save As SVG", JOptionPane.WARNING_MESSAGE); + JOptionPane.showMessageDialog(this, "I/O error occurred.", + localizationResources.getString("Save_as_SVG"), + JOptionPane.WARNING_MESSAGE); } } else if (command.equals(SAVE_AS_PDF_COMMAND)) { @@ -2752,7 +2756,8 @@ String fileExists = localizationResources.getString( "FILE_EXISTS_CONFIRM_OVERWRITE"); int response = JOptionPane.showConfirmDialog(this, - fileExists, "Save As SVG", + fileExists, + localizationResources.getString("Save_as_SVG"), JOptionPane.OK_CANCEL_OPTION); if (response == JOptionPane.CANCEL_OPTION) { file = null; @@ -2871,7 +2876,8 @@ String fileExists = localizationResources.getString( "FILE_EXISTS_CONFIRM_OVERWRITE"); int response = JOptionPane.showConfirmDialog(this, - fileExists, "Save As PDF", + fileExists, + localizationResources.getString("Save_as_PDF"), JOptionPane.OK_CANCEL_OPTION); if (response == JOptionPane.CANCEL_OPTION) { file = null; Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle.properties =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle.properties 2014-08-25 05:59:20 UTC (rev 3301) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle.properties 2014-08-28 03:17:08 UTC (rev 3302) @@ -4,6 +4,7 @@ # -------------------------- # 31-Aug-2003 : Initial version (AL); # 27-Nov-2013 : Added PNG..., PDF..., Save_as and SVG... (DG) +# 29-Aug-2014 : Applied patch from Simon04 for bug 1129; # Auto_Range=Auto Range @@ -22,6 +23,9 @@ Range_Axis=Range Axis Save_as=Save as Save_as...=Save as... +Save_as_PDF=Save as PDF +Save_as_PNG=Save as PNG +Save_as_SVG=Save as SVG SVG...=SVG... SVG_Files=SVG Files Zoom_In=Zoom In Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle_de.properties =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle_de.properties 2014-08-25 05:59:20 UTC (rev 3301) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/LocalizationBundle_de.properties 2014-08-28 03:17:08 UTC (rev 3302) @@ -1,21 +1,32 @@ -# org.jfree.chart.ChartPanel ResourceBundle properties file - german version -# -# Changes (from 31-Aug-2003) -# -------------------------- -# 31-Aug-2003 : Initial version (AL); -# 15-Mar-2004 : Revised version (Christian W. Zuckschwerdt); -# - -Auto_Range=Autojustage -All_Axes=Beide Achsen -Chart=Diagramm -Chart_Properties=Diagramm-Eigenschaften -Copy=Kopieren -Domain_Axis=Horizontale Achse -PNG_Image_Files=PNG Datei (Portable Network Graphics) (*.png) -Print...=Drucken... -Properties...=Eigenschaften... -Save_as...=Speichern unter... -Range_Axis=Vertikale Achse -Zoom_In=Hineinzoomen -Zoom_Out=Herauszoomen +# org.jfree.chart.ChartPanel ResourceBundle properties file - german version +# +# Changes (from 31-Aug-2003) +# -------------------------- +# 31-Aug-2003 : Initial version (AL); +# 15-Mar-2004 : Revised version (Christian W. Zuckschwerdt); +# 29-Aug-2014 : Applied patch from Simon04 for bug 1129; +# + +Auto_Range=Autojustage +All_Axes=Beide Achsen +Chart=Diagramm +Chart_Properties=Diagramm-Eigenschaften +Copy=Kopieren +Domain_Axis=Horizontale Achse +PNG_Image_Files=PNG-Datei (Portable Network Graphics) (*.png) +Print...=Drucken... +Properties...=Eigenschaften... +Save_as...=Speichern unter... +Range_Axis=Vertikale Achse +Zoom_In=Hineinzoomen +Zoom_Out=Herauszoomen +FILE_EXISTS_CONFIRM_OVERWRITE=Die Datei existiert bereit. Soll die Datei wirklich \u00c3\u00bcberschrieben werden? +PNG...=PNG... +PDF...=PDF... +PDF_Files=PDF-Datei (Portable Document Format) (*.pdf) +Save_as=Speichern unter +Save_as_PDF=Speichern als PDF +Save_as_PNG=Speichern als PNG +Save_as_SVG=Speichern als SVG +SVG...=SVG... +SVG_Files=SVG-Dateien (Scalable Vector Graphics) (*.svg) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-24 06:00:44
|
Revision: 3300 http://sourceforge.net/p/jfreechart/code/3300 Author: mungady Date: 2014-08-24 06:00:36 +0000 (Sun, 24 Aug 2014) Log Message: ----------- 2014-08-24 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/BarRenderer3D.java (drawItem): Add element hinting, * org/jfree/chart/renderer/IntervalBarRenderer.java (drawInterval): Add element hinting, * org/jfree/chart/renderer/LayeredBarRenderer.java (drawHorizontalItem): Add element hinting, (drawVerticalItem): Likewise, * org/jfree/chart/renderer/LevelRenderer.java (drawItem): Add element hinting. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BarRenderer3D.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/IntervalBarRenderer.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LayeredBarRenderer.java 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/BarRenderer3D.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BarRenderer3D.java 2014-08-24 05:32:49 UTC (rev 3299) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/BarRenderer3D.java 2014-08-24 06:00:36 UTC (rev 3300) @@ -96,7 +96,8 @@ * 11-Jun-2012 : Utilise new PaintAlpha class - patch 3204823 from DaveLaw (DG); * 03-Jul-2013 : Use ParamChecks (DG); * 11-Mar-2014 : Check visible series (DG); - * + * 24-Aug-2014 : Add element hinting (DG); + * */ package org.jfree.chart.renderer.category; @@ -256,7 +257,6 @@ fireChangeEvent(); } - /** * Initialises the renderer and returns a state object that will be passed * to subsequent calls to the drawItem method. This method gets called @@ -705,14 +705,17 @@ // draw the bar... Rectangle2D bar; - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { bar = new Rectangle2D.Double(barL0, barW0, barLength, state.getBarWidth()); - } - else { + } else { bar = new Rectangle2D.Double(barW0, barL0, state.getBarWidth(), barLength); } + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getRowKey(row), + dataset.getColumnKey(column)); + } Paint itemPaint = getItemPaint(row, column); g2.setPaint(itemPaint); g2.fill(bar); @@ -759,9 +762,12 @@ } g2.draw(bar3dTop); } + if (state.getElementHinting()) { + endElementGroup(g2); + } - CategoryItemLabelGenerator generator - = getItemLabelGenerator(row, column); + CategoryItemLabelGenerator generator = getItemLabelGenerator(row, + column); if (generator != null && isItemLabelVisible(row, column)) { drawItemLabel(g2, dataset, row, column, plot, generator, bar, (value < 0.0)); Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/IntervalBarRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/IntervalBarRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/IntervalBarRenderer.java 2014-08-24 06:00:36 UTC (rev 3300) @@ -63,6 +63,8 @@ * interval (DG); * 19-May-2009 : Fixed FindBugs warnings, patch by Michal Wozniak (DG); * 30-Oct-2011 : Fixed alignment when setMaximumBarWidth is applied (DG); + * 24-Aug-2014 : Add element hinting for JFreeSVG (DG); + * */ package org.jfree.chart.renderer.category; @@ -142,8 +144,7 @@ IntervalCategoryDataset d = (IntervalCategoryDataset) dataset; drawInterval(g2, state, dataArea, plot, domainAxis, rangeAxis, d, row, column); - } - else { + } else { super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); } @@ -163,14 +164,9 @@ * @param row the row index (zero-based). * @param column the column index (zero-based). */ - protected void drawInterval(Graphics2D g2, - CategoryItemRendererState state, - Rectangle2D dataArea, - CategoryPlot plot, - CategoryAxis domainAxis, - ValueAxis rangeAxis, - IntervalCategoryDataset dataset, - int row, + protected void drawInterval(Graphics2D g2, CategoryItemRendererState state, + Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, + ValueAxis rangeAxis, IntervalCategoryDataset dataset, int row, int column) { int visibleRow = state.getVisibleSeriesIndex(row); @@ -221,8 +217,7 @@ rectHeight = state.getBarWidth(); rectWidth = Math.abs(java2dValue1 - java2dValue0); barBase = RectangleEdge.LEFT; - } - else if (orientation == PlotOrientation.VERTICAL) { + } else if (orientation.isVertical()) { // BAR X rectX = calculateBarW0(getPlot(), orientation, dataArea, domainAxis, state, visibleRow, column); @@ -232,10 +227,17 @@ Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight); BarPainter painter = getBarPainter(); + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getRowKey(row), + dataset.getColumnKey(column)); + } if (getShadowsVisible()) { painter.paintBarShadow(g2, this, row, column, bar, barBase, false); } getBarPainter().paintBar(g2, this, row, column, bar, barBase); + if (state.getElementHinting()) { + endElementGroup(g2); + } CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column); Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LayeredBarRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LayeredBarRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LayeredBarRenderer.java 2014-08-24 06:00:36 UTC (rev 3300) @@ -48,6 +48,7 @@ * width setting (thanks to Zoheb Borbora) (DG); * 02-Feb-2007 : Removed author tags all over JFreeChart sources (DG); * 19-May-2009 : Fixed FindBugs warnings, patch by Michal Wozniak (DG); + * 24-Aug-2014 : Add element hinting for JFreeSVG (DG); * */ @@ -191,11 +192,10 @@ int pass) { PlotOrientation orientation = plot.getOrientation(); - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); - } - else if (orientation == PlotOrientation.VERTICAL) { + } else if (orientation.isVertical()) { drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); } @@ -216,14 +216,9 @@ * @param column the column index (zero-based). */ protected void drawHorizontalItem(Graphics2D g2, - CategoryItemRendererState state, - Rectangle2D dataArea, - CategoryPlot plot, - CategoryAxis domainAxis, - ValueAxis rangeAxis, - CategoryDataset dataset, - int row, - int column) { + CategoryItemRendererState state, Rectangle2D dataArea, + CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, + CategoryDataset dataset, int row, int column) { // nothing is drawn for null values... Number dataValue = dataset.getValue(row, column); @@ -244,8 +239,7 @@ if (value <= lclip) { value = lclip; } - } - else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 + } else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 if (value >= uclip) { value = uclip; } @@ -254,8 +248,7 @@ value = lclip; } } - } - else { // cases 9, 10, 11 and 12 + } else { // cases 9, 10, 11 and 12 if (value <= lclip) { return; // bar is not visible } @@ -295,6 +288,11 @@ (rectY + ((seriesCount - 1 - row) * shift)), rectWidth, (rectHeight - (seriesCount - 1 - row) * shift * 2)); + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getRowKey(row), + dataset.getColumnKey(column)); + } + Paint itemPaint = getItemPaint(row, column); GradientPaintTransformer t = getGradientPaintTransformer(); if (t != null && itemPaint instanceof GradientPaint) { @@ -315,8 +313,8 @@ } } - CategoryItemLabelGenerator generator - = getItemLabelGenerator(row, column); + CategoryItemLabelGenerator generator = getItemLabelGenerator(row, + column); if (generator != null && isItemLabelVisible(row, column)) { drawItemLabel(g2, dataset, row, column, plot, generator, bar, (transX1 > transX2)); @@ -343,14 +341,9 @@ * @param column the column index (zero-based). */ protected void drawVerticalItem(Graphics2D g2, - CategoryItemRendererState state, - Rectangle2D dataArea, - CategoryPlot plot, - CategoryAxis domainAxis, - ValueAxis rangeAxis, - CategoryDataset dataset, - int row, - int column) { + CategoryItemRendererState state, Rectangle2D dataArea, + CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, + CategoryDataset dataset, int row, int column) { // nothing is drawn for null values... Number dataValue = dataset.getValue(row, column); @@ -378,18 +371,15 @@ if (value <= lclip) { value = lclip; } - } - else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 + } else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 if (value >= uclip) { value = uclip; - } - else { + } else { if (value <= lclip) { value = lclip; } } - } - else { // cases 9, 10, 11 and 12 + } else { // cases 9, 10, 11 and 12 if (value <= lclip) { return; // bar is not visible } @@ -424,6 +414,12 @@ Rectangle2D bar = new Rectangle2D.Double( (rectX + ((seriesCount - 1 - row) * shift)), rectY, (rectWidth - (seriesCount - 1 - row) * shift * 2), rectHeight); + + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getRowKey(row), + dataset.getColumnKey(column)); + } + Paint itemPaint = getItemPaint(row, column); GradientPaintTransformer t = getGradientPaintTransformer(); if (t != null && itemPaint instanceof GradientPaint) { @@ -432,25 +428,23 @@ g2.setPaint(itemPaint); g2.fill(bar); - // draw the outline... - if (isDrawBarOutline() - && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { - Stroke stroke = getItemOutlineStroke(row, column); - Paint paint = getItemOutlinePaint(row, column); - if (stroke != null && paint != null) { - g2.setStroke(stroke); - g2.setPaint(paint); - g2.draw(bar); - } + if (isDrawBarOutline() && state.getBarWidth() + > BAR_OUTLINE_WIDTH_THRESHOLD) { + g2.setStroke(getItemOutlineStroke(row, column)); + g2.setPaint(getItemOutlinePaint(row, column)); + g2.draw(bar); } + if (state.getElementHinting()) { + endElementGroup(g2); + } + // draw the item labels if there are any... - double transX1 = rangeAxis.valueToJava2D(base, dataArea, edge); - double transX2 = rangeAxis.valueToJava2D(value, dataArea, edge); - - CategoryItemLabelGenerator generator - = getItemLabelGenerator(row, column); + CategoryItemLabelGenerator generator = getItemLabelGenerator(row, + column); if (generator != null && isItemLabelVisible(row, column)) { + double transX1 = rangeAxis.valueToJava2D(base, dataArea, edge); + double transX2 = rangeAxis.valueToJava2D(value, dataArea, edge); drawItemLabel(g2, dataset, row, column, plot, generator, bar, (transX1 > transX2)); } 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-08-24 05:32:49 UTC (rev 3299) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/LevelRenderer.java 2014-08-24 06:00:36 UTC (rev 3300) @@ -45,6 +45,7 @@ * 23-Jan-2009 : Set more appropriate default shape in legend (DG); * 23-Jan-2009 : Added support for seriesVisible flags - see patch * 2511330 (PK) + * 24-Aug-2014 : Add element hinting for JFreeSVG (DG); * */ @@ -180,12 +181,10 @@ public CategoryItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info) { - CategoryItemRendererState state = super.initialise(g2, dataArea, plot, rendererIndex, info); calculateItemWidth(plot, dataArea, rendererIndex, state); return state; - } /** @@ -210,8 +209,7 @@ PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.HORIZONTAL) { space = dataArea.getHeight(); - } - else if (orientation == PlotOrientation.VERTICAL) { + } else if (orientation == PlotOrientation.VERTICAL) { space = dataArea.getWidth(); } double maxWidth = space * getMaximumItemWidth(); @@ -228,8 +226,7 @@ - categoryMargin - currentItemMargin); if ((rows * columns) > 0) { state.setBarWidth(Math.min(used / (rows * columns), maxWidth)); - } - else { + } else { state.setBarWidth(Math.min(used, maxWidth)); } } @@ -256,10 +253,9 @@ int column) { // calculate bar width... double space; - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { space = dataArea.getHeight(); - } - else { + } else { space = dataArea.getWidth(); } double barW0 = domainAxis.getCategoryStart(column, getColumnCount(), @@ -276,8 +272,7 @@ categoryCount, seriesCount); barW0 = barW0 + row * (seriesW + seriesGap) + (seriesW / 2.0) - (state.getBarWidth() / 2.0); - } - else { + } else { barW0 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() / 2.0; @@ -329,23 +324,31 @@ // draw the bar... Line2D line; double x, y; - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { x = barL; y = barW0 + state.getBarWidth() / 2.0; line = new Line2D.Double(barL, barW0, barL, barW0 + state.getBarWidth()); - } - else { + } else { x = barW0 + state.getBarWidth() / 2.0; y = barL; line = new Line2D.Double(barW0, barL, barW0 + state.getBarWidth(), barL); } + + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getRowKey(row), + dataset.getColumnKey(column)); + } + Stroke itemStroke = getItemStroke(row, column); Paint itemPaint = getItemPaint(row, column); g2.setStroke(itemStroke); g2.setPaint(itemPaint); g2.draw(line); + if (state.getElementHinting()) { + endElementGroup(g2); + } CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-24 05:32:59
|
Revision: 3299 http://sourceforge.net/p/jfreechart/code/3299 Author: mungady Date: 2014-08-24 05:32:49 +0000 (Sun, 24 Aug 2014) Log Message: ----------- 2014-08-24 David Gilbert <dav...@ob...> * org/jfree/chart/renderer/AbstractRenderer.java (beginElementGroup): New method, (endElementGroup): Likewise, * org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java (beginElementGroup): Call superclass, (endElementGroup): Moved to superclass, * org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java (beginElementGroup): New method, * org/jfree/chart/renderer/xy/XYBarRenderer.java (drawItem): Add element hinting, * org/jfree/data/KeyedValuesItemKey.java: New file, * org/jfree/data/xy/XYItemKey.java: New file. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/AbstractRenderer.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYBarRenderer.java Added Paths: ----------- branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValuesItemKey.java branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYItemKey.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-22 17:12:54 UTC (rev 3298) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-24 05:32:49 UTC (rev 3299) @@ -1,3 +1,18 @@ +2014-08-24 David Gilbert <dav...@ob...> + + * org/jfree/chart/renderer/AbstractRenderer.java + (beginElementGroup): New method, + (endElementGroup): Likewise, + * org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java + (beginElementGroup): Call superclass, + (endElementGroup): Moved to superclass, + * org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java + (beginElementGroup): New method, + * org/jfree/chart/renderer/xy/XYBarRenderer.java + (drawItem): Add element hinting, + * org/jfree/data/KeyedValuesItemKey.java: New file, + * org/jfree/data/xy/XYItemKey.java: New file. + 2014-08-22 David Gilbert <dav...@ob...> Change suggested by Ulrich Voigt: Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/AbstractRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/AbstractRenderer.java 2014-08-22 17:12:54 UTC (rev 3298) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/AbstractRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -92,6 +92,7 @@ * 05-Jul-2012 : No need for BooleanUtilities now that min JDK = 1.4.2 (DG); * 03-Jul-2013 : Use ParamChecks (DG); * 09-Apr-2014 : Remove use of ObjectList (DG); + * 24-Aug-2014 : Add begin/endElementGroup() (DG); * */ @@ -100,6 +101,7 @@ import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; +import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Shape; import java.awt.Stroke; @@ -117,6 +119,7 @@ import javax.swing.event.EventListenerList; +import org.jfree.chart.ChartHints; import org.jfree.chart.HashUtilities; import org.jfree.chart.event.RendererChangeEvent; import org.jfree.chart.event.RendererChangeListener; @@ -127,6 +130,7 @@ import org.jfree.chart.title.LegendTitle; import org.jfree.chart.util.CloneUtils; import org.jfree.chart.util.ParamChecks; +import org.jfree.data.ItemKey; import org.jfree.io.SerialUtilities; import org.jfree.ui.TextAnchor; import org.jfree.util.BooleanList; @@ -481,6 +485,36 @@ */ public abstract DrawingSupplier getDrawingSupplier(); + /** + * Adds a {@code KEY_BEGIN_ELEMENT} hint to the graphics target. This + * hint is recognised by <b>JFreeSVG</b> (in theory it could be used by + * other {@code Graphics2D} implementations also). + * + * @param g2 the graphics target ({@code null} not permitted). + * @param key the key ({@code null} not permitted). + * + * @see #endElementGroup(java.awt.Graphics2D) + * @since 1.0.20 + */ + protected void beginElementGroup(Graphics2D g2, ItemKey key) { + ParamChecks.nullNotPermitted(key, "key"); + Map m = new HashMap(1); + m.put("ref", key.toJSONString()); + g2.setRenderingHint(ChartHints.KEY_BEGIN_ELEMENT, m); + } + + /** + * Adds a {@code KEY_END_ELEMENT} hint to the graphics target. + * + * @param g2 the graphics target ({@code null} not permitted). + * + * @see #beginElementGroup(java.awt.Graphics2D, org.jfree.data.ItemKey) + * @since 1.0.20 + */ + protected void endElementGroup(Graphics2D g2) { + g2.setRenderingHint(ChartHints.KEY_END_ELEMENT, Boolean.TRUE); + } + // SERIES VISIBLE (not yet respected by all renderers) /** Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java 2014-08-22 17:12:54 UTC (rev 3298) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -130,7 +130,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.jfree.chart.ChartHints; import org.jfree.chart.LegendItem; import org.jfree.chart.LegendItemCollection; import org.jfree.chart.axis.CategoryAxis; @@ -157,7 +156,7 @@ import org.jfree.chart.util.CloneUtils; import org.jfree.chart.util.ParamChecks; import org.jfree.chart.util.TextUtils; -import org.jfree.data.ItemKey; +import org.jfree.data.KeyedValues2DItemKey; import org.jfree.data.Range; import org.jfree.data.category.CategoryDataset; import org.jfree.data.general.DatasetUtilities; @@ -599,8 +598,7 @@ if (data != null) { this.rowCount = data.getRowCount(); this.columnCount = data.getColumnCount(); - } - else { + } else { this.rowCount = 0; this.columnCount = 0; } @@ -623,34 +621,23 @@ /** * Adds a {@code KEY_BEGIN_ELEMENT} hint to the graphics target. This - * hint is recognised by <b>JFreeSVG</b>. + * hint is recognised by <b>JFreeSVG</b> (in theory it could be used by + * other {@code Graphics2D} implementations also). * * @param g2 the graphics target ({@code null} not permitted). - * @param key the key ({@code null} not permitted). + * @param rowKey the row key that identifies the element ({@code null} not + * permitted). + * @param columnKey the column key that identifies the element + * ({@code null} not permitted). * - * @see #endElementGroup(java.awt.Graphics2D) * @since 1.0.20 */ - protected void beginElementGroup(Graphics2D g2, ItemKey key) { - ParamChecks.nullNotPermitted(key, "key"); - Map m = new HashMap(1); - m.put("ref", key.toJSONString()); - g2.setRenderingHint(ChartHints.KEY_BEGIN_ELEMENT, m); + protected void beginElementGroup(Graphics2D g2, Comparable rowKey, + Comparable columnKey) { + beginElementGroup(g2, new KeyedValues2DItemKey(rowKey, columnKey)); } /** - * Adds a {@code KEY_END_ELEMENT} hint to the graphics target. - * - * @param g2 the graphics target ({@code null} not permitted). - * - * @see #beginElementGroup(java.awt.Graphics2D, org.jfree.data.ItemKey) - * @since 1.0.20 - */ - protected void endElementGroup(Graphics2D g2) { - g2.setRenderingHint(ChartHints.KEY_END_ELEMENT, Boolean.TRUE); - } - - /** * Returns the range of values the renderer requires to display all the * items from the specified dataset. * Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java 2014-08-22 17:12:54 UTC (rev 3298) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -122,7 +122,8 @@ * 11-Jan-2014 : Fix error in fillDomainGridBand method (DG); * 07-Apr-2014 : Don't use ObjectList anymore (DG); * 29-Jul-2014 : Add rendering hint to normalise domain and range lines (DG); - * + * 24-Aug-2014 : Add beginElementGroup() method, part of JFreeSVG support (DG); + * */ package org.jfree.chart.renderer.xy; @@ -180,6 +181,7 @@ import org.jfree.data.Range; import org.jfree.data.general.DatasetUtilities; import org.jfree.data.xy.XYDataset; +import org.jfree.data.xy.XYItemKey; import org.jfree.text.TextUtilities; import org.jfree.ui.GradientPaintTransformer; import org.jfree.ui.Layer; @@ -300,7 +302,7 @@ * @param g2 the graphics device. * @param dataArea the area inside the axes. * @param plot the plot. - * @param data the data. + * @param dataset the dataset. * @param info an optional info collection object to return data back to * the caller. * @@ -308,10 +310,28 @@ */ @Override public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, - XYPlot plot, XYDataset data, PlotRenderingInfo info) { - return new XYItemRendererState(info); + XYPlot plot, XYDataset dataset, PlotRenderingInfo info) { + XYItemRendererState state = new XYItemRendererState(info); + return state; } + /** + * Adds a {@code KEY_BEGIN_ELEMENT} hint to the graphics target. This + * hint is recognised by <b>JFreeSVG</b> (in theory it could be used by + * other {@code Graphics2D} implementations also). + * + * @param g2 the graphics target ({@code null} not permitted). + * @param seriesKey the series key that identifies the element + * ({@code null} not permitted). + * @param itemIndex the item index. + * + * @since 1.0.20 + */ + protected void beginElementGroup(Graphics2D g2, Comparable seriesKey, + int itemIndex) { + beginElementGroup(g2, new XYItemKey(seriesKey, itemIndex)); + } + // ITEM LABEL GENERATOR /** Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYBarRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYBarRenderer.java 2014-08-22 17:12:54 UTC (rev 3298) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/XYBarRenderer.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -99,6 +99,7 @@ * 10-May-2012 : Fix findDomainBounds() and findRangeBounds() to account for * non-visible series (DG); * 03-Jul-2013 : Use ParamChecks (DG); + * 24-Aug-2014 : Add begin/endElementGroup() (DG); * */ @@ -813,8 +814,7 @@ if (this.useYInterval) { value0 = intervalDataset.getStartYValue(series, item); value1 = intervalDataset.getEndYValue(series, item); - } - else { + } else { value0 = this.base; value1 = intervalDataset.getYValue(series, item); } @@ -825,8 +825,7 @@ if (!rangeAxis.getRange().intersects(value0, value1)) { return; } - } - else { + } else { if (!rangeAxis.getRange().intersects(value1, value0)) { return; } @@ -851,8 +850,7 @@ if (!domainAxis.getRange().intersects(startX, endX)) { return; } - } - else { + } else { if (!domainAxis.getRange().intersects(endX, startX)) { return; } @@ -884,14 +882,13 @@ Rectangle2D bar = null; PlotOrientation orientation = plot.getOrientation(); - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { // clip left and right bounds to data area bottom = Math.max(bottom, dataArea.getMinX()); top = Math.min(top, dataArea.getMaxX()); bar = new Rectangle2D.Double( bottom, left, top - bottom, translatedWidth); - } - else if (orientation == PlotOrientation.VERTICAL) { + } else if (orientation.isVertical()) { // clip top and bottom bounds to data area bottom = Math.max(bottom, dataArea.getMinY()); top = Math.min(top, dataArea.getMaxY()); @@ -902,27 +899,31 @@ boolean positive = (value1 > 0.0); boolean inverted = rangeAxis.isInverted(); RectangleEdge barBase; - if (orientation == PlotOrientation.HORIZONTAL) { + if (orientation.isHorizontal()) { if (positive && inverted || !positive && !inverted) { barBase = RectangleEdge.RIGHT; - } - else { + } else { barBase = RectangleEdge.LEFT; } - } - else { + } else { if (positive && !inverted || !positive && inverted) { barBase = RectangleEdge.BOTTOM; - } - else { + } else { barBase = RectangleEdge.TOP; } } + + if (state.getElementHinting()) { + beginElementGroup(g2, dataset.getSeriesKey(series), item); + } if (getShadowsVisible()) { this.barPainter.paintBarShadow(g2, this, series, item, bar, barBase, !this.useYInterval); } this.barPainter.paintBar(g2, this, series, item, bar, barBase); + if (state.getElementHinting()) { + endElementGroup(g2); + } if (isItemLabelVisible(series, item)) { XYItemLabelGenerator generator = getItemLabelGenerator(series, @@ -986,8 +987,7 @@ ItemLabelPosition position; if (!negative) { position = getPositiveItemLabelPosition(series, item); - } - else { + } else { position = getNegativeItemLabelPosition(series, item); } Added: branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValuesItemKey.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValuesItemKey.java (rev 0) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/KeyedValuesItemKey.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -0,0 +1,107 @@ +/* =========================================================== + * 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.] + * + * ----------------------- + * KeyedValuesItemKey.java + * ----------------------- + * (C) Copyright 2014, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * Changes: + * -------- + * 18-Aug-2014 : Version 1, based on code from Orson Charts (DG); + * + */ + +package org.jfree.data; + +import java.io.Serializable; +import org.jfree.chart.util.ParamChecks; + +public class KeyedValuesItemKey implements ItemKey, Serializable { + + /** The key for the item. */ + Comparable<? extends Object> key; + + /** + * Creates a new instance. + * + * @param key the key ({@code null} not permitted). + */ + public KeyedValuesItemKey(Comparable<? extends Object> key) { + ParamChecks.nullNotPermitted(key, "key"); + this.key = key; + } + + /** + * Returns the key. + * + * @return The key (never {@code null}). + */ + public Comparable<?> getKey() { + return this.key; + } + + /** + * Tests this instance for equality with an arbitrary object. + * + * @param obj the object ({@code null} not permitted). + * + * @return A boolean. + */ + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof KeyedValuesItemKey)) { + return false; + } + KeyedValuesItemKey that = (KeyedValuesItemKey) obj; + if (!this.key.equals(that.key)) { + return false; + } + return true; + } + + @Override + public String toJSONString() { + StringBuilder sb = new StringBuilder(); + sb.append("{\"key\": \"").append(this.key.toString()).append("\"}"); + return sb.toString(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("KeyedValuesItemKey["); + sb.append(this.key.toString()); + sb.append("]"); + return sb.toString(); + } +} Added: branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYItemKey.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYItemKey.java (rev 0) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/xy/XYItemKey.java 2014-08-24 05:32:49 UTC (rev 3299) @@ -0,0 +1,158 @@ +/* =========================================================== + * 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.] + * + * -------------- + * XYItemKey.java + * -------------- + * (C) Copyright 2014, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * Changes + * ------- + * 22-Aug-2014 : Version 1 (DG); + * + */ + +package org.jfree.data.xy; + +import java.io.Serializable; +import org.jfree.chart.util.ParamChecks; +import org.jfree.data.ItemKey; +import org.jfree.util.ObjectUtilities; + +/** + * An object that references one data item in an {@link XYZDataset}. This is + * used internally to track the data item that a 3D object is related to, if + * any (and later that link is used for chart interaction). Instances of + * this class are immutable. + * + * @param <S> the series key type. + * @since 1.0.20 + */ +public class XYItemKey<S extends Comparable<S>> implements ItemKey, + Comparable<XYItemKey<S>>, Serializable { + + /** A key identifying a series in the dataset. */ + private final S seriesKey; + + /** The index of an item within a series. */ + private final int itemIndex; + + /** + * Creates a new instance. + * + * @param seriesKey the series key. + * @param itemIndex the item index. + */ + public XYItemKey(S seriesKey, int itemIndex) { + ParamChecks.nullNotPermitted(seriesKey, "seriesKey"); + this.seriesKey = seriesKey; + this.itemIndex = itemIndex; + } + + /** + * Returns the series key. + * + * @return The series key (never <code>null</code>). + */ + public S getSeriesKey() { + return this.seriesKey; + } + + /** + * Returns the item index. + * + * @return The item index. + */ + public int getItemIndex() { + return this.itemIndex; + } + + /** + * Tests this instance for equality with an arbitrary object. + * + * @param obj the object to test (<code>null</code> permitted). + * + * @return A boolean. + */ + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof XYItemKey)) { + return false; + } + XYItemKey that = (XYItemKey) obj; + if (!this.seriesKey.equals(that.seriesKey)) { + return false; + } + if (this.itemIndex != that.itemIndex) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 41 * hash + ObjectUtilities.hashCode(this.seriesKey); + hash = 41 * hash + this.itemIndex; + return hash; + } + + @Override + public String toJSONString() { + StringBuilder sb = new StringBuilder(); + sb.append("{\"seriesKey\": \"").append(this.seriesKey.toString()); + sb.append("\", "); + sb.append("\"itemIndex\": ").append(this.itemIndex).append("}"); + return sb.toString(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("XYItemKey[seriesKey="); + sb.append(this.seriesKey.toString()).append(",item="); + sb.append(itemIndex); + sb.append("]"); + return sb.toString(); + } + + @Override + public int compareTo(XYItemKey<S> key) { + int result = this.seriesKey.compareTo(key.seriesKey); + if (result == 0) { + result = this.itemIndex - key.itemIndex; + } + return result; + } + +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2014-08-22 17:13:03
|
Revision: 3298 http://sourceforge.net/p/jfreechart/code/3298 Author: mungady Date: 2014-08-22 17:12:54 +0000 (Fri, 22 Aug 2014) Log Message: ----------- 2014-08-22 David Gilbert <dav...@ob...> Change suggested by Ulrich Voigt: * org/jfree/data/time/FixedMillisecond.java (FixedMillisecond()): Avoid Date creation, (FixedMillisecond(long)): Likewise, (FixedMillisecond(Date)): Redirect to other constructor. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/FixedMillisecond.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-22 13:25:34 UTC (rev 3297) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2014-08-22 17:12:54 UTC (rev 3298) @@ -1,3 +1,11 @@ +2014-08-22 David Gilbert <dav...@ob...> + + Change suggested by Ulrich Voigt: + * org/jfree/data/time/FixedMillisecond.java + (FixedMillisecond()): Avoid Date creation, + (FixedMillisecond(long)): Likewise, + (FixedMillisecond(Date)): Redirect to other constructor. + 2014-08-04 David Gilbert <dav...@ob...> Patch #312 by Ulrich Voigt: Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/FixedMillisecond.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/FixedMillisecond.java 2014-08-22 13:25:34 UTC (rev 3297) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/data/time/FixedMillisecond.java 2014-08-22 17:12:54 UTC (rev 3298) @@ -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,10 +27,10 @@ * --------------------- * FixedMillisecond.java * --------------------- - * (C) Copyright 2002-2008, by Object Refinery Limited. + * (C) Copyright 2002-2014, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); - * Contributor(s): -; + * Contributor(s): Ulrich Voigt; * * Changes * ------- @@ -44,6 +44,7 @@ * ------------- JFREECHART 1.0.x --------------------------------------------- * 06-Oct-2006 : Added peg() method (DG); * 28-May-2008 : Fixed immutability problem (DG); + * 20-Aug-2014 : Remove unnecessary Date object creation in constructors (UV); * */ @@ -65,13 +66,13 @@ private static final long serialVersionUID = 7867521484545646931L; /** The millisecond. */ - private long time; + private final long time; /** * Constructs a millisecond based on the current system time. */ public FixedMillisecond() { - this(new Date()); + this(System.currentTimeMillis()); } /** @@ -80,20 +81,21 @@ * @param millisecond the millisecond (same encoding as java.util.Date). */ public FixedMillisecond(long millisecond) { - this(new Date(millisecond)); + this.time = millisecond; } /** * Constructs a millisecond. * - * @param time the time. + * @param time the time ({@code null} not permitted). */ public FixedMillisecond(Date time) { - this.time = time.getTime(); + this(time.getTime()); } /** - * Returns the date/time. + * Returns the date/time (creates a new {@code Date} instance each time + * this method is called). * * @return The date/time. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |