org.eclipse.net4j.util.ui.dnd

## Class DNDDropAdapter<TYPE>

- java.lang.Object
- - org.eclipse.swt.dnd.DropTargetAdapter
  - - org.eclipse.jface.viewers.ViewerDropAdapter
    - - org.eclipse.net4j.util.ui.dnd.DNDDropAdapter<TYPE>

- All Implemented Interfaces:
    java.util.EventListener, DropTargetListener, org.eclipse.swt.internal.SWTEventListener

      public abstract class DNDDropAdapter<TYPE>
      extends ViewerDropAdapter

  Author:
    Eike Stepper

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.jface.viewers.ViewerDropAdapter

      `LOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DNDDropAdapter(StructuredViewer viewer)`
    `protected` | `DNDDropAdapter(Transfer[] transfers, StructuredViewer viewer)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `determineLocation(DropTargetEvent event)`
    `Transfer[]` | `getTransfers()`
    `StructuredViewer` | `getViewer()`
    `boolean` | `isDropBetweenEnabled()`
    `boolean` | `performDrop(java.lang.Object data)`
    `protected abstract boolean` | `performDrop(TYPE data, java.lang.Object target)`
    `void` | `setDropBetweenEnabled(boolean dropBetweenEnabled)`
    `protected void` | `setTransfers(Transfer[] transfers)`
    `boolean` | `validateDrop(java.lang.Object target, int operation, TransferData type)`
    `protected abstract boolean` | `validateTarget(java.lang.Object target, int operation)`
    `protected boolean` | `validateTransfer(TransferData type)`

    - ### Methods inherited from class org.eclipse.jface.viewers.ViewerDropAdapter

      `clearState, determineTarget, dragEnter, dragOperationChanged, dragOver, drop, dropAccept, getBounds, getCurrentEvent, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getThreshold, handleException, overrideOperation, setExpandEnabled, setFeedbackEnabled, setScrollEnabled, setScrollExpandEnabled, setSelectionFeedbackEnabled`

    - ### Methods inherited from class org.eclipse.swt.dnd.DropTargetAdapter

      `dragLeave`

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

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

- - ### Constructor Detail

    - #### DNDDropAdapter

          protected DNDDropAdapter(Transfer[] transfers,
                                   StructuredViewer viewer)

      Since:
        3.0

    - #### DNDDropAdapter

          protected DNDDropAdapter(StructuredViewer viewer)

      Since:
        3.3

  - ### Method Detail

    - #### getTransfers

          public Transfer[] getTransfers()

      Since:
        3.0

    - #### setTransfers

          protected void setTransfers(Transfer[] transfers)

      Since:
        3.3

    - #### getViewer

          public StructuredViewer getViewer()

      Overrides:
        `getViewer` in class `ViewerDropAdapter`

    - #### isDropBetweenEnabled

          public boolean isDropBetweenEnabled()

    - #### setDropBetweenEnabled

          public void setDropBetweenEnabled(boolean dropBetweenEnabled)

    - #### determineLocation

          protected int determineLocation(DropTargetEvent event)

      Overrides:
        `determineLocation` in class `ViewerDropAdapter`

    - #### performDrop

          public boolean performDrop(java.lang.Object data)

      Specified by:
        `performDrop` in class `ViewerDropAdapter`

    - #### validateDrop

          public boolean validateDrop(java.lang.Object target,
                                      int operation,
                                      TransferData type)

      Specified by:
        `validateDrop` in class `ViewerDropAdapter`

    - #### validateTransfer

          protected boolean validateTransfer(TransferData type)

      Since:
        3.3

    - #### validateTarget

          protected abstract boolean validateTarget(java.lang.Object target,
                                                    int operation)

    - #### performDrop

          protected abstract boolean performDrop(TYPE data,
                                                 java.lang.Object target)

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html