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

No easy way to globally change the DND gesture motion threshold

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.3.0
    • client-libs
    • tiger
    • x86
    • windows_nt



      Name: mt13159 Date: 02/14/2001


      Problem
      ~~~~~~~
      5 is way too small of a value for the gestureMotionThreshold, and there is no easy way to change it globally.

      The safest way is to get the MouseDragGestureRecognizer from DragSource which invokes the java.awt.Toolkit to get the appropriate MouseDragGestureRecognizer for a given platform. The value from here comes from Toolkit.getDesktopProperty() which cannot be changed (since the method Toolkit.setDesktopProperty is protected).

      In Swing you can use the UIDefaults class to override certain default behavior, but not this. With the drag motion threshold set at 5, you VERY often get a drag when you do not want one (especially at higher resolutions). There is no easy way to change it w/o using your own DragSource and DragGestureRecognizer (which may have quirks on some platforms, since you are defeating the built in behavior).

      Please allow either (a) some other way to get the gestureMotionThreshold or (b) make Toolkit.setDesktopProperty public, or (c) some other solution to this problem.

      Thanks!
      (Review ID: 112646)
      ======================================================================

            agerasimsunw Alexander Gerasimov (Inactive)
            mthakore Mayank Thakore (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: