|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.doffman.dragarea.DragEvent
public class DragEvent
Encapsulates all information regarding a Drag and Drop operation.
The getAction
method returns the type of drag
event. Drag events are sent to all listeners when a drag event
is started or ended.
Otherwise events are only sent to relevant listeners.
Events are sent selectively when:
A drag operation moves inside a view.
A drag operation leaves the bounds of a view.
A drop operaton occurs inside the bounds of a view.
Movement occurs inside the bounds of a view.
Field Summary | |
---|---|
static int |
ACTION_DRAG_ENDED
The drag operation has ended and not been dropped on the associated view |
static int |
ACTION_DRAG_ENTERED
The the Drag operation has entered the bounds of the associated view |
static int |
ACTION_DRAG_EXITED
The the Drag operation has exited the bounds of the associated view |
static int |
ACTION_DRAG_LOCATION
Drag location has moved |
static int |
ACTION_DRAG_STARTED
Drag operation has started |
static int |
ACTION_DROP
The object has been dropped on this listener |
Constructor Summary | |
---|---|
DragEvent(Bundle data,
int action,
int x,
int y)
Create a DragEvent. |
Method Summary | |
---|---|
int |
getAction()
Get the type of drag event. |
Bundle |
getBundle()
Get the information associated with this drag and drop operation. |
int |
getX()
Get the horizontal location of the current touch point (Relative to associated view). |
int |
getY()
Get the vertical location of the current touch point (Relative to associated view). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_DRAG_STARTED
public static final int ACTION_DRAG_LOCATION
public static final int ACTION_DROP
public static final int ACTION_DRAG_ENDED
public static final int ACTION_DRAG_ENTERED
public static final int ACTION_DRAG_EXITED
Constructor Detail |
---|
public DragEvent(Bundle data, int action, int x, int y)
data
- The information to pass in the drag event.action
- The type of drag event.x
- The horizontal location of the current touch point. (Relative to associated view)y
- The vertical location of the current touch point. (Relative to associated view)Method Detail |
---|
public Bundle getBundle()
public int getAction()
ACTION_DRAG_STARTED
ACTION_DRAG_LOCATION
ACTION_DROP
ACTION_DRAG_ENDED
ACTION_DRAG_ENTERED
ACTION_DRAG_EXITED
public int getX()
public int getY()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |