-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0, 1.4.0
-
tiger
-
generic
-
generic
Name: boT120536 Date: 03/06/2001
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
The AccessibleValue implementations of the following components:
java.awt.Scrollbar
javax.swing.AbstractButton
javax.swing.JInternalFrame
javax.swing.JSplitPane
javax.swing.JScrollBar
javax.swing.JProgressBar
javax.swing.JSlider
require the argument to setCurrentAccessibleValue(Number) to be an Integer.
Otherwise they completely ignore it.
This makes generic use of that interface impossible, since callers of that
method cannot possibly know that an Integer is required (They will be notified
that the value has not been set by the return value, but they cannot know the
reason for that).
The setCurrentAccessibleValue() implementations should instead call intValue()
on the given Number.
Another way to understand the interface might be that the passed-in value always
has to be same type as getCurrentAccessibleValue() returns. But then a) the
interface specification has to mention it, b) the callers of
setCurrentAccessibleValue() have the problem that in general they do not know
how to create an instance of that subclass.
(Review ID: 118228)
======================================================================
- duplicates
-
JDK-4750760 setCurrentAccessibleValue insists on Integer when API says Number...
-
- Closed
-