コード例 #1
0
ファイル: MainToolBar.java プロジェクト: Kelvin-Ng/jitsi
  /**
   * Implements ChatSessionChangeListener#currentChatTransportChanged(ChatSession).
   *
   * @param chatSession the <tt>ChatSession</tt>, which transport has changed
   */
  public void currentChatTransportChanged(ChatSession chatSession) {
    if (chatSession == null) return;

    ChatTransport currentTransport = chatSession.getCurrentChatTransport();
    Object currentDescriptor = currentTransport.getDescriptor();

    if (currentDescriptor instanceof Contact) {
      Contact contact = (Contact) currentDescriptor;

      for (PluginComponent c : pluginContainer.getPluginComponents())
        c.setCurrentContact(contact, currentTransport.getResourceName());
    }
  }