- Package:
- com.apple.yellow.application
The NSDraggingSource informal protocol declares methods that are implemented by the source object in a dragging session (see the NSDraggingDestination protocol for definitions of dragging terms). The dragging source is specified as an argument to the dragImage message, sent to a window or view object to initiate the dragging session.
Of the methods declared below, only draggingSourceOperationMaskForLocal must be implemented. The other methods are invoked only if the dragging source implements them. All methods are invoked automatically during a dragging session-you never send an NSDraggingSource message directly to an object.
- Specifying dragging options
- draggingSourceOperationMaskForLocal
- ignoreModifierKeysWhileDragging
- Responding to dragging sessions
- startedDraggingImage
- finishedDraggingImage
public abstract void startedDraggingImage(
NSImage anImage,
NSPoint aPoint)
See Also: convertScreenToBase (NSWindow), convertBaseToScreen (NSWindow), convertPointFromView (NSView), convertPointToView (NSView)
public abstract void finishedDraggingImage(
NSImage anImage,
NSPoint aPoint,
boolean flag)
This method provides the source object with an opportunity to respond to either a successful or a failed dragging session. For example, if you are moving data from one location to another, you could use this method to make the source data disappear from its previous location, if the dragging session is successful, or reset itself to its previous state, in the event of a failure.
See Also: convertScreenToBase (NSWindow), convertBaseToScreen (NSWindow), convertPointFromView (NSView), convertPointToView (NSView)
public abstract int draggingSourceOperationMaskForLocal(boolean flag)
Option | Meaning |
DragOperationCopy | The data represented by the image can be copied. |
DragOperationLink | The data can be shared. |
DragOperationGeneric | The operation can be defined by the destination. |
DragOperationPrivate | The operation is negotiated privately between the source and the destination. |
DragOperationAll | Combines all the above. |
If the source does not permit any dragging operations, it
should return DragOperationNone
.
public abstract boolean ignoreModifierKeysWhileDragging()