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.ui.navigator.resources
Class ResourceDragAdapterAssistant

java.lang.Object
  extended by 

org.eclipse.ui.navigator.CommonDragAdapterAssistant
      extended by 
org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant

public class ResourceDragAdapterAssistant
extends CommonDragAdapterAssistant

Clients may reference this class in the dragAssistant element of a org.eclipse.ui.navigator.viewer extension point.

Clients may not extend or instantiate this class for any purpose other than INavigatorDnDService.bindDragAssistant(CommonDragAdapterAssistant). Clients may have no direct dependencies on the contract of this class.

Since:
3.2
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
ResourceDragAdapterAssistant ()
           
 
Method Summary
  Transfer[] getSupportedTransferTypes ()
          Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients.
 boolean setDragData ( DragSourceEvent anEvent, IStructuredSelection aSelection)
          Set the value of the Event.data field using the given selection.
 
Methods inherited from class org.eclipse.ui.navigator. CommonDragAdapterAssistant
dragFinished, dragStart, getContentService, getShell, setContentService
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDragAdapterAssistant

public ResourceDragAdapterAssistant()
Method Detail

getSupportedTransferTypes

public 
Transfer[] getSupportedTransferTypes()
Description copied from class: CommonDragAdapterAssistant
Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients. By default, the CommonDragAdapter supports LocalSelectionTransfer and PluginTransfer.

CommonDragAdapterAssistants can extend the available TransferTypes that a Common Navigator Viewer can generate. Clients should return the set of Transfer Types they support. When a drop event occurs, the available drag assistants will be searched for a enabled assistants for the DragSourceEvent. Only if the drop event occurs will CommonDragAdapterAssistant.setDragData(DragSourceEvent, IStructuredSelection) be called. If the drop event is cancelled, CommonDragAdapterAssistant.setDragData(DragSourceEvent, IStructuredSelection) will not be called.

Specified by:
getSupportedTransferTypes in class CommonDragAdapterAssistant
Returns:
The added transfer types. (e.g. FileTransfer.getInstance()).

setDragData

public boolean setDragData(
DragSourceEvent anEvent,
                           
IStructuredSelection aSelection)
Description copied from class: CommonDragAdapterAssistant
Set the value of the Event.data field using the given selection. Clients will only have an opportunity to set the drag data if they have returned a matching Transfer Type from CommonDragAdapterAssistant.getSupportedTransferTypes() for the DragSourceEvent.dataType.

Clients will only have an opportunity to set the data when the drop event occurs. If the drop operation is cancelled, then this method will not be called.

Specified by:
setDragData in class CommonDragAdapterAssistant
Parameters:
anEvent - The event object should have its Event.data field set to a value that matches a supported TransferData type.
aSelection - The current selection from the viewer.
Returns:
True if the data could be set; false otherwise.

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