Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-786

ClassCastException if you operate on multiple selection containing a line element with a toolbar formatting button

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.0.GA
    • Fix Version/s: 3.5.0
    • Component/s: User Interface
    • Labels:
      None
    • Environment:
      WinXP
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      Create a bunch of text fields on the design view. Create a line element. Select all the elements on the view and use the FontColor toolbar button to assign a font color. You will get a ClassCastException like the one below. The toolbar buttons should become inactive if there are any elements in a selection upon which they cannot operate (the same as if they were the only element in the selection). Optionally, they can remain active, but the elements that are ineligible to be operated on in this way should be filtered out behind the scenes so we don't get the exception.

      java.lang.ClassCastException: org.pentaho.reportdesigner.crm.report.model.LineReportElement
      at org.pentaho.reportdesigner.crm.report.commands.FontColorCommand$2.actionPerformed(FontColorCommand.java:237)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
      at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
      at java.awt.Component.processMouseEvent(Component.java:5517)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
      at java.awt.Component.processEvent(Component.java:5282)
      at java.awt.Container.processEvent(Container.java:1966)
      at java.awt.Component.dispatchEventImpl(Component.java:3984)
      at java.awt.Container.dispatchEventImpl(Container.java:2024)
      at java.awt.Component.dispatchEvent(Component.java:3819)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
      at java.awt.Container.dispatchEventImpl(Container.java:2010)
      at java.awt.Window.dispatchEventImpl(Window.java:1791)
      at java.awt.Component.dispatchEvent(Component.java:3819)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

        Attachments

          Activity

            People

            • Assignee:
              gdavid Golda Thomas
              Reporter:
              jpshedesky Jared Pshedesky (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: