|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.navigator.CommonDragAdapterAssistant
org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant
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.
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 |
---|
getContentService, getShell, setContentService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResourceDragAdapterAssistant()
Method Detail |
public Transfer[] getSupportedTransferTypes()
CommonDragAdapterAssistant
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.
getSupportedTransferTypes
in class CommonDragAdapterAssistant
public boolean setDragData(DragSourceEvent anEvent, IStructuredSelection aSelection)
CommonDragAdapterAssistant
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.
setDragData
in class CommonDragAdapterAssistant
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.
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.