|
|
|
|
org.eclipse.ui.navigator.resources
Class ResourceDragAdapterAssistant
java.lang.Object
org.eclipse.ui.navigator.CommonDragAdapterAssistant
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.
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
ResourceDragAdapterAssistant
public ResourceDragAdapterAssistant()
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.
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.
|
|
|