Examples of ChatWindow


Examples of GUI.ChatWindow

    if( ! contact.isInChatWindow() || settings.oneChatWindowPerChatPartner){
      contact.setIsInChatWindow(true);

      if(settings.oneChatWindowPerChatPartner){

        ChatWindowInterface chatWindow = new ChatWindow(new Rectangle(settings.chatWindowBounds.x,
            settings.chatWindowBounds.y,
            settings.chatWindowBounds.width,
            settings.chatWindowBounds.height), this);
        chatWindows.add(chatWindow);
        chatWindow.addContact(contact);
      }else{

        if(chatWindows.size() > 0){
          chatWindows.get(chatWindows.size() - 1).addContact(contact);
        }else{
          ChatWindowInterface chatWindow = new ChatWindow(new Rectangle(settings.chatWindowBounds.x,
              settings.chatWindowBounds.y,
              settings.chatWindowBounds.width,
              settings.chatWindowBounds.height), this);
          chatWindows.add(chatWindow);
          chatWindow.addContact(contact);
        }
      }
    }
  }
View Full Code Here

Examples of com.anzsoft.client.ui.ChatWindow

    {
      public void onMessageReceived(XmppMessage message)
      {
        if(!message.getType().equals("chat"))
          return;
        ChatWindow window = ChatWindow.openChat(message.getFromID());
       
        SoundController soundController = new SoundController();
        Sound sound = soundController.createSound(Sound.MIME_TYPE_AUDIO_MPEG,
            "sound/im.wav");
        sound.play();
       
        window.addMessage(getContactNick(message.getFromID().toStringNoResource()), message.getBody(),false);
      }
      public void onMessageSent(XmppMessage message)
      {
       
      }
View Full Code Here

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

Examples of com.liuyix.xmpp.ui.ChatWindow

  }

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

Examples of com.liuyix.xmpp.ui.ChatWindow

  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

Examples of com.liuyix.xmpp.ui.ChatWindow

    @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
Copyright © 2018 www.massapi.com. 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.