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
Answertopia.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.part
Class PluginDropAdapter


java.lang.Object
  extended by 

org.eclipse.swt.dnd.DropTargetAdapter
      extended by 

org.eclipse.jface.viewers.ViewerDropAdapter
          extended by 
org.eclipse.ui.part.PluginDropAdapter
All Implemented Interfaces:
EventListener, DropTargetListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
CommonDropAdapter, NavigatorDropAdapter

public class PluginDropAdapter
extends ViewerDropAdapter

Adapter for adding handling of the PluginTransfer drag and drop transfer type to a drop action.

This class may be instantiated or subclassed.


Field Summary
static  String ATT_CLASS
          The extension point attribute that defines the drop action class.
 
Fields inherited from class org.eclipse.jface.viewers. ViewerDropAdapter
LOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON
 
Constructor Summary
PluginDropAdapter ( StructuredViewer viewer)
          Creates a plug-in drop adapter for the given viewer.
 
Method Summary
 void drop ( DropTargetEvent event)
          This implementation of drop does nothing.
protected   TransferData getCurrentTransfer ()
          Returns the current transfer.
protected static  IDropActionDelegate getPluginAdapter ( PluginTransferData data)
          Loads the class that will perform the action associated with the given drop data.
 boolean performDrop ( Object data)
          Performs any work associated with the drop.
 boolean validateDrop ( Object target, int operation, TransferData transferType)
          The PluginDropAdapter implementation of this ViewerDropAdapter method is used to notify the action that some aspect of the drop operation has changed.
 
Methods inherited from class org.eclipse.jface.viewers. ViewerDropAdapter
clearState, determineLocation, determineTarget, dragEnter, dragOperationChanged, dragOver, dropAccept, getBounds, getCurrentEvent, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getViewer, handleException, overrideOperation, setExpandEnabled, setFeedbackEnabled, setScrollEnabled, setScrollExpandEnabled, setSelectionFeedbackEnabled
 
Methods inherited from class org.eclipse.swt.dnd. DropTargetAdapter
dragLeave
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATT_CLASS

public static final 
String ATT_CLASS
The extension point attribute that defines the drop action class.

See Also:
Constant Field Values
Constructor Detail

PluginDropAdapter

public PluginDropAdapter(
StructuredViewer viewer)
Creates a plug-in drop adapter for the given viewer.

Parameters:
viewer - the viewer
Method Detail

drop

public void drop(
DropTargetEvent event)
Description copied from class: DropTargetAdapter
This implementation of drop does nothing. For additional information see DropTargetListener.drop.

Specified by:
drop in interface DropTargetListener
Overrides:
drop in class ViewerDropAdapter
Parameters:
event - the information associated with the drop event
See Also:
DropTargetEvent

getCurrentTransfer

protected 
TransferData getCurrentTransfer()
Returns the current transfer.


getPluginAdapter

protected static 
IDropActionDelegate getPluginAdapter(
PluginTransferData data)
                                               throws 
CoreException
Loads the class that will perform the action associated with the given drop data.

Parameters:
data - the drop data
Returns:
the viewer drop adapter
Throws:
CoreException

performDrop

public boolean performDrop(
Object data)
Description copied from class: ViewerDropAdapter
Performs any work associated with the drop.

Subclasses must implement this method to provide drop behavior.

Specified by:
performDrop in class ViewerDropAdapter
Parameters:
data - the drop data
Returns:
true if the drop was successful, and false otherwise
See Also:
ViewerDropAdapter.performDrop(java.lang.Object)

validateDrop

public boolean validateDrop(
Object target,
                            int operation,
                            
TransferData transferType)
The PluginDropAdapter implementation of this ViewerDropAdapter method is used to notify the action that some aspect of the drop operation has changed. Subclasses may override.

Specified by:
validateDrop in class ViewerDropAdapter
Parameters:
target - the object that the mouse is currently hovering over, or null if the mouse is hovering over empty space
operation - the current drag operation (copy, move, etc.)
transferType - the current transfer type
Returns:
true if the drop is valid, and 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