|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.navigator.CommonDragAdapterAssistant
Assist the CommonDragAdapter
by providing new TransferTypes and the
logic to handle setting up the transfer data. Clients must extend this class
as part of the org.eclipse.ui.navigator.viewer/dragAssistant
extension. By default, the Common Navigator supports
LocalSelectionTransfer
and PluginTransfer
.
Clients may extend this class.
INavigatorDnDService
,
CommonDragAdapter
,
CommonDropAdapter
,
CommonDropAdapterAssistant
,
CommonViewer
,
Drag
and Drop: Adding Drag and Drop to an SWT Application,
Drag
and Drop in the Eclipse UI (Custom Transfer Types)Constructor Summary | |
---|---|
CommonDragAdapterAssistant()
|
Method Summary | |
---|---|
INavigatorContentService |
getContentService()
|
Shell |
getShell()
|
abstract Transfer[] |
getSupportedTransferTypes()
Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients. |
void |
setContentService(INavigatorContentService aContentService)
Accept and remember the content service this assistant is associated with. |
abstract boolean |
setDragData(DragSourceEvent anEvent,
IStructuredSelection aSelection)
Set the value of the Event.data field using the given selection.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommonDragAdapterAssistant()
Method Detail |
public abstract Transfer[] getSupportedTransferTypes()
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
setDragData(DragSourceEvent, IStructuredSelection)
be called. If
the drop event is cancelled,
setDragData(DragSourceEvent, IStructuredSelection)
will not be
called.
public abstract boolean setDragData(DragSourceEvent anEvent, IStructuredSelection aSelection)
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
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.
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.
public final void setContentService(INavigatorContentService aContentService)
aContentService
- public INavigatorContentService getContentService()
public final Shell getShell()
|
Eclipse Platform Release 3.3 |
|||||||||||
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, 2007. All rights reserved.