Package docking.dnd

# Class DragSrcAdapter

java.lang.Object
docking.dnd.DragSrcAdapter

All Implemented Interfaces:
  `DragSourceListener`, `EventListener`

public class DragSrcAdapter extends Object implements DragSourceListener
Adapter class that receives notifications in order to provide drag over effects.

When the operation ends, this class receives a `dragDropEnd` message, and is responsible for checking the success of the operation. If the operation was successful, and if it was a Move, then this class will remove the source data.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Draggable`
  `dragComponent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DragSrcAdapter(Draggable dragComponent)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dragDropEnd(DragSourceDropEvent e)`
  `void`
  `dragEnter(DragSourceDragEvent e)`
  `void`
  `dragExit(DragSourceEvent e)`
  `void`
  `dragOver(DragSourceDragEvent e)`
  `void`
  `dropActionChanged(DragSourceDragEvent e)`
  `protected Cursor`
  `getDropOkCursor(int action)`
  Get the cursor for an "OK" drop.
  `protected void`
  `setDragOverFeedback(DragSourceDragEvent e)`
  Sets the cursor according to the actions that are legal.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### dragComponent

    protected Draggable dragComponent

- ## Constructor Details

  - ### DragSrcAdapter

    public DragSrcAdapter(Draggable dragComponent)
    Constructor
    Parameters:
      `dragComponent` - component that can be dragged.

- ## Method Details

  - ### dragDropEnd

    public void dragDropEnd(DragSourceDropEvent e)
    Specified by:
      `dragDropEnd` in interface `DragSourceListener`

  - ### dragEnter

    public void dragEnter(DragSourceDragEvent e)
    Specified by:
      `dragEnter` in interface `DragSourceListener`

  - ### dragOver

    public void dragOver(DragSourceDragEvent e)
    Specified by:
      `dragOver` in interface `DragSourceListener`

  - ### dragExit

    public void dragExit(DragSourceEvent e)
    Specified by:
      `dragExit` in interface `DragSourceListener`

  - ### dropActionChanged

    public void dropActionChanged(DragSourceDragEvent e)
    Specified by:
      `dropActionChanged` in interface `DragSourceListener`

  - ### setDragOverFeedback

    protected void setDragOverFeedback(DragSourceDragEvent e)
    Sets the cursor according to the actions that are legal.
    Parameters:
      `e` - the event

  - ### getDropOkCursor

    protected Cursor getDropOkCursor(int action)
    Get the cursor for an "OK" drop.
    Parameters:
      `action` - action for the drag operation (copy, move, link)
    Returns:
      cursor that is appropriate for the give action