multi user chat enhancements

cusax-fix
Yana Stamcheva 19 years ago
parent 1d994d66a5
commit 49e0985d60

@ -95,6 +95,7 @@ identifier=Identifier
ignore=Ignore
insertSmiley=Insert smiley
invalidCall=Invalid call
join=&Join
joinChatRoom=&Join chat room
last=Last
launchBrowserError=Error attempting to launch web browser.

@ -0,0 +1,213 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.main.chat;
import java.awt.*;
import java.util.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
/**
* The <tt>ChatContact</tt> is a wrapping class for the <tt>Contact</tt> and
* <tt>ChatRoomMember</tt> interface.
*
* @author Yana Stamcheva
*/
public class ChatContact
{
private Logger logger = Logger.getLogger(ChatContact.class);
private String name;
private String address;
private ImageIcon image;
private ProtocolProviderService protocolProvider;
private PresenceStatus presenceStatus;
private boolean isMultiChatContact;
private Object sourceContact;
/**
* Creates an instance of <tt>ChatContact</tt> by passing to it the
* <tt>Contact</tt> for which it is created.
*
* @param contact the <tt>Contact</tt> for which this <tt>ChatContact</tt>
* is created
*/
public ChatContact(Contact contact)
{
this(null, contact);
}
/**
* Creates an instance of <tt>ChatContact</tt> by passing to it the
* corresponding <tt>MetaContact</tt> and <tt>Contact</tt>.
*
* @param metaContact the <tt>MetaContact</tt> encapsulating the given
* <tt>Contact</tt>
* @param contact the <tt>Contact</tt> for which this <tt>ChatContact</tt>
* is created
*/
public ChatContact(MetaContact metaContact, Contact contact)
{
this.sourceContact = contact;
this.address = contact.getAddress();
this.isMultiChatContact = false;
this.protocolProvider = contact.getProtocolProvider();
if(metaContact != null)
name = metaContact.getDisplayName();
else
name = contact.getDisplayName();
}
/**
* Creates an instance of <tt>ChatContact</tt> by passing to it the
* <tt>ChatRoomMember</tt> for which it is created.
*
* @param chatRoomMember the <tt>ChatRoomMember</tt> for which this
* <tt>ChatContact</tt> is created.
*/
public ChatContact(ChatRoomMember chatRoomMember)
{
this.sourceContact = chatRoomMember;
this.name = chatRoomMember.getName();
this.address = chatRoomMember.getContactAddress();
this.isMultiChatContact = true;
this.protocolProvider = chatRoomMember.getProtocolProvider();
}
/**
* Returns the contact identifier.
*
* @return the contact identifier
*/
public String getAddress()
{
return address;
}
/**
* Returns the contact name.
*
* @return the contact name
*/
public String getName()
{
return name;
}
/**
* Returns the current presence status for single user chat contacts and
* null for multi user chat contacts.
*
* @return the current presence status for single user chat contacts and
* null for multi user chat contacts
*/
public PresenceStatus getPresenceStatus()
{
if(!isMultiChatContact)
return ((Contact)sourceContact).getPresenceStatus();
return null;
}
/**
* Returns the <tt>ProtocolProviderService</tt> of the contact.
*
* @return the <tt>ProtocolProviderService</tt> of the contact
*/
public ProtocolProviderService getProtocolProvider()
{
return protocolProvider;
}
/**
* Returns the source contact. It could be an instance of <tt>Contact</tt>
* or <tt>ChatRoomMember</tt> interface.
*
* @return the source contact
*/
public Object getSourceContact()
{
return sourceContact;
}
/**
* Returns the avatar image corresponding to the source contact. In the case
* of multi user chat contact returns null.
*
* @return the avatar image corresponding to the source contact. In the case
* of multi user chat contact returns null
*/
public ImageIcon getImage()
{
byte[] contactImage = null;
if(!(sourceContact instanceof Contact))
return null;
Contact contact = (Contact)sourceContact;
MetaContact metaContact = GuiActivator.getMetaContactListService()
.findMetaContactByContact(contact);
if(metaContact != null)
{
Iterator i = metaContact.getContacts();
while(i.hasNext())
{
Contact protoContact = (Contact) i.next();
try
{
contactImage = protoContact.getImage();
}
catch (Exception ex)
{
logger.error("Failed to load contact photo.", ex);
}
if(contactImage != null && contactImage.length > 0)
break;
}
}
else if(contact != null)
{
try
{
contactImage = contact.getImage();
}
catch (Exception ex)
{
logger.error("Failed to load contact photo.", ex);
}
}
if(contactImage != null)
{
Image image = ImageLoader.getBytesInImage(contactImage);
return new ImageIcon(image.getScaledInstance(
40, 45, Image.SCALE_SMOOTH));
}
else
return null;
}
}

@ -14,8 +14,6 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.protocol.*;
/**
* The <tt>ChatContactListPanel</tt> is the panel added on the right of the
@ -44,7 +42,7 @@ public class ChatContactListPanel
private JPanel contactsPanel = new JPanel();
private Hashtable contacts = new Hashtable();
private Hashtable chatContacts = new Hashtable();
private ChatPanel chatPanel;
@ -62,46 +60,6 @@ public ChatContactListPanel(ChatPanel chatPanel)
this.setMinimumSize(new Dimension(150, 100));
this.init();
}
/**
* Adds a simple <tt>Contact</tt> to the list of contacts contained in the
* chat.
*
* @param contact the <tt>Contact</tt> to be added
*/
public void addContact(Contact contact)
{
ChatContactPanel chatContactPanel = new ChatContactPanel(
chatPanel, contact);
this.contactsPanel.add(chatContactPanel);
this.contacts.put(contact, chatContactPanel);
}
/**
* Adds a <tt>MetaContact</tt> to the list of contacts contained in the chat.
*
* @param metaContact the <tt>MetaContact</tt> to be added
* @param contact the subcontact which is initially selected
*/
public void addContact(MetaContact metaContact, Contact contact)
{
ChatContactPanel chatContactPanel = new ChatContactPanel(
chatPanel, metaContact, contact);
this.contactsPanel.add(chatContactPanel);
this.contacts.put(metaContact, chatContactPanel);
}
/**
* Constructs the <tt>ChatContactListPanel</tt>.
*/
private void init()
{
this.contactsPanel.setLayout(new BoxLayout(this.contactsPanel,
BoxLayout.Y_AXIS));
@ -116,90 +74,60 @@ private void init()
// Disable all unused buttons.
this.addToChatButton.setEnabled(false);
}
/**
* Updates the status icon of the contact in this
* <tt>ChatContactListPanel</tt>.
* @param contact the <tt>Contact</tt>, which should be updated
* Adds a <tt>ChatContact</tt> to the list of contacts contained in the
* chat.
*
* @param chatContact the <tt>ChatContact</tt> to add
*/
public void updateContactStatus(Contact contact)
{
ChatContactPanel chatContactPanel = null;
if(contacts.containsKey(contact))
{
chatContactPanel = (ChatContactPanel)contacts.get(contact);
chatContactPanel.setStatusIcon(contact.getPresenceStatus());
}
}
public void addContact(ChatContact chatContact)
{
ChatContactPanel chatContactPanel = new ChatContactPanel(
chatPanel, chatContact);
/**
* Updates the status icon of the contact in this
* <tt>ChatContactListPanel</tt>.
* @param metaContact the <tt>MetaContact</tt>, which should be updated
*/
public void updateContactStatus(MetaContact metaContact)
{
ChatContactPanel chatContactPanel = null;
if(contacts.containsKey(metaContact))
{
chatContactPanel = (ChatContactPanel)contacts.get(metaContact);
this.contactsPanel.add(chatContactPanel);
chatContactPanel.setStatusIcon(
metaContact.getDefaultContact().getPresenceStatus());
}
this.chatContacts.put(chatContact, chatContactPanel);
}
/**
* Updates the given protocol contact chat panel in the list. Disables or
* enable buttons, according to the functionalities supported by this
* contact.
* In the corresponding <tt>ChatContactPanel</tt> changes the name of the
* given <tt>Contact</tt>.
*
* @param contact the <tt>Contact</tt>, which chat contact panel to update
* @param chatContact the <tt>ChatContact</tt> to be renamed
*/
public void updateProtocolContact(Contact contact)
{
public void renameContact(ChatContact chatContact)
{
ChatContactPanel chatContactPanel = null;
if(contacts.containsKey(contact))
if(chatContacts.containsKey(chatContact))
{
chatContactPanel = (ChatContactPanel)contacts.get(contact);
chatContactPanel = (ChatContactPanel)chatContacts.get(chatContact);
chatContactPanel.updateProtocolContact(contact);
}
chatContactPanel.renameContact(chatContact.getName());
}
}
/**
* In the corresponding <tt>ChatContactPanel</tt> changes the name of the
* given <tt>Contact</tt>.
*
* @param contact the <tt>Contact</tt>, which has been renamed
* Returns the list of <tt>ChatContacts</tt> contained in this container.
* @return the list of <tt>ChatContacts</tt> contained in this container
*/
public void renameContact(Contact contact)
public Enumeration getChatContacts()
{
ChatContactPanel chatContactPanel = null;
if(contacts.containsKey(contact))
{
chatContactPanel = (ChatContactPanel)contacts.get(contact);
chatContactPanel.renameContact(contact.getDisplayName());
}
return chatContacts.keys();
}
/**
* In the corresponding <tt>ChatContactPanel</tt> changes the name of the
* given <tt>MetaContact</tt>.
*
* @param contact the <tt>MetaContact</tt>, which has been renamed
* Returns the <tt>ChatContactPanel</tt> corresponding to the given
* <tt>ChatContact</tt>.
*
* @param chatContact the <tt>ChatContact</tt> to search for.
* @return the <tt>ChatContactPanel</tt> corresponding to the given
* <tt>ChatContact</tt>
*/
public void renameContact(MetaContact contact)
public ChatContactPanel getChatContactPanel(ChatContact chatContact)
{
ChatContactPanel chatContactPanel = null;
if(contacts.containsKey(contact))
{
chatContactPanel = (ChatContactPanel)contacts.get(contact);
chatContactPanel.renameContact(contact.getDisplayName());
}
return (ChatContactPanel) chatContacts.get(chatContact);
}
}

@ -9,7 +9,6 @@
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
@ -18,9 +17,7 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.lookandfeel.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
@ -42,7 +39,7 @@
*/
public class ChatContactPanel
extends JPanel
implements ActionListener
implements ActionListener
{
private Logger logger = Logger.getLogger(ChatContactPanel.class);
@ -67,58 +64,40 @@ public class ChatContactPanel
private JPanel mainPanel = new JPanel(new BorderLayout());
private Contact protocolContact;
private ImageIcon contactPhotoIcon;
private ChatContact chatContact;
private PresenceStatus status;
private ChatPanel chatPanel;
/**
* Creates an instance of the <tt>ChatContactPanel</tt>.
*
* @param chatPanel
* @param protocolContact
*/
public ChatContactPanel(ChatPanel chatPanel, Contact protocolContact)
{
this(chatPanel, null, protocolContact);
}
/**
* Creates an instance of the <tt>ChatContactPanel</tt>.
*
* @param chatPanel the <tt>ChatPanel</tt>, to which this
* <tt>ChatContactPanel</tt> belongs to.
* @param metaContact
* @param protocolContact
* @param chatContact the chat contact
*/
public ChatContactPanel(ChatPanel chatPanel,
MetaContact metaContact, Contact protocolContact)
public ChatContactPanel(ChatPanel chatPanel, ChatContact contact)
{
super(new BorderLayout(10, 5));
this.protocolContact = protocolContact;
this.chatContact = contact;
this.setPreferredSize(new Dimension(100, 60));
this.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
this.status = protocolContact.getPresenceStatus();
this.status = chatContact.getPresenceStatus();
this.chatPanel = chatPanel;
this.setOpaque(false);
this.mainPanel.setOpaque(false);
//this.contactNamePanel.setOpaque(false);
this.buttonsPanel.setOpaque(false);
String chatContactName;
if(metaContact != null)
chatContactName = metaContact.getDisplayName();
else
chatContactName = protocolContact.getDisplayName();
this.personNameLabel.setText(chatContactName);
this.personNameLabel.setText(chatContact.getName());
this.personNameLabel.setFont(this.getFont().deriveFont(Font.BOLD));
this.personNameLabel.setIcon(new ImageIcon(Constants
.getStatusIcon(status)));
@ -150,9 +129,40 @@ public ChatContactPanel(ChatPanel chatPanel,
this.callButton.setEnabled(false);
this.sendFileButton.setEnabled(false);
new LoadContactPhoto(metaContact, protocolContact).start();
//Load the contact photo.
new Thread()
{
public void run()
{
contactPhotoIcon = chatContact.getImage();
SwingUtilities.invokeLater(new Runnable(){
public void run()
{
if(contactPhotoIcon != null)
{
personPhotoLabel.setBorder(
new SIPCommBorders.BoldRoundBorder());
personPhotoLabel.setIcon(contactPhotoIcon);
}
}
});
}
}.start();
ProtocolProviderService pps
= chatContact.getProtocolProvider();
Object contactInfoOpSet
= pps.getOperationSet(OperationSetWebContactInfo.class);
this.updateProtocolContact(protocolContact);
if(contactInfoOpSet == null)
infoButton.setEnabled(false);
else
infoButton.setEnabled(true);
this.setStatusIcon(chatContact.getPresenceStatus());
}
/**
@ -199,31 +209,7 @@ public void setStatusIcon(PresenceStatus newStatus) {
this.personNameLabel.setIcon(new ImageIcon(Constants
.getStatusIcon(newStatus)));
}
/**
* Disables or enables the contact info button depending on the selected
* protocol contact.
*
* @param protocolContact the selected protocol contact
*/
public void updateProtocolContact(Contact protocolContact)
{
MainFrame mainFrame = chatPanel.getChatWindow().getMainFrame();
ProtocolProviderService pps
= protocolContact.getProtocolProvider();
OperationSetWebContactInfo wContactInfo
= mainFrame.getWebContactInfoOpSet(pps);
if(wContactInfo == null)
infoButton.setEnabled(false);
else
infoButton.setEnabled(true);
this.setStatusIcon(protocolContact.getPresenceStatus());
}
/**
*
*/
@ -231,22 +217,22 @@ public void actionPerformed(ActionEvent e)
{
JButton button = (JButton) e.getSource();
MainFrame mainFrame = chatPanel.getChatWindow().getMainFrame();
if(button.getName().equals("call")) {
if(button.getName().equals("call"))
{
//TODO: Implement the call functionality
}
else if(button.getName().equals("info"))
{
ProtocolProviderService pps
= protocolContact.getProtocolProvider();
= chatContact.getProtocolProvider();
OperationSetWebContactInfo wContactInfo
= mainFrame.getWebContactInfoOpSet(pps);
Object contactInfoOpSet
= pps.getOperationSet(OperationSetWebContactInfo.class);
if(wContactInfo != null) {
if(contactInfoOpSet != null) {
GuiActivator.getBrowserLauncher().openURL(
wContactInfo.getWebContactInfo(protocolContact)
((OperationSetWebContactInfo)contactInfoOpSet)
.getWebContactInfo(chatContact.getAddress())
.toString());
}
}
@ -262,83 +248,17 @@ public void renameContact(String newName)
}
/**
* Loads contact photo in a separate thread
* Sets the given <tt>ImageIcon</tt> to be the photo shown on the left of
* the contact name.
*
* @param contactPhoto the image to show as a contact photo
*/
private class LoadContactPhoto extends Thread
{
private MetaContact metaContact;
private Contact contact;
private ImageIcon contactPhoto;
public LoadContactPhoto(MetaContact metaContact, Contact contact)
{
this.metaContact = metaContact;
this.contact = contact;
}
public LoadContactPhoto(MetaContact metaContact)
{
this.metaContact = metaContact;
}
public void run()
{
byte[] image = null;
if(metaContact != null)
{
Iterator i = metaContact.getContacts();
public void setContactPhoto(ImageIcon contactPhoto)
{
contactPhotoIcon = contactPhoto;
while(i.hasNext())
{
Contact protoContact = (Contact) i.next();
try
{
image = protoContact.getImage();
}
catch (Exception ex)
{
logger.error("Failed to load contact photo.", ex);
}
if(image != null && image.length > 0)
break;
}
}
else if(contact != null)
{
try
{
image = contact.getImage();
}
catch (Exception ex)
{
logger.error("Failed to load contact photo.", ex);
}
}
if(image != null && image.length > 0)
{
Image contactImage
= ImageLoader.getBytesInImage(image);
contactPhoto = new ImageIcon(
contactImage.getScaledInstance(
40, 45, Image.SCALE_SMOOTH));
}
if(contactPhoto == null)
return;
SwingUtilities.invokeLater(new Runnable(){
public void run()
{
personPhotoLabel.setBorder(
new SIPCommBorders.BoldRoundBorder());
personPhotoLabel.setIcon(contactPhoto);
}
});
}
personPhotoLabel.setBorder(
new SIPCommBorders.BoldRoundBorder());
personPhotoLabel.setIcon(contactPhotoIcon);
}
}

@ -16,7 +16,6 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.contactlist.event.*;
@ -35,7 +34,8 @@
public class MetaContactChatPanel
extends ChatPanel
implements ContactPresenceStatusListener,
MetaContactListListener
MetaContactListListener,
SubscriptionListener
{
private static final Logger logger = Logger
@ -72,8 +72,10 @@ public MetaContactChatPanel( ChatWindow chatWindow,
this.metaContact = metaContact;
//Add the contact to the list of contacts contained in this panel
getChatContactListPanel().addContact(metaContact, protocolContact);
ChatContact chatContact = new ChatContact(metaContact, protocolContact);
//Add the contact to the list of contacts contained in this panel
getChatContactListPanel().addContact(chatContact);
//Load the history period, to initialize the firstMessageTimestamp and
//the lastMessageTimeStamp variables. Used to disable/enable history
@ -93,9 +95,17 @@ public void run(){
{
Contact subContact = (Contact) protocolContacts.next();
chatWindow.getMainFrame()
.getProtocolPresenceOpSet(subContact.getProtocolProvider())
.addContactPresenceStatusListener(this);
Object opSet = subContact.getProtocolProvider()
.getOperationSet(OperationSetPersistentPresence.class);
if(opSet != null)
{
((OperationSetPersistentPresence)opSet)
.addContactPresenceStatusListener(this);
((OperationSetPersistentPresence)opSet)
.addSubsciptionListener(this);
}
}
//Obtains the MetaContactListService and adds itself to it as a
@ -274,23 +284,39 @@ public void contactPresenceStatusChanged(
ContactPresenceStatusChangeEvent evt)
{
Contact sourceContact = evt.getSourceContact();
MainFrame mainFrame = getChatWindow().getMainFrame();
MetaContact sourceMetaContact = mainFrame
.getContactList().findMetaContactByContact(sourceContact);
MetaContact sourceMetaContact = GuiActivator.getMetaContactListService()
.findMetaContactByContact(sourceContact);
if (sourceMetaContact != null && metaContact.equals(sourceMetaContact))
{
// Update the status of the given contact in the "send via" selector
// box.
contactSelectorBox.updateContactStatus(sourceContact);
// Update the status of the source meta contact in the contact details
// panel on the right.
if(sourceMetaContact != null
&& sourceMetaContact.getDefaultContact().equals(sourceContact))
{
ChatContact chatContact
= findChatContactByMetaContact(sourceMetaContact);
ChatContactPanel chatContactPanel
= getChatContactListPanel()
.getChatContactPanel(chatContact);
chatContactPanel.setStatusIcon(
chatContact.getPresenceStatus());
}
PresenceStatus status = contactSelectorBox
.getSelectedProtocolContact().getPresenceStatus();
getChatContactListPanel().updateContactStatus(metaContact);
// Show a status message to the user.
String message = getChatConversationPanel().processMessage(
this.metaContact.getDisplayName(),
sourceContact.getAddress(),
new Date(System.currentTimeMillis()),
Constants.SYSTEM_MESSAGE,
Messages.getI18NString("statusChangedChatMessage",
@ -393,7 +419,10 @@ public void metaContactRenamed(MetaContactRenamedEvent evt)
if(evt.getSourceMetaContact().equals(metaContact))
{
getChatContactListPanel().renameContact(evt.getSourceMetaContact());
ChatContact chatContact
= findChatContactByMetaContact(evt.getSourceMetaContact());
getChatContactListPanel().renameContact(chatContact);
getChatWindow().setTabTitle(this, newName);
@ -645,8 +674,111 @@ public void run()
}
}
/**
* Returns the <tt>MetaContact</tt> corresponding to the chat.
*
* @return the <tt>MetaContact</tt> corresponding to the chat.
*/
public MetaContact getMetaContact()
{
return metaContact;
}
public void subscriptionCreated(SubscriptionEvent evt)
{}
public void subscriptionFailed(SubscriptionEvent evt)
{}
public void subscriptionRemoved(SubscriptionEvent evt)
{}
public void subscriptionMoved(SubscriptionMovedEvent evt)
{}
public void subscriptionResolved(SubscriptionEvent evt)
{}
/**
* Change the contact avatar image when contact details were updated.
*/
public void contactModified(ContactPropertyChangeEvent evt)
{
Contact sourceContact = evt.getSourceContact();
ChatContact chatContact = findChatContactByContact(sourceContact);
if(chatContact != null)
{
ChatContactPanel chatContactPanel
= getChatContactListPanel().getChatContactPanel(chatContact);
chatContactPanel.setContactPhoto(chatContact.getImage());
}
}
/**
* Returns the <tt>ChatContact</tt> corresponding to the given
* <tt>MetaContact</tt>.
*
* @param metaContact the <tt>MetaContact</tt> to search for
* @return the <tt>ChatContact</tt> corresponding to the given
* <tt>MetaContact</tt>.
*/
private ChatContact findChatContactByMetaContact(MetaContact metaContact)
{
Enumeration chatContacts
= getChatContactListPanel().getChatContacts();
while(chatContacts.hasMoreElements())
{
ChatContact chatContact
= (ChatContact) chatContacts.nextElement();
Object chatSourceContact = chatContact.getSourceContact();
if(chatSourceContact instanceof Contact)
{
MetaContact parentMetaContact
= GuiActivator.getMetaContactListService()
.findMetaContactByContact((Contact)chatSourceContact);
if(parentMetaContact != null
&& parentMetaContact.equals(metaContact))
return chatContact;
}
}
return null;
}
/**
* Returns the <tt>ChatContact</tt> corresponding to the given
* <tt>Contact</tt>.
*
* @param metaContact the <tt>MetaContact</tt> to search for
* @return the <tt>ChatContact</tt> corresponding to the given
* <tt>Contact</tt>.
*/
private ChatContact findChatContactByContact(Contact contact)
{
Enumeration chatContacts
= getChatContactListPanel().getChatContacts();
while(chatContacts.hasMoreElements())
{
ChatContact chatContact
= (ChatContact) chatContacts.nextElement();
Object chatSourceContact = chatContact.getSourceContact();
if(chatSourceContact instanceof Contact
&& chatSourceContact.equals(contact))
{
return chatContact;
}
}
return null;
}
}

@ -54,7 +54,11 @@ public ConferenceChatPanel(ChatWindow chatWindow, ChatRoom chatRoom)
for (int i = 0; i < membersList.size(); i ++)
{
getChatContactListPanel().addContact((Contact)membersList.get(i));
ChatContact chatContact
= new ChatContact((ChatRoomMember)membersList.get(i));
getChatContactListPanel()
.addContact(chatContact);
}
this.chatRoom.addMessageListener(this);

Loading…
Cancel
Save