Package docking.dnd

Interface Draggable

  • All Known Implementing Classes:
    VersionHistoryPanel

    public interface Draggable
    Interface to define a drag source.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dragCanceled​(java.awt.dnd.DragSourceDropEvent event)
      Method called when the drag operation exits the drop target without dropping.
      int getDragAction()
      Get the drag actions supported by this drag source: DnDConstants.ACTION_MOVE DnDConstants.ACTION_COPY DnDConstants.ACTION_COPY_OR_MOVE
      java.awt.dnd.DragSourceListener getDragSourceListener()
      Called by the DragGestureAdapter to start the drag.
      java.awt.datatransfer.Transferable getTransferable​(java.awt.Point p)
      Get the object to transfer.
      boolean isStartDragOk​(java.awt.dnd.DragGestureEvent e)
      Return true if the object at the location in the DragGesture event is draggable.
      void move()
      Do the move operation; called when the drag and drop operation completes.
    • Method Detail

      • isStartDragOk

        boolean isStartDragOk​(java.awt.dnd.DragGestureEvent e)
        Return true if the object at the location in the DragGesture event is draggable.
        Parameters:
        e - event passed to a DragGestureListener via its dragGestureRecognized() method when a particular DragGestureRecognizer detects a platform dependent Drag and Drop action initiating gesture has occurred on the Component it is tracking.
        See Also:
        DragGestureAdapter
      • getDragSourceListener

        java.awt.dnd.DragSourceListener getDragSourceListener()
        Called by the DragGestureAdapter to start the drag.
      • dragCanceled

        void dragCanceled​(java.awt.dnd.DragSourceDropEvent event)
        Method called when the drag operation exits the drop target without dropping.
        Parameters:
        event - TODO
      • getDragAction

        int getDragAction()
        Get the drag actions supported by this drag source:
        • DnDConstants.ACTION_MOVE
        • DnDConstants.ACTION_COPY
        • DnDConstants.ACTION_COPY_OR_MOVE
        Returns:
        the drag actions
      • getTransferable

        java.awt.datatransfer.Transferable getTransferable​(java.awt.Point p)
        Get the object to transfer.
        Parameters:
        p - location of object to transfer
        Returns:
        object to transfer