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