Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
JDragNDrop
Last Revision: | Version 1.0, 2003-01-14 Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java. |
Build Requirements: | |
Runtime Requirements: | Mac OS X |
This project demonstrates building a simple view to implement drag and drop functionality in Cocoa-Java. CLASSES: < MyView.java > sublcassed from NSView. MyView creates a simple view and overrides the necessary init methods. The most important parts of MyView are registering for specific drag types and the concludeDragOperation method. All of the methods must be there for the drag and drop to work correctly, due to messaging of Cocoa. POSSIBLE ENHANCEMENTS: Modify constructor to allow different drag types and modify concludeDragOperation to operate on the different types.
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14