Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4422535

AccessibleValue implementation only accept Integers

    XMLWordPrintable

Details

    Description



      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)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              lmonsantsunw Lynn Monsanto (Inactive)
              bonealsunw Bret O'neal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: