posts - 35,  comments - 6,  trackbacks - 0

1, Drag Source
    samples:  private DropTarget dropTarget;
                    dropTarget = new DropTarget(dropControl, DND.DROP_COPY);//dropControl为drap操作的目标 对象
                   dropTarget.setTransfer(TextTransfer.getInstance());


2, Drop Target
3, Allowed Operation:DND.DROP_COPY, DND.DROP_MOVE, DND.DROP_LINK or DND.DROP_NONE.
4, Transfer Types:TextTransfer,RTFTransfer,FileTransfer,HtmlTransfer.
  sample: TextTransfer transfers=TextTransfer.getInstance(); 
5,dragOver event.feedback values
dragOver event.feedback values Description
DND.FEEDBACK_SELECT The item under the cursor is selected; applies to table and trees.
DND.FEEDBACK_SCROLL The widget is scrolled up or down to allow the user to drop on items that are not currently visible; applies to tables and trees.
DND.FEEDBACK_EXPAND The item currently under the cursor is expanded to allow the user to select a drop target from a sub item; applies to trees.
DND.FEEDBACK_INSERT_BEFORE An insertion mark is shown before the item under the cursor; applies to trees.
DND.FEEDBACK_INSERT_AFTER An insertion mark is shown after the item under the cursor; applies to trees.
DND.FEEDBACK_NONE No effect is shown.

samples: private int dropFeedback = 0;
         dropFeedback = DND.FEEDBACK_SCROLL;
         event.feedback = dropFeedback;
         如果你的对象超界了,当你的鼠标在边界上时就会自动住下滚动.

posted on 2006-07-05 12:39 NG 阅读(413) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2006年7月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

常用链接

留言簿(1)

随笔档案(35)

文章分类(5)

文章档案(2)

新闻档案(5)

java link

搜索

  •  

最新评论

阅读排行榜

评论排行榜