Drag and Drop Wiring diagram

To provide the Drag and Drop behavior with the Drag and Drop Bean Suite Version 2.0:

  1. wire DragBean with a Drag Source component containing a property to be transferred and this property
  2. wire DropBean with a Drag Target component that must accept transferring data of a defined kind and its property, for which transferring data is intended
  3. if you want to change the copy behavior of transferring data to the move behavior - wire the DragBean.dragDropEndOk event with the Drag Source TextField.setText() method

At the run time, when you press the mouse button over the Drag Source component wired to DragBean, and begin to move the mouse (while holding the mouse button pressed), the Drag and Drop mechanism catches this mouse event and asks DragBean for the data to drag. When the cursor is over the Drag Target component wired to DropBean, and you release the mouse button, the Drag and Drop mechanism catches this mouse event, notifies DropBean to make a drop, and transfers the data.

DragBean Allows making a property of a GUI element transferable
DropBean Allows making a property of a GUI element able to accept transferring data
Copyright © 1999 IBM Corp. All rights reserved. Java, JavaBeans, Swing and 100% Pure Java are trademarks of Sun Microsystems, Inc. All other trademarks are the property of their respective owners.