Community
Participate
Working Groups
1) DND.DROP_DEFAULT is not a valid style - DND.DROP_DEFAULT | DND.DROP_COPY is what you want. In 3.0, with the style DND.DROP_DEFAULT, you will not get any drag and drop events in the DropTarget. DND.DROP_DEFAULT simply means that if there are no modifier keys pressed, the application can choose what operation will be performed but if the application does not specify any operations that are supported by the DragSource, it will never be informed of the DND operation. 2) DND.DROP_DEFAULT should be handled in DragEnter and DragOperationChanged. Currently it is being done in DragOver which is not the time when the operation can change. The current implementation results in cursor flicker and strange behaviour.
For 3.0 should change EditorArea.addDropSupport to specify DROP_DEFAULT | DROP_COPY. EditorAreaDropAdapter was changed to set the operation to DROP_COPY in dragEnter a while ago. Should add this to dragOperationChanged to handle modifier key press during drag. Without these changes dropping a file on an editor is not possible. Backport changes to EditorAreaDropAdapter to prevent data loss on Solaris (bug 34648).
Opened bug 37691 to consider releasing the changes to EditorAreaDropAdapter in 2.1.1. EditorArea does not need to be changed for 2.1.1
Released fixes to EditorAreaDropAdapter and EditorArea to HEAD. Fixed in >20030515
*** Bug 37896 has been marked as a duplicate of this bug. ***