JDK-4700552 : RFE: Can't inherit the icons of a LookAndFeel for a custom LookAndFeel
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-06-11
  • Updated: 2004-09-28
  • Resolved: 2004-09-28
Related Reports
Duplicate :  
Description

Name: jk109818			Date: 06/11/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000
[Version 5.00.2195]


A DESCRIPTION OF THE PROBLEM :
As described in
http://developer.java.sun.com/developer/bugParade/bugs/44056
71.html the user should copy the icons out of the plaf to
the own LookAndFeel implementation or reregister the Icons
with the correct classname.

The deadlock is that in future Jdk releases some new icons
may appear that are used e.g. from the JFileChooser which
will cause the created version crashing with a NullPointer
because of missing icons.

What we need is a possiblility to inherit the resources
(specially icons) from the inherited LookAndFeel.

I see different RFE's:
1. Make LookAndFeel.makeIcon(final Class baseClass, final
String gifFile) not static and so overwritable (we would
then replace the baseClass with our inherited
LookAndFeelClass
2. Extend UIDefaults.LazyValue with a replacable
class/resourceName so we can iterate over table.entrySet()
in our initComponentDefaults and replace the
UIDefault.LazyValues instead of getting null and not
knowing which icon-name failed.
3. Fix the used icon-resources of LookAndFeel for future
Jdk releases.

This bug can be reproduced always.
(Review ID: 153458) 
======================================================================

Comments
EVALUATION I believe you just fixed this Shannon. ###@###.### 2004-09-24 Yes, I fixed it such that icons not defined along with the look and feel subclass will be inherited from the parent. That is, the search for icons is now recursive. This was fixed as bug number 5086089. ###@###.### 2004-09-28
28-09-2004