Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1.4.2 DnD of custom dataflavor?



Having just had to update to 1.4.2 to get round the italic/bold glyph issue in 1.3.1, DnD of custom dataflavors stopped working :(
We use:
new DataFlavor(Class.forName("javax.swing.ImageIcon")
to create the dataflavor, for DnD of images from a dialog based window to the main JFrame contentpane.
The drag is initiated, but the drop target never receives any events at all - not even a dragEnter.
Also, in dragDropEnd(DragSourceDropEvent e), e.getDropSuccess() == false is always true and the cursor changes from the drag image to a round green +.
Trawling through the lists (slowly, on dial-up!!) suggests this is a known bug - is this correct?
I've implemented a workaround whereby we use getLocation() on the DragSourceDropEvent and then establish if this point is within the bounds of the drop target, and then 'manually' do the transfer and set the cursor. Does this sound like a reasonable course of action or will it break in some unknown way?
Which versions of the JVM does this affect?
I'm using java.vm = 1.4.2-56 java = 1.4.2_09 on 10.3.9 1Ghz PowerPC G4 BTW


grateful for any advice,

hoverfrog

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


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.