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
Answertopia.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 DelegatingDragAdapter

java.lang.Object
  extended by

org.eclipse.jface.util.DelegatingDragAdapter
      extended by
org.eclipse.gef.dnd.DelegatingDragAdapter
All Implemented Interfaces:
DragSourceListener

public class DelegatingDragAdapter
extends DelegatingDragAdapter

A DragSourceListener that maintains and delegates to a set of TransferDragSourceListeners. Each TransferDragSourceListener can then be implemented as if it were the DragSource's only DragSourceListener.

When a native Drag is started, a subset of all TransferDragSourceListeners is generated and stored in a list of active listeners. This subset is calculated by forwarding DragSourceListener#dragStart(DragSourceEvent) to every listener, and inspecting changes to the doit field. The DragSource's set of supported Transfer types (DragSource#setTransfer(Transfer[])) is updated to reflect the Transfer types corresponding to the active listener subset.

If and when DelegatingDragAdapter.dragSetData(DragSourceEvent) is called, a single TransferDragSourceListener is chosen, and only it is allowed to set the drag data. The chosen listener is the first listener in the subset of active listeners whose Transfer supports (Transfer#isSupportedType(TransferData)) the dataType on the DragSourceEvent.

See Also:
Serialized Form

Constructor Summary
DelegatingDragAdapter ()
           
 
Method Summary
 void addDragSourceListener ( TransferDragSourceListener listener)
          Deprecated.   
 Transfer[] getTransferTypes ()
          Deprecated. call getTransfers() instead.
 void removeDragSourceListener ( TransferDragSourceListener listener)
          Deprecated.   
 
Methods inherited from class org.eclipse.jface.util. DelegatingDragAdapter
addDragSourceListener, dragFinished, dragSetData, dragStart, getTransfers, isEmpty, removeDragSourceListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingDragAdapter

public DelegatingDragAdapter()
Method Detail

addDragSourceListener

public void addDragSourceListener(
TransferDragSourceListener listener)
Deprecated.   

Adds the given TransferDragSourceListener. The set of Transfer types is updated to reflect the change.

Parameters:
listener - the new listener

getTransferTypes

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

Combines the Transfers from every TransferDragSourceListener.

Returns:
the combined Transfers

removeDragSourceListener

public void removeDragSourceListener(
TransferDragSourceListener listener)
Deprecated.   

Adds the given TransferDragSourceListener. The set of Transfer types is updated to reflect the change.

Parameters:
listener - the listener being removed

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