|
|
|
|
org.eclipse.gmf.runtime.common.ui.services.dnd.ide.drop
Class ResourceDropTargetListener
java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
org.eclipse.jface.viewers.ViewerDropAdapter
org.eclipse.ui.part.PluginDropAdapter
org.eclipse.ui.views.navigator.NavigatorDropAdapter
org.eclipse.gmf.runtime.common.ui.services.dnd.ide.drop.ResourceDropTargetListener
-
All Implemented Interfaces:
- java.util.EventListener,
IDropTargetListener,
DropTargetListener,
org.eclipse.swt.internal.SWTEventListener,
IOverwriteQuery
-
public class ResourceDropTargetListener
- extends
NavigatorDropAdapter
- implements
IDropTargetListener
Concrete class that implements the IDropTargetListener. This class handles
dropping resource elements.
Methods inherited from class org.eclipse.jface.viewers.
ViewerDropAdapter
|
clearState,
determineLocation,
determineTarget,
dragOperationChanged,
dragOver,
getBounds,
getCurrentEvent,
getCurrentLocation,
getCurrentOperation,
getFeedbackEnabled,
getSelectedObject,
getViewer,
handleException,
overrideOperation,
setExpandEnabled,
setFeedbackEnabled,
setScrollEnabled,
setScrollExpandEnabled,
setSelectionFeedbackEnabled
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
ResourceDropTargetListener
public ResourceDropTargetListener(
StructuredViewer viewer)
- Constructs a new drop listener for the given viewer.
-
Parameters:
-
viewer - the viewer
getExecutableContext
public
ICommand getExecutableContext(
DropTargetEvent event)
-
Description copied from interface:
IDropTargetListener
- Returns a command for dropping the event data on the drop target. The
event passed in corresponds to the drop event. The listener can get the
current target from the context.
-
-
Specified by:
-
getExecutableContext
in interface
IDropTargetListener
-
-
Parameters:
-
event - the event associated with the drop event
-
Returns:
- Returns a command for dropping the event data on the drop target.
canSupport
public boolean canSupport(
IDropTargetContext context,
IDropTargetEvent currentEvent,
ITransferAgent currentAgent)
-
Description copied from interface:
IDropTargetListener
- Returns a boolean indicating whether the listener can support drop
operations on the current target. The target context, current event and
current transfer agent information is passed to the listener. This method
is invoked whenever the target changes.
-
-
Specified by:
-
canSupport
in interface
IDropTargetListener
-
-
Parameters:
-
context - The drop action context -
currentEvent - The current drop event -
currentAgent - the current transfer agent
-
Returns:
- Returns true or false
setFeedback
public void setFeedback(
DropTargetEvent event)
-
Description copied from interface:
IDropTargetListener
- Provides the listener an opportunity to set the feedback when hovering
over a target. The listener can decide whether drag under effect is
enabled for the current target.
-
-
Specified by:
-
setFeedback
in interface
IDropTargetListener
-
-
Parameters:
-
event - The drop target event
getSupportingTransferIds
public java.lang.String[] getSupportingTransferIds()
-
Description copied from interface:
IDropTargetListener
- Returns the supporting transfer agent ids.
-
-
Specified by:
-
getSupportingTransferIds
in interface
IDropTargetListener
-
-
Returns:
- return the supporting transfer agent ids
dropAccept
public void dropAccept(
DropTargetEvent event)
-
-
Specified by:
-
dropAccept
in interface
DropTargetListener
-
Overrides:
-
dropAccept
in class
ViewerDropAdapter
-
validateDrop
public boolean validateDrop(java.lang.Object target,
int dragOperation,
TransferData transferType)
-
-
Overrides:
-
validateDrop
in class
NavigatorDropAdapter
-
getCurrentTarget
protected java.lang.Object getCurrentTarget()
-
-
Overrides:
-
getCurrentTarget
in class
ViewerDropAdapter
-
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.
|
|
|