Interface IDragAndDropService

All Known Implementing Classes:
EditorSiteDragAndDropServiceImpl

public interface IDragAndDropService
This interface specifies the API for a service to be used by part authors to access methods which provide support for Drag and Drop operations within the workbench.

Authors should access this service using the PartSite's getService method, passing this interface as the argument.

NOTE: This interface it not expected to be implemented by clients; it is provided only to allow access to the service's methods.

Since:
3.3
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMergedDropTarget(Control control, int ops, Transfer[] transfers, DropTargetListener listener)
    Causes a drop target to be added to the given control that respects the existing site's drop behaviour in addition to the behaviour being specified for the given control.
    void
    Remove any previously 'merged' drop target for this Control
  • Method Details

    • addMergedDropTarget

      void addMergedDropTarget(Control control, int ops, Transfer[] transfers, DropTargetListener listener)
      Causes a drop target to be added to the given control that respects the existing site's drop behaviour in addition to the behaviour being specified for the given control.

      If a transfer type specified for the control matches one used by the site then the control's listener is called (the client is overriding the existing site behaviour which will no longer work).

      NOTE: Site authors must use this method to add drop behaviour; directly adding drop targets using SWT onto a site will cause the standard site behaviour (i.e. dragging files / markers into the EditorSite...) to not work when that editor is active.

      Note that this method may be used more than once should the part author wish to register different drop targets for internal controls (i.e. to support internal DnD).

      Parameters:
      control - The control to add the drop behaviour to
      ops - The Drop operations used by this target
      transfers - The TransferTypes used by this target
      listener - The listener controlling the target's behaviour
    • removeMergedDropTarget

      void removeMergedDropTarget(Control control)
      Remove any previously 'merged' drop target for this Control
      Parameters:
      control - The control to remove the drop target for