Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The previous chapter explored the rich integration that AIR has with the Operating System (OS) clipboard. In this chapter, you will further explore integration possibilities using drag and drop, a technique familiar to most desktop application users. This technique, combined with others you will learn throughout this book, allows you to create AIR applications that have the look and feel of more traditional desktop applications.
The following sections explain the DragManager and NativeDragManager classes, and include several examples of using each. You will also explore the drag-and-drop operations used within the dpTimeTracker to gain an understanding of how these pieces can be used together in a larger application.
To use drag and drop successfully, you will need familiarity with two main classes, namely DragManager and NativeDragManager. These classes are responsible for handling all elements dragged within an application. Both are responsible for initiating, accepting, and presenting feedback for drag-and-drop operations, application wide. You will learn about the DragManager first to give you an understanding of basic drag-and-drop operations within an application. Then you will explore the NativeDragManager to learn about dragging items in and out of the application and interacting with the OS.