Ejemplo n.º 1
0
 public void transferInterrupt(String lccno, String streamID, String fileName) throws Exception {
   MemberBean memberBean = TreeUtil.getMemberBeanByLccno(lccno);
   final FriendChatPanel panel = getFriendChatPanel(memberBean);
   String info = StringUtil.getFormatString(getUIString("sendFile.interrupt"), fileName);
   long systemTime = Vovo.getLcmUtil().getSystemTime();
   panel.otherCancelSendFile(streamID, new Date(systemTime), info);
   DataUtil.removeFileTransfer(streamID);
 }
Ejemplo n.º 2
0
 public void recSendFileMsg(String lccno, String fileName, long fileSize, String streamID) {
   MessageFrame msgFrame = getMessageFrame();
   MemberBean memberBean = TreeUtil.getMemberBeanByLccno(lccno);
   final FriendChatPanel panel = getFriendChatPanel(memberBean);
   panel.addRecvFileItem(fileName, fileSize, streamID);
   msgFrame.setVisible(true);
   msgFrame.setExtendedState(javax.swing.JFrame.NORMAL);
   //		FlashWindowUtil.start(msgFrame);
 }
Ejemplo n.º 3
0
 public void getOtherMsg(String lccno, String operate, Message msg) throws Exception {
   if (Constants.OTHERMSG_OPERATE_CANCELSENDFILE.equals(operate)) {
     String streamID = (String) msg.getProperty("streamID");
     Date sendDate = new Date((Long) msg.getProperty("sendDate"));
     FileTransferRequest req = DataUtil.getFileTransferRequest(streamID);
     MessageFrame msgFrame = getMessageFrame();
     MemberBean memberBean = TreeUtil.getMemberBeanByLccno(lccno);
     final FriendChatPanel panel = getFriendChatPanel(memberBean);
     String info =
         StringUtil.getFormatString(
             getUIString("sendFile.otherCancel"), "\"" + req.getFileName() + "\"");
     panel.otherCancelSendFile(streamID, sendDate, info);
     msgFrame.setVisible(true);
   }
 }
Ejemplo n.º 4
0
 public FriendChatPanel getFriendChatPanel(MemberBean bean) {
   String sessionID = getSessionID(bean.getId());
   MessageTabPanel tabPanel =
       context.getViewManager().getView(Constants.ViewKey.MESSAGETABPANEL.toString());
   FriendChatPanel panel = (FriendChatPanel) tabPanel.getTab(sessionID);
   if (panel == null) {
     panel = new FriendChatPanel();
     panel.setInfo(bean);
     //			ImageIcon icon = new
     // ImageIcon(getClass().getResource("/com/lorent/vovo/resource/images/systemheads/default40.png"));
     tabPanel.addTab(panel, bean, sessionID);
   } else {
     tabPanel.setNoticeTab(sessionID);
   }
   return panel;
 }
Ejemplo n.º 5
0
 private void handleFriendMsg(
     FriendChatPanel panel,
     MemberBean memberBean,
     String msg,
     FontStyle fontStyle,
     Date sendDate,
     Map<String, String> imgs)
     throws Exception {
   panel.insertFriendMsg(msg, fontStyle, sendDate, imgs);
   FlashWindowUtil.start(getMessageFrame());
   ChatRecord c =
       new ChatRecord(
           memberBean.getId(),
           memberBean.getRealName(),
           msg,
           sendDate,
           fontStyle,
           getSessionID(memberBean.getId()));
   Vovo.exeS("dataStore", "saveChatRecord", c);
 }
Ejemplo n.º 6
0
 public void sendFileComplete(String lccno, String streamID, String fileName) throws Exception {
   MemberBean memberBean = TreeUtil.getMemberBeanByLccno(lccno);
   final FriendChatPanel panel = getFriendChatPanel(memberBean);
   panel.sendFileComplete(streamID, fileName);
   DataUtil.removeFileTransfer(streamID);
 }
Ejemplo n.º 7
0
 public void updateFileProcess(String lccno, String streamID, int percent) {
   MemberBean memberBean = TreeUtil.getMemberBeanByLccno(lccno);
   final FriendChatPanel panel = getFriendChatPanel(memberBean);
   panel.updateInfo(streamID, percent);
 }