摘要: 重写getPreferredAction()方法即可publicclassUserNodeextendsAbstractNode{publicUserNode(PeerInfopeerInfo){super(Children.LEAF,Lookups.singleton(peerInfo));this.setName(peerInfo.getPeerID());this.setDisplayName(peerInfo.getName());}@OverridepublicAction[]getActions(booleanpopup){returnnewAction[]{newChatActi 阅读全文
posted @ 2011-09-23 15:17 网络大豆 阅读(305) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/kaka888/blog/item/baddcb1bb3c9b5fbae513376.htmlpublicclassMyMouseListenerextendsMouseAdapter{publicvoidmouseClicked(MouseEventevt){if(evt.getClickCount()==3){//处理鼠标三击}elseif(evt.getClickCount()==2){//处理鼠标双击}}}处理鼠标右键publicmouseClicked(MouseEvente){if(e.isMetaDown()){//检测鼠标右键单击}如何在 阅读全文
posted @ 2011-09-23 12:05 网络大豆 阅读(5090) 评论(0) 推荐(0) 编辑
摘要: ImageIconimageIcon=newImageIcon(file.getPath());if(imageIcon.getImageLoadStatus()==MediaTracker.COMPLETE){editTP.insertIcon(newImageIcon(file.getPath()));}else{//图像加载失败,igonre} 阅读全文
posted @ 2011-09-23 09:59 网络大豆 阅读(339) 评论(0) 推荐(0) 编辑