Skip to main content



      Home
Home » Archived » Visual Editor (VE) » ClassCastException(IWAV0156E ...
ClassCastException(IWAV0156E ... [message #96250] Wed, 06 July 2005 01:09 Go to next message
Eclipse UserFriend
Originally posted by: no.ddress.here

I am getting a yellow caution triangle on a component where the
foreground and background colors of the component have been set to their
defaults. The jDecorator is an instance of a bean extending JLabel -
setForeground and setBackground are not overridden - that has been
dropped on the design view and had its customizer run. When the
customizer has closed, the generated code includes these statements.

jDecorator.setForeground(java.awt.Color.black);
jDecorator.setBackground(new java.awt.Color(212,208,200));

No exceptions are being thrown to the log, but both the tool tip and
Eclipse status bar report the warning as:

background: java.lang.ClassCastException(IWAV0156E Cannot cast
"java.awt.Color" to be "javax.swing.plaf.ColorUIResource".)
foreground: java.lang.ClassCastException(IWAV0156E Cannot cast
"java.awt.Color" to be "javax.swing.plaf.ColorUIResource".)

Seems to happen as a consequence of the colors being actively set to
their default values by the bean customizer -- cannot reproduce by
simulating manually using a JLabel. Rather, only occurs where the
setters are being called from a customizer with values retrieved using
the getters. VE generates the above code, even though it need not since
the old and new values are the same.

Tricky part is that the warning only shows up after the file containing
the generated code is first closed and reopened. And it will continue
to show up until some sufficient (or random) change is made to the file.
Commenting out those lines, close, open, uncommenting, close, open is
sufficient to make the warning disappear.

Is this enough for you to understand the problem or should I attempt a
test case?

Thanks,
Gerald
Re: ClassCastException(IWAV0156E ... [message #96294 is a reply to message #96250] Wed, 06 July 2005 10:35 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Our customizer guy is out, I think for the week. I've forwarded this to
him to take a look at it when he gets back.

--
Thanks,
Rich Kulp
Re: ClassCastException(IWAV0156E ... [message #608969 is a reply to message #96250] Wed, 06 July 2005 10:35 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Our customizer guy is out, I think for the week. I've forwarded this to
him to take a look at it when he gets back.

--
Thanks,
Rich Kulp
Previous Topic:ClassCastException(IWAV0156E ...
Next Topic:SWT container source problems
Goto Forum:
  


Current Time: Tue Jun 03 20:14:25 EDT 2025

Powered by FUDForum. Page generated in 0.24773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top