Eclipse Rich Ajax Platform

org.eclipse.swt.dnd
Class DropTargetEvent

java.lang.Object
  extended by Event
      extended by org.eclipse.swt.events.TypedEvent
          extended by org.eclipse.swt.dnd.DropTargetEvent

public class DropTargetEvent
extends TypedEvent

The DropTargetEvent contains the event information passed in the methods of the DropTargetListener.

Since:
1.3

Field Summary
 TransferData currentDataType
          The type of data that will be dropped.
 TransferData[] dataTypes
          A list of the types of data that the DragSource is capable of providing.
 int detail
          The operation being performed.
static int DRAG_ENTER
           
static int DRAG_LEAVE
           
static int DRAG_OPERATION_CHANGED
           
static int DRAG_OVER
           
static int DROP
           
static int DROP_ACCEPT
           
 int feedback
          A bitwise OR'ing of the drag under effect feedback to be displayed to the user (e.g.
 Widget item
          If the associated control is a table or tree, this field contains the item located at the cursor coordinates.
 int operations
          A bitwise OR'ing of the operations that the DragSource can support (e.g.
 int time
          the time that the event occurred.
 int x
          The x-cordinate of the cursor relative to the Display
 int y
          The y-cordinate of the cursor relative to the Display
 
Fields inherited from class org.eclipse.swt.events.TypedEvent
data, display, widget
 
Constructor Summary
DropTargetEvent(Widget widget, int id)
           
 
Method Summary
static void addListener(Adaptable adaptable, DropTargetListener listener)
           
protected  boolean allowProcessing()
           
protected  void dispatchToObserver(java.lang.Object listener)
           
static java.lang.Object[] getListeners(Adaptable adaptable)
           
protected  java.lang.Class getListenerType()
           
static boolean hasListener(Adaptable adaptable)
           
static void removeListener(Adaptable adaptable, DropTargetListener listener)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.swt.events.TypedEvent
executeNext, getSource, processEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DRAG_ENTER

public static final int DRAG_ENTER
See Also:
Constant Field Values

DRAG_OVER

public static final int DRAG_OVER
See Also:
Constant Field Values

DRAG_LEAVE

public static final int DRAG_LEAVE
See Also:
Constant Field Values

DROP_ACCEPT

public static final int DROP_ACCEPT
See Also:
Constant Field Values

DROP

public static final int DROP
See Also:
Constant Field Values

DRAG_OPERATION_CHANGED

public static final int DRAG_OPERATION_CHANGED
See Also:
Constant Field Values

x

public int x
The x-cordinate of the cursor relative to the Display


y

public int y
The y-cordinate of the cursor relative to the Display


detail

public int detail
The operation being performed.

See Also:
DND.DROP_NONE, DND.DROP_MOVE, DND.DROP_COPY, DND.DROP_LINK, DND.DROP_DEFAULT

operations

public int operations
A bitwise OR'ing of the operations that the DragSource can support (e.g. DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK). The detail value must be a member of this list or DND.DROP_NONE.

See Also:
DND.DROP_NONE, DND.DROP_MOVE, DND.DROP_COPY, DND.DROP_LINK, DND.DROP_DEFAULT

feedback

public int feedback
A bitwise OR'ing of the drag under effect feedback to be displayed to the user (e.g. DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND).

A value of DND.FEEDBACK_NONE indicates that no drag under effect will be displayed.

Feedback effects will only be applied if they are applicable.

The default value is DND.FEEDBACK_SELECT.

See Also:
DND.FEEDBACK_NONE, DND.FEEDBACK_SELECT, DND.FEEDBACK_INSERT_BEFORE, DND.FEEDBACK_INSERT_AFTER, DND.FEEDBACK_SCROLL, DND.FEEDBACK_EXPAND

item

public Widget item
If the associated control is a table or tree, this field contains the item located at the cursor coordinates.


currentDataType

public TransferData currentDataType
The type of data that will be dropped.


dataTypes

public TransferData[] dataTypes
A list of the types of data that the DragSource is capable of providing. The currentDataType must be a member of this list.


time

public int time
the time that the event occurred. NOTE: This field is an unsigned integer and should be AND'ed with 0xFFFFFFFFL so that it can be treated as a signed long.

Constructor Detail

DropTargetEvent

public DropTargetEvent(Widget widget,
                       int id)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class TypedEvent

dispatchToObserver

protected void dispatchToObserver(java.lang.Object listener)
Overrides:
dispatchToObserver in class TypedEvent

allowProcessing

protected boolean allowProcessing()
Overrides:
allowProcessing in class TypedEvent

getListenerType

protected java.lang.Class getListenerType()
Overrides:
getListenerType in class TypedEvent

hasListener

public static boolean hasListener(Adaptable adaptable)

addListener

public static void addListener(Adaptable adaptable,
                               DropTargetListener listener)

removeListener

public static void removeListener(Adaptable adaptable,
                                  DropTargetListener listener)

getListeners

public static java.lang.Object[] getListeners(Adaptable adaptable)

Eclipse Rich Ajax Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.