public abstract class DragSourceAdapter extends Object implements DragSourceListener, DragSourceMotionListener
扩展这个类来创建一个DragSourceEvent
听众和覆盖感兴趣的事件的方法。(如果你实施DragSourceListener
接口,你必须定义所有的方法在这。这个抽象类定义了他们所有的空方法,所以你只需要定义你关心的事件的方法。)
创建一个使用扩展类的听众对象然后登记与DragSource
。当拖进来,移动,或出口下降的站点,在下降时的动作变化,当拖动结束,在监听对象相关的方法被调用时,与DragSourceEvent
传递给它。
降落地点是空与以往的dragenter()调用相关联的如果该适配器在dragEnter()
最新调用对应于下降的站点和不遵守这一dragExit()
调用适配器。
DragSourceEvent
,
DragSourceListener
,
DragSourceMotionListener
Constructor and Description |
---|
DragSourceAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
dragDropEnd(DragSourceDropEvent dsde)
调用此方法以表示拖放操作已完成。
|
void |
dragEnter(DragSourceDragEvent dsde)
被称为光标的热点进入一个平台依赖的下拉网站。
|
void |
dragExit(DragSourceEvent dse)
称为光标的热点退出平台依赖的下拉站点。
|
void |
dragMouseMoved(DragSourceDragEvent dsde)
调用鼠标在拖动操作期间移动的时候调用。
|
void |
dragOver(DragSourceDragEvent dsde)
被称为光标的热点移动在一个平台上依赖的下拉网站。
|
void |
dropActionChanged(DragSourceDragEvent dsde)
当用户修改了下拉手势时调用。
|
public void dragEnter(DragSourceDragEvent dsde)
dragEnter
接口
DragSourceListener
dsde
-
DragSourceDragEvent
public void dragOver(DragSourceDragEvent dsde)
dragOver
接口
DragSourceListener
dsde
-
DragSourceDragEvent
public void dragMouseMoved(DragSourceDragEvent dsde)
dragMouseMoved
接口
DragSourceMotionListener
dsde
-
DragSourceDragEvent
public void dropActionChanged(DragSourceDragEvent dsde)
dropActionChanged
接口
DragSourceListener
dsde
-
DragSourceDragEvent
public void dragExit(DragSourceEvent dse)
dragExit
接口
DragSourceListener
dse
-
DragSourceEvent
public void dragDropEnd(DragSourceDropEvent dsde)
DragSourceDropEvent
的getdropsuccess()方法可用来确定终止状态。的getdropaction()方法返回,选择适用于降降网站的运行操作。这一方法是完整的,目前
DragSourceContext
和相关资源的无效。
dragDropEnd
接口
DragSourceListener
dsde
-
DragSourceDropEvent
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.