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

Too easy to clobber Autoscroller deactivation/activation in TransferHandler

XMLWordPrintable

    • Cause Known
    • x86
    • solaris_10

      FULL PRODUCT VERSION :
      java version "1.6.0-rc"


      A DESCRIPTION OF THE PROBLEM :
      If the TransferHandler's exportAsDrag method is overriden so that it does not invoke the super implementation the autoscroller deactivation/activation mechanism in DragHandler will not be invoked. The DragHandler is only created in exportAsDrag and it appears to have sole responsibility to deactivate/activate autoscrolling when a drag is enabled.

      Some options:
      1. Document that its the responsibility of this method to activate/deactivate autoscrolling.
      2. Document that the user should always invoke the implementation if overriden
      3. Design an alternative mechanism that will always ensure autoscroll deactivation/activation when draggin is occuring



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Read code, see that this is the only place where the mechanism is instantiated and plugged in.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      that it will not be breakable
      ACTUAL -
      it can be broken

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      read the source for TransferHandler, see that the mechanism is used in only one place.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      1. Always invoke the super method.
      2. Deactivate/Activate autoscrolling on your own

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: