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

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.swt.dnd
Class DragSourceEffect

java.lang.Object
  extended by 

org.eclipse.swt.dnd.DragSourceAdapter
      extended by 
org.eclipse.swt.dnd.DragSourceEffect
All Implemented Interfaces:
EventListener, DragSourceListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
TableDragSourceEffect, TreeDragSourceEffect

public class DragSourceEffect
extends DragSourceAdapter

This class provides default implementations to display a drag source effect during a drag and drop operation. The current implementation does not provide any visual feedback.

The drag source effect has the same API as the DragSourceAdapter so that it can provide custom visual feedback when a DragSourceEvent occurs.

Classes that wish to provide their own drag source effect such as displaying a default source image during a drag can extend the DragSourceEffect class, override the DragSourceAdapter.dragStart method and set the field DragSourceEvent.image with their own image. The image should be disposed when DragSourceAdapter.dragFinished is called.

Since:
3.3
See Also:
DragSourceAdapter, DragSourceEvent, Sample code and further information

Constructor Summary
DragSourceEffect ( Control control)
          Creates a new DragSourceEffect to handle drag effect from the specified Control.
 
Method Summary
  Control getControl ()
          Returns the Control which is registered for this DragSourceEffect.
 
Methods inherited from class org.eclipse.swt.dnd. DragSourceAdapter
dragFinished, dragSetData, dragStart
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragSourceEffect

public DragSourceEffect(
Control control)
Creates a new DragSourceEffect to handle drag effect from the specified Control.

Parameters:
control - the Control that the user clicks on to initiate the drag
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the control is null
Method Detail

getControl

public 
Control getControl()
Returns the Control which is registered for this DragSourceEffect. This is the control that the user clicks in to initiate dragging.

Returns:
the Control which is registered for this DragSourceEffect

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