ICEfaces
  1. ICEfaces
  2. ICE-1348

AbstractChart shouldn't cast Paint to a Color

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6DR#3, 1.6
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any

      Description

      The jcharts api support the base java.awt.Paint class, but we cast this to a java.awt.Color, which is a subclass. This creates classcastexceptions when using PaintGradients.

      suggested fix:

      --- icefaces\component\src\com\icesoft\faces\component\outputchart\AbstractChart.java 2007-02-23 11:08:27.000000000 -0700
      @@ -200,13 +200,13 @@
                       paintArray[i] = colorMap.getColor(temp[i].trim());
                   }
               } else if (obj instanceof List) {
                   List objList = (List) obj;
                   paintArray = new Paint[objList.size()];
                   for (int i = 0; i < objList.size(); i++) {
      - paintArray[i] = (Paint) objList.get(i);
      + paintArray[i] = (Color) objList.get(i);
                   }
               }
               return paintArray;
           }
       
       

        Activity

        Hide
        Adnan Durrani added a comment -

        Suggested change has been applied to the AbstractChart.java. revision # 13431

        Show
        Adnan Durrani added a comment - Suggested change has been applied to the AbstractChart.java. revision # 13431

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: