public static interface Component.DraggedListener
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onDragCancel(Component component,
DragInfo dragInfo) |
process a drag cancel event dispatched to the component.
|
void |
onDragDown(Component component,
DragInfo dragInfo) |
Process a drag down event dispatched to the component.
|
void |
onDragEnd(Component component,
DragInfo dragInfo) |
Process a drag end event dispatched to the component.
|
default boolean |
onDragPreAccept(Component component,
int dragDirection) |
Accepts the drag event dispatched to a component.
|
void |
onDragStart(Component component,
DragInfo dragInfo) |
Process a drag start event dispatched to the component.
|
void |
onDragUpdate(Component component,
DragInfo dragInfo) |
Process a drag update event dispatched to the component.
|
void onDragDown(Component component, DragInfo dragInfo)
component - Indicates the component to which the drag down event is dispatched.dragInfo - Indicates the drag down info object DragInfo.void onDragStart(Component component, DragInfo dragInfo)
component - Indicates the component to which the drag start event is dispatched.dragInfo - Indicates the drag start info object DragInfo.void onDragUpdate(Component component, DragInfo dragInfo)
component - Indicates the component to which the drag update event is dispatched.dragInfo - Indicates the drag update info object DragInfo.void onDragEnd(Component component, DragInfo dragInfo)
component - Indicates the component to which the drag end event is dispatched.dragInfo - Indicates the drag end info object DragInfo.void onDragCancel(Component component, DragInfo dragInfo)
component - Indicates the component to which the drag end event is dispatched.dragInfo - Indicates the drag end info object DragInfo.default boolean onDragPreAccept(Component component, int dragDirection)
This method supports the Component.DRAG_HORIZONTAL, Component.DRAG_VERTICAL
and Component.DRAG_HORIZONTAL_VERTICAL. When Component.DRAG_HORIZONTAL_VERTICAL is set, the drag direction
may be rough.
component - Indicates the component to which a drag event is dispatched.dragDirection - Indicates the drag direction, which can be Component.DRAG_UP,
Component.DRAG_DOWN, Component.DRAG_LEFT, or Component.DRAG_RIGHT.true (default value) if the current drag event is accepted;
returns false otherwise.