Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.util
Interface TransferDropTargetListener

All Superinterfaces:
DropTargetListener, EventListener, org.eclipse.swt.internal.SWTEventListener

public interface TransferDropTargetListener
extends DropTargetListener

A TransferDropTargetListener is a DropTragetListener that handles one type of SWT Transfer. The purpose of a TransferDropTargetListener is to:

  • Determine enablement for a drop operation. A TransferDropTargetListener will not be used if isEnabled returns false.
  • When enabled, optionally show feedback on the DropTarget.
  • Perform the actual drop
A DelegatingDropAdapter allows these functions to be implemented separately for unrelated types of drags. DelegatingDropAdapter then combines the function of each TransferDropTargetListener, while allowing them to be implemented as if they were the only DragSourceListener.

Since:
3.0

Method Summary
  Transfer getTransfer ()
          Returns the Transfer type that this listener can accept a drop operation for.
 boolean isEnabled ( DropTargetEvent event)
          Returns true if this listener can handle the drop based on the given DropTargetEvent.
 
Methods inherited from interface org.eclipse.swt.dnd. DropTargetListener
dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept
 

Method Detail

getTransfer

Transfer getTransfer()
Returns the Transfer type that this listener can accept a drop operation for.

Returns:
the Transfer for this listener

isEnabled

boolean isEnabled(
DropTargetEvent event)
Returns true if this listener can handle the drop based on the given DropTargetEvent.

This method is called by the DelegatingDropAdapter only if the DropTargetEvent contains a transfer data type supported by this listener. The Transfer returned by the #getTransfer() method is used for this purpose.

Parameters:
event - the drop target event
Returns:
true if the listener is enabled for the given drop target event.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire