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 GEF
3.3

org.eclipse.gef.dnd
Class DelegatingDropAdapter

java.lang.Object
  extended by

org.eclipse.jface.util.DelegatingDropAdapter
      extended by
org.eclipse.gef.dnd.DelegatingDropAdapter
All Implemented Interfaces:
DropTargetListener

public class DelegatingDropAdapter
extends DelegatingDropAdapter

A DropTargetListener that manages and delegates to a set of TransferDropTargetListeners. Each TransferDropTargetListener can then be implemented as if it were the DropTarget's only DropTargetListener.

On each DropTargetEvent, a current listener is obtained from the set of all TransferDropTargetListers. The current listener is the first listener to return true for TransferDropTargetListener#isEnabled(DropTargetEvent). The current listener is forwarded all DropTargetEvents until some other listener becomes the current listener, or the Drop terminates.

As listeners are added and removed, the combined set of Transfers is updated to contain the Tranfer from each listener. getTransferTypes() provides the merged transfers. This set of Transfers should be set on the SWT DropTarget.

See Also:
Serialized Form

Constructor Summary
DelegatingDropAdapter ()
           
 
Method Summary
 void addDropTargetListener ( TransferDropTargetListener listener)
          Deprecated.   
 Transfer[] getTransferTypes ()
          Deprecated. use getTransfers() instead
 void removeDropTargetListener ( TransferDropTargetListener listener)
          Removes the given TransferDropTargetListener.
 
Methods inherited from class org.eclipse.jface.util. DelegatingDropAdapter
addDropTargetListener, dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept, getTransfers, isEmpty, removeDropTargetListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingDropAdapter

public DelegatingDropAdapter()
Method Detail

addDropTargetListener

public void addDropTargetListener(
TransferDropTargetListener listener)
Deprecated.   

Adds the given TransferDropTargetListener.

Parameters:
listener - the listener

getTransferTypes

public Transfer[] getTransferTypes()
Deprecated. use getTransfers() instead

Adds the Transfer from each listener to an array and returns that array.

Returns:
the merged Transfers from all listeners

removeDropTargetListener

public void removeDropTargetListener(
TransferDropTargetListener listener)
Removes the given TransferDropTargetListener.

Parameters:
listener - the listener

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

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