From: SourceForge.net <no...@so...> - 2008-11-13 17:05:46
|
Bugs item #2216511, was opened at 2008-11-02 15:36 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2216511&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Demo Group: 1.0.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: rcg (rc9000) Assigned to: Nobody/Anonymous (nobody) Summary: SWTBarChartDemo1 throws RuntimeException Initial Comment: When running /src/org/jfree/experimental/chart/swt/demo/SWTBarChartDemo1.java the setPaint method from /src/org/jfree/experimental/swt/SWTGraphics2D.java throws a RuntimeException("Can only handle 'Color' at present.") exception. The reason for this is that at some time a GradientPaint instead of Paint is passed to this method. As for a quick fix everything works correctly if the method is changed e.g. as follows: public void setPaint(Paint paint) { //System.out.println(paint.getClass().getName()); if (paint instanceof Color) { setColor((Color) paint); } else if(paint instanceof GradientPaint){ GradientPaint gp = (GradientPaint) paint; setColor(gp.getColor1()); }else { throw new RuntimeException("Can only handle 'Color' at present."); } } This error also appears when trying to create other BarCharts via SWT. The JFreeChart version used is 1.0.11. ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-13 17:05 Message: Thanks for the report. I'll fix this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2216511&group_id=15494 |