JavaTM 2 Platform
Standard Ed. 6

類別 java.awt.dnd.DragSourceContext
的使用

使用 DragSourceContext 的軟體套件
java.awt.dnd Drag 和 Drop 是一種直接操作動作,在許多圖形使用者介面系統中都會遇到它,它提供了一種機制,能夠在兩個與 GUI 中顯示元素邏輯相關的實體之間傳輸資訊。 
 

java.awt.dnd 中 DragSourceContext 的使用
 

返回 DragSourceContext 的 java.awt.dnd 中的方法
protected  DragSourceContext DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl)
          創建處理此拖動的 DragSourceContext。
 DragSourceContext DragSourceEvent.getDragSourceContext()
          此方法返回引起事件的 DragSourceContext。
 

參數型別為 DragSourceContext 的 java.awt.dnd 中的建構子
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers)
          建構一個 DragSourceDragEvent。
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers, int x, int y)
          建構一個具有指定 DragSourceContext、使用者放置動作、目標放置動作、修改鍵和坐標的 DragSourceDragEvent。
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。
DragSourceEvent(DragSourceContext dsc)
          根據一個指定的 DragSourceContext 來建構一個 DragSourceEvent。
DragSourceEvent(DragSourceContext dsc, int x, int y)
          根據指定的 DragSourceContext 和鼠標位置坐標建構一個 DragSourceEvent。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。