From: Nathaniel G. A. <nat...@us...> - 2004-05-31 21:12:01
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32131/src/java/org/krysalis/jcharts Modified Files: Legend.java Log Message: Index: Legend.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/Legend.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Legend.java 31 May 2004 16:26:13 -0000 1.10 --- Legend.java 31 May 2004 21:11:51 -0000 1.11 *************** *** 335,351 **** { //---get the bounds of the shape ! try ! { ! Double shapeWidthDouble = new Double( ( ( (Shape) this.shapes.get( i ) ).getBounds2D().getWidth() ) ); ! float shapeWidth = shapeWidthDouble.floatValue(); ! this.iconSide = Math.max(this.iconSide, shapeWidth); ! } ! catch (NullPointerException npe) ! { ! // Looks like in 0.74 it was quite acceptable to make shape = null ! // we should probably catch all these and render a "null" shape to the legend ! System.err.println("Warning: legend shape is null"); ! npe.printStackTrace(); ! } } } --- 335,351 ---- { //---get the bounds of the shape ! try ! { ! Double shapeWidthDouble = new Double( ( ( (Shape) this.shapes.get( i ) ).getBounds2D().getWidth() ) ); ! float shapeWidth = shapeWidthDouble.floatValue(); ! this.iconSide = Math.max(this.iconSide, shapeWidth); ! } ! catch (NullPointerException npe) ! { ! // Looks like in 0.74 it was quite acceptable to make shape = null ! // we should probably catch all these and render a "null" shape to the legend ! System.err.println("Warning: legend shape is null"); ! npe.printStackTrace(); ! } } } |