Package icyllis.modernui.view

# Class View.DragShadow

java.lang.Object
icyllis.modernui.view.View.DragShadow

Enclosing class:
  `View`

public static class View.DragShadow extends Object
Creates an image that the system displays during the drag and drop operation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DragShadow()`
  Construct a shadow builder object with no associated View.
  `DragShadow(View view)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final View`
  `getView()`
  `void`
  `onDrawShadow(Canvas canvas)`
  Draw the shadow.
  `void`
  `onProvideShadowCenter(Point outShadowCenter)`
  Called when the view is not mouse hovered or shadow is nonnull, to determine where the mouse cursor position is in the shadow.

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

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

- ## Constructor Details

  - ### DragShadow

    public DragShadow(View view)

  - ### DragShadow

    public DragShadow()
    Construct a shadow builder object with no associated View. This constructor variant is only useful when the `onProvideShadowCenter(Point)`} and `onDrawShadow(Canvas)` methods are also overridden in order to supply the drag shadow's dimensions and appearance without reference to any View object.

- ## Method Details

  - ### getView

    @Nullable public final View getView()

  - ### onProvideShadowCenter

    public void onProvideShadowCenter(@NonNull Point outShadowCenter)
    Called when the view is not mouse hovered or shadow is nonnull, to determine where the mouse cursor position is in the shadow.
    Parameters:
      `outShadowCenter` - the center point in the shadow

  - ### onDrawShadow

    public void onDrawShadow(@NonNull Canvas canvas)
    Draw the shadow.
    Parameters:
      `canvas` - canvas to draw content