Interface PaletteDragSupport.DragImageProvider

Enclosing class:
PaletteDragSupport
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PaletteDragSupport.DragImageProvider
Optionally supplies a BufferedImage to display under the cursor during a drag.

Only called when DragSource.isDragImageSupported() returns true. Returning null falls back to the default system drag cursor with no custom image.

  • Method Summary

    Modifier and Type
    Method
    Description
    buildDragImage(Point dragOrigin)
    Build and return a drag image for the item being dragged from dragOrigin, or null to use the default cursor.
  • Method Details

    • buildDragImage

      BufferedImage buildDragImage(Point dragOrigin)
      Build and return a drag image for the item being dragged from dragOrigin, or null to use the default cursor.
      Parameters:
      dragOrigin - the point where the drag gesture began, in the source component's coordinate space
      Returns:
      the image to display under the cursor, or null