change drag sensitivity (java doc included)


Hi all,

The the following is taken from
:http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/index.html

4415175: New API to Globally Change the DnD Gesture Motion Threshold
    The drag motion gesture threshold represents the number of pixels the cursor is dragged before the data transfer system initiates a drag operation. Prior to this release, this was hard-coded to 5 pixels. As of release 5.0, there is support for picking up the desktop properties for drag sensitivity and mapping it to the threshold, and new API that allows users to get and change this threshold. The new API includes:
        * java.awt.dnd.DragSource.getDragThreshold()
        * java.awt.dnd.drag.threshold (a property)
        * java.awt.dnd.MouseDragGestureRecognizer (updated class spec)

How can I change the drag sensitivity? Im unsure how to implement the above.

Thanks

iAwinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

StillUnAwareCommented:
As in DragSource.getDragThreshold() is said, You can set the system property "wt.dnd.drag.threshold" to some pixel count:

System.setProperty("wt.dnd.drag.threshold", "10");
iAwinAuthor Commented:

Thanks I tried this:
     System.setProperty("java.awt.dnd.drag.threshold", "10");

But does'nt work for me
StillUnAwareCommented:
it should be "awt.dnd.drag.threshold".

another option would be this:

Toolkit.getDefaultToolkit().setDesktopProperty("DnD.gestureMotionThreshold");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

iAwinAuthor Commented:
"awt.dnd.drag.threshold" works

Thanks very much
iAwinAuthor Commented:

Why did'nt "java.awt.dnd.drag.threshold" work?

Is'nt it the same really?
StillUnAwareCommented:
glad to help
StillUnAwareCommented:
I guess not, and it shouldn't. As two strings "java.awt.dnd.drag.threshold", "awt.dnd.drag.threshold" are different, the property names also are different or meaningless
iAwinAuthor Commented:

thanks again
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.