| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I figured out my problem. The javadoc fro dragOver(DragSourceDragEvent dsde) says that getLocation() returns screen coordinates. This is what gets returned on Windows, while the Mac returns a point in the containing window's coordinate system. This is a bug, I think._______________________________________________
if fixed with the following code:
Point locPt = new Point(dsde.getLocation());
if (isMacintosh)
{
locPt = SwingUtilities.convertPoint(SwingUtilities.getWindowAncestor(this), locPt, this);
}
else
{
SwingUtilities.convertPointFromScreen(locPt, this);
}
Timothy Wall wrote:
My biggest issue is that it hangs at seemingly random points in the drag, eventually coming back after five minutes or so._______________________________________________
I have several automated drag/drop tests that have to be left out of the automated test suite, since they tend to lock up the test run. And this is with a bare minimum D&D implementation with nothing else being done.
On Mar 31, 2004, at 3:19 PM, Tom Condon wrote:
It turns out to be 24 pixels.
Drag and Drop really needs a lot of work on OS X Java. I does not
behave at all like it does on Windows.
I never get my dragExit() method called until I release the mouse.
It does not seem to let me change the cursor to the one I want.
You would think that something as important to the Mac UI as DnD would
be a bigger priority at Apple for Java. It does not seem well
implemented or tested. I hope someone is listening....
I am very frustrated that I have to turn my PC to do development.
GGGrrrrrrrrrr.
Greg Guerin wrote:
Tom Condon <email@hidden> wrote:
In my dragOver() method I get the
position of the event and print it out to standard out after using
SwingUtilities.convertPointFromScreen(). The y value of the point seems to
be off by
about 20 pixels.
Maybe it's a coincidence or maybe it's a clue, but "about 20 pixels" is the
height of a Frame/JFrame's title bar. I forget whether this is reflected
in the Frame's insets or not.
-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Re: Drag and Drop Problems (From: Greg Guerin <email@hidden>) | |
| >Re: Drag and Drop Problems (From: Tom Condon <email@hidden>) | |
| >Re: Drag and Drop Problems (From: Timothy Wall <email@hidden>) | |
| >Re: Drag and Drop Problems (From: Tom Condon <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.