Name: jk109818 Date: 12/12/2002
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
(OS irrelevant - documentation bug)
A DESCRIPTION OF THE PROBLEM :
The documentation for Action.SMALL_ICON:
http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/Action.html#SMALL_ICON
does not specify what the type of the value should be.
Looking at the AbstractAction API, or AbstractButton source
code etc., it is clear it should be Icon. But it would not
be obvious from this Javadoc that it is not (e.g.) Image.
Please clarify the Javadoc to specify the exact type
(assignable class) of the attribute value.
NAME, SHORT_DESCRIPTION, and LONG_DESCRIPTION should be
String's, this is pretty clear. ACCELERATOR_KEY is clear.
ACTION_COMMAND_KEY and MNEMONIC_KEY imply their types but do
not state them very clearly.
Doc for DEFAULT is also pretty mysterious:
"Useful constants that can be used as the storage-retrieval
key when setting or getting one of this object's properties
(text or icon)."
One other thing - says that setEnabled() sends a
PropertyChangeEvent, but there is no corresponding
PROP_ENABLED (Boolean type) documented. I guess you are
supposed to infer that the property name is "enabled" and of
type Boolean.
REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 166301)
======================================================================
|