Implementing drag and drop for Workspace entities

You use the Workspace Drag and Drop framework to add drag and drop behavior to your Workspace objects. This allows the them to respond to a user's drag and drop gestures. For example, the Printing system uses Workspace drag and drop to deploy a drag and drop desktop printing interface, allowing users to drop a printable document on a printer to print the document on that printer.

Three constructs support drag and drop behavior:

When a user prints a document by dragging it to a printer icon, the document is the drag source and the printer is the drop acceptor. The Print command is triggered when the document's scrap item is accepted by the printer.

During a drag and drop operation:

  1. When the user clicks on the document and begins the drag motion, the drag source provides a list of type descriptions. The types that a particular document can provide indicate the possible actions that can be taken when then object is dropped.
  2. When the user releases the mouse button and the document is dropped, type negotiation begins. The drop acceptor is given the opportunity to choose its preferred type from the list provided by the source.
  3. Once the drop acceptor chooses a preferred type, the drag source creates a scrap item, and the drop acceptor is asked to accept the scrap item for the dragged item. Acceptance of the scrap item typically results in some sort of action--for example, if the drag source is a printable document and the drop acceptor is the Printer appliance, the document is printed when the scrap item is accepted.
To add drag and drop behavior to your Workspace objects, you implement a drag source and a drop acceptor.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker