-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.4.2
-
x86
-
windows_nt
Name: gm110360 Date: 04/14/2004
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 OS VERSION :
Windows NT Version 4.0
A DESCRIPTION OF THE PROBLEM :
From
http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/AbstractAction.html
"Standard behaviors like the get and set methods for Action object properties (icon, text, and enabled) are defined here."
As far as I can see, this is false. There are *no* methods in AbstractAction for changing the text and icon params passed to the
constructor. (The enabled property is of course OK).
If the above statement is correct, then it seems likely that this feature should be added. There is a constructor which takes text+icon
http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/AbstractAction.html#AbstractAction(java.lang.String, javax.swing.Icon)
but no corresponding get/set. Seems a bit weird for an object to behave this way, no?
Such a feature is useful for responding to changes in user preferences for language and icon size. For example, to change the size of icons one might write
List toolbarItems = Arrays.asList( fToolbar.getComponents() );
Iterator iter = toolbarItems.iterator();
while ( iter.hasNext() ) {
__ AbstractButton button = (AbstractButton)iter.next();
__button.setIcon(blah);
}
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 192525)
======================================================================