Package com.liuyix.xmpp.ui

Examples of com.liuyix.xmpp.ui.ChatWindow


   * */
  private void updateChatWindow(String username, Message msg) {
    if (msg == null || msg.getBody() == null)
      return;
    Util.showDebugMsg("\nupdateChatWindow:\nusername:" + username);
    ChatWindow chatWindow = chatWindowMap.get(username);
    if (chatWindow == null)
      createChatWindow(username, msg.getFrom());
    // 已经建立了一个聊天窗口,则调用该ChatWindow的处理接收消息的方法
    chatWindow = chatWindowMap.get(username);
   
//    Util.showDebugMsg("Msg:" + msg == null ? "NULL" : "NOT NULL");
//    Util.showDebugMsg("chatWindow:" + chatWindow==null?"NULL" : "NOT NULL");
     chatWindow.handleIncomingMsg(msg.getBody());

  }
View Full Code Here


  }

  @Override
  //负责处理MainWindow得到的chat请求
  public void handleChatRequest(String username, String jid) {
    ChatWindow chatWindow = getChatWindow(username,jid);
//    chatWindow.getShell().setFocus();
  }
View Full Code Here

  public void handleChatRequest(String username, String jid) {
    ChatWindow chatWindow = getChatWindow(username,jid);
//    chatWindow.getShell().setFocus();
  }
  public ChatWindow getChatWindow(String username, String jid) {
    ChatWindow chatWindow = chatWindowMap.get(username);
    if (chatWindow == null)
      createChatWindow(username, jid);
    // 已经建立了一个聊天窗口,则调用该ChatWindow的处理接收消息的方法
    chatWindow = chatWindowMap.get(username);
    return chatWindow;
View Full Code Here

    @Override
    public void run() {
      String statusInfo = presence.getStatus();
      if(statusInfo == null)
        statusInfo = "没有设置!";
       ChatWindow chatWindow = new ChatWindow(topShell,username,jid,null,
       presence.getType(),
       presence.getMode(),statusInfo,listener);
//      new ChatWindow().open();
       chatWindowMap.put(username, chatWindow);
       chatWindow.open();
    }
View Full Code Here

TOP

Related Classes of com.liuyix.xmpp.ui.ChatWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.