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


java.lang.Object
  extended by 

org.eclipse.swt.dnd.DropTargetAdapter
      extended by 
org.eclipse.swt.dnd.DropTargetEffect
All Implemented Interfaces:
EventListener, DropTargetListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
StyledTextDropTargetEffect, TableDropTargetEffect, TreeDropTargetEffect

public class DropTargetEffect
extends DropTargetAdapter

This class provides a default drag under effect during a drag and drop. The current implementation does not provide any visual feedback.

The drop target effect has the same API as the DropTargetAdapter so that it can provide custom visual feedback when a DropTargetEvent occurs.

Classes that wish to provide their own drag under effect can extend the DropTargetEffect and override any applicable methods in DropTargetAdapter to display their own drag under effect.

The feedback value is either one of the FEEDBACK constants defined in class DND which is applicable to instances of this class, or it must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those DND effect constants.

Feedback:
FEEDBACK_EXPAND, FEEDBACK_INSERT_AFTER, FEEDBACK_INSERT_BEFORE, FEEDBACK_NONE, FEEDBACK_SELECT, FEEDBACK_SCROLL

Since:
3.3
See Also:
DropTargetAdapter, DropTargetEvent, Sample code and further information

Constructor Summary
DropTargetEffect ( Control control)
          Creates a new DropTargetEffect to handle the drag under effect on the specified Control.
 
Method Summary
  Control getControl ()
          Returns the Control which is registered for this DropTargetEffect.
  Widget getItem (int x, int y)
          Returns the item at the given x-y coordinate in the receiver or null if no such item exists.
 
Methods inherited from class org.eclipse.swt.dnd. DropTargetAdapter
dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropTargetEffect

public DropTargetEffect(
Control control)
Creates a new DropTargetEffect to handle the drag under effect on the specified Control.

Parameters:
control - the Control over which the user positions the cursor to drop the data
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the control is null
Method Detail

getControl

public 
Control getControl()
Returns the Control which is registered for this DropTargetEffect. This is the control over which the user positions the cursor to drop the data.

Returns:
the Control which is registered for this DropTargetEffect

getItem

public 
Widget getItem(int x,
                      int y)
Returns the item at the given x-y coordinate in the receiver or null if no such item exists. The x-y coordinate is in the display relative coordinates.

Parameters:
x - the x coordinate used to locate the item
y - the y coordinate used to locate the item
Returns:
the item at the given x-y coordinate, or null if the coordinate is not in a selectable item

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