|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.util.EventObject
java.awt.dnd.DragSourceEvent
java.awt.dnd.DragSourceDropEvent
public class DragSourceDropEvent
通過 DragSourceContext,將 DragSourceDropEvent 從 DragSourceContextPeer 傳遞給向 DragSourceContext 及其關聯 DragSource 註冊的 DragSourceListener 的 dragDropEnd 方法。它包含足夠的資訊,允許操作的發起方在操作完成時向最終使用者提供適當的反饋。
| 欄位摘要 |
|---|
| 從類別 java.util.EventObject 繼承的欄位 |
|---|
source |
| 建構子摘要 | |
|---|---|
DragSourceDropEvent(DragSourceContext dsc)
針對沒有引起放置的拖動建構一個 DragSourceDropEvent。 |
|
DragSourceDropEvent(DragSourceContext dsc,
int action,
boolean success)
放置建構一個具有給定 DragSourceContext、放置操作和指示放置是否成功的 boolean 值的 DragSourceDropEvent。 |
|
DragSourceDropEvent(DragSourceContext dsc,
int action,
boolean success,
int x,
int y)
針對放置建構一個具有給定 DragSourceContext、放置操作、表示放置是否成功的 boolean 值和坐標的 DragSourceDropEvent。 |
|
| 方法摘要 | |
|---|---|
int |
getDropAction()
此方法返回一個 int 值,表示放置主題目標執行的操作。 |
boolean |
getDropSuccess()
此方法返回表示放置是否成功的 boolean 值。 |
| 從類別 java.awt.dnd.DragSourceEvent 繼承的方法 |
|---|
getDragSourceContext, getLocation, getX, getY |
| 從類別 java.util.EventObject 繼承的方法 |
|---|
getSource, toString |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public DragSourceDropEvent(DragSourceContext dsc,
int action,
boolean success)
DragSourceContext、放置操作和指示放置是否成功的 boolean 值的 DragSourceDropEvent。未指定此 DragSourceDropEvent 的坐標,所以 getLocation 將在此事件中返回 null。
參數 action 應該是表示單個操作的 DnDConstants 之一。對於無效的 action,此建構子不拋出任何異常。
dsc - 與此 DragSourceDropEvent 關聯的 DragSourceContextaction - 放置操作success - 指示放置是否成功的 boolean 值
IllegalArgumentException - 如果 dsc 為 null。DragSourceEvent.getLocation()
public DragSourceDropEvent(DragSourceContext dsc,
int action,
boolean success,
int x,
int y)
DragSourceContext、放置操作、表示放置是否成功的 boolean 值和坐標的 DragSourceDropEvent。
參數 action 應該是表示單個操作的 DnDConstants 之一。對於無效的 action,此建構子不拋出任何異常。
dsc - 與此 DragSourceDropEvent 關聯的 DragSourceContextaction - 放置操作success - 表示放置是否成功的 boolean 值x - 鼠標位置的水平坐標y - 鼠標位置的垂直坐標
IllegalArgumentException - 如果 dsc 為 null。public DragSourceDropEvent(DragSourceContext dsc)
DragSourceDropEvent。未指定此 DragSourceDropEvent 的坐標,所以 getLocation 將為此事件返回 null。
dsc - DragSourceContext
IllegalArgumentException - 如果 dsc 為 null。DragSourceEvent.getLocation()| 方法詳細資訊 |
|---|
public boolean getDropSuccess()
boolean 值。
true;如果放置目標拒絕該放置或者放置目標接受了該放置,但是無法執行放置操作,則返回 false。public int getDropAction()
int 值,表示放置主題目標執行的操作。
DnDConstants.ACTION_NONE。
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。