Java Doc for CommonDropAdapterAssistant.java in  » IDE-Eclipse » ui » org » eclipse » ui » navigator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui » org.eclipse.ui.navigator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.navigator.CommonDropAdapterAssistant

All known Subclasses:   org.eclipse.ui.navigator.resources.ResourceDropAdapterAssistant,  org.eclipse.ui.internal.navigator.dnd.SkeletonCommonDropAssistant,
CommonDropAdapterAssistant
abstract public class CommonDropAdapterAssistant (Code)

Used by the org.eclipse.ui.navigator.navigatorContent/navigatorContent/commonDropAdapter extension point to carry out pluggable drop operations.

Each CommonDropAdapterAssistant is contained by single content extension. The opportunity for each assistant to handle the drop operation is determined by the possibleChildren expression of the org.eclipse.ui.navigator.navigatorContent/navigatorContent extension; whenever every element in the drag set matches the possibleChildren expression of an extension, it is eligible to handle the drop operation. This initial set is further culled using the possibleDropTargets expression of the commonDropAdapter using the current drop target.

If drag operations originate outside of Eclipse, then the set of eligible drop adapters is determined based on the drop target (using the possibleDropTargets expression). Each assistant can then indicate whether CommonDropAdapterAssistant.isSupportedType(TransferData) the incoming type is supported .

Whenever a match is found, the assistant will be given an opportunity to first CommonDropAdapterAssistant.validateDrop(Object,int,TransferData) , and then if the assistant returns true, the assist must CommonDropAdapterAssistant.handleDrop(CommonDropAdapter,DropTargetEvent,Object) . If multiple assistants match the drop target, then the potential assistants are ordered based on priority and their override relationships and given an opportunity to validate the drop operation in turn. The first one to validate will have the opportunty to carry out the drop.

Clients may handle DND operations that begin and end in the current viewer by overriding the following methods:

If a user originates a drag operation to another viewer that cannot handle one of the available drag transfer types, drop assistants may handle the drop operation for the target viewer. Clients must override :

Clients may implement this interface.


See Also:   INavigatorDnDService
See Also:   INavigatorDnDService.findCommonDropAdapterAssistants(ObjectTransferData)
since:
   3.2




Method Summary
protected  voiddoInit()
     Override to perform any one-time initialization.
protected  INavigatorContentServicegetContentService()
    
final protected  ShellgetShell()
    
abstract public  IStatushandleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget)
     Carry out the DND operation.
public  IStatushandlePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)
     Handle the drop operation for the target viewer.

The default behavior of this method is to return Status.CANCEL_STATUS.


Parameters:
  aDragSelection - The selection dragged from the viewer.
Parameters:
  aDropTarget - The target of the drop operation.
final public  voidinit(INavigatorContentService aContentService)
     Perform any necessary initialization using the INavigatorContentService .
public  booleanisSupportedType(TransferData aTransferType)
     Clients may extend the supported transfer types beyond the default LocalSelectionTransfer.getTransfer and org.eclipse.ui.part.PluginTransfer.getInstance transfer types.
abstract public  IStatusvalidateDrop(Object target, int operation, TransferData transferType)
     Validates dropping on the given object.
public  IStatusvalidatePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)
     Return true if the client can handle the drop onto the target viewer of the drop operation.

The default behavior of this method is to return Status.CANCEL_STATUS.


Parameters:
  aDragSelection - The selection dragged from the viewer.
Parameters:
  aDropTarget - The target of the drop operation.



Method Detail
doInit
protected void doInit()(Code)
Override to perform any one-time initialization.



getContentService
protected INavigatorContentService getContentService()(Code)
The associated content service.



getShell
final protected Shell getShell()(Code)
A shell for the viewer currently used by theINavigatorContentService.



handleDrop
abstract public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget)(Code)
Carry out the DND operation.
Parameters:
  aDropAdapter - The Drop Adapter contains information that has already beenparsed from the drop event.
Parameters:
  aDropTargetEvent - The drop target event.
Parameters:
  aTarget - The object being dragged onto A status indicating whether the drop completed OK.



handlePluginTransferDrop
public IStatus handlePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)(Code)
Handle the drop operation for the target viewer.

The default behavior of this method is to return Status.CANCEL_STATUS.


Parameters:
  aDragSelection - The selection dragged from the viewer.
Parameters:
  aDropTarget - The target of the drop operation. OK if the drop operation succeeded.



init
final public void init(INavigatorContentService aContentService)(Code)
Perform any necessary initialization using the INavigatorContentService .
Parameters:
  aContentService - The instance of INavigatorContentService that thecurrent CommonDropAdapterAssistant will be associated with



isSupportedType
public boolean isSupportedType(TransferData aTransferType)(Code)
Clients may extend the supported transfer types beyond the default LocalSelectionTransfer.getTransfer and org.eclipse.ui.part.PluginTransfer.getInstance transfer types. When a transfer type other than one of these is encountered, the DND Service will query the visible and active descriptors that are enabled for the drop target of the current operation.
Parameters:
  aTransferType - The transfer data from the drop operation True if the given TransferData can be understood by thisassistant.



validateDrop
abstract public IStatus validateDrop(Object target, int operation, TransferData transferType)(Code)
Validates dropping on the given object. This method is called whenever some aspect of the drop operation changes.

Subclasses must implement this method to define which drops make sense. If clients return true, then they will be allowed to handle the drop in CommonDropAdapterAssistant.handleDrop(CommonDropAdapter,DropTargetEvent,Object) .


Parameters:
  target - the object that the mouse is currently hovering over, ornull if the mouse is hovering over empty space
Parameters:
  operation - the current drag operation (copy, move, etc.)
Parameters:
  transferType - the current transfer type A status indicating whether the drop is valid.



validatePluginTransferDrop
public IStatus validatePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)(Code)
Return true if the client can handle the drop onto the target viewer of the drop operation.

The default behavior of this method is to return Status.CANCEL_STATUS.


Parameters:
  aDragSelection - The selection dragged from the viewer.
Parameters:
  aDropTarget - The target of the drop operation. OK if the plugin transfer can be handled by this assistant.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.