Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.chat
Interface ChatContainer

All Known Implementing Classes:
ChatWindow, SingleWindowContainer

public interface ChatContainer

Author:
Yana Stamcheva

Method Summary
 void addChat(ChatPanel chatPanel)
          Adds a given ChatPanel to this chat window.
 void addChatChangeListener(ChatChangeListener listener)
          Adds the given ChatChangeListener.
 int getChatCount()
          Returns the number of all open chats.
 List<ChatPanel> getChats()
          Returns all chats this ChatContainer contains.
 ChatPanel getCurrentChat()
          Returns the currently selected chat panel.
 Frame getFrame()
          Returns the frame to which this container belongs.
 void openChat(ChatPanel chatPanel, boolean setSelected)
          Opens the specified ChatPanel and optionally brings it to the front.
 void removeAllChats()
          Removes all chats this ChatContainer contains.
 void removeChat(ChatPanel chatPanel)
          Removes a given ChatPanel from this chat window.
 void removeChatChangeListener(ChatChangeListener listener)
          Removes the given ChatChangeListener.
 void setChatIcon(ChatPanel chatPanel, Icon icon)
          Sets the icon for the given chat.
 void setChatTitle(ChatPanel chatPanel, String title)
          Sets the title of this chat container.
 void setCurrentChat(ChatPanel chatPanel)
          Selects the chat tab which corresponds to the given MetaContact.
 void setTitle(String title)
          Sets the title of this chat container.
 void setToolbarVisible(boolean b)
          Shows or hides the Toolbar depending on the value of parameter b.
 void updateHistoryButtonState(ChatPanel chatPanel)
          Updates history buttons state.
 

Method Detail

setTitle

void setTitle(String title)
Sets the title of this chat container.

Parameters:
title - the title to set

addChat

void addChat(ChatPanel chatPanel)
Adds a given ChatPanel to this chat window.

Parameters:
chatPanel - The ChatPanel to add.

removeChat

void removeChat(ChatPanel chatPanel)
Removes a given ChatPanel from this chat window.

Parameters:
chatPanel - The ChatPanel to remove.

removeAllChats

void removeAllChats()
Removes all chats this ChatContainer contains.


getChatCount

int getChatCount()
Returns the number of all open chats.

Returns:
the number of all open chats

getChats

List<ChatPanel> getChats()
Returns all chats this ChatContainer contains.

Returns:
a list of all chats this ChatContainer contains.

openChat

void openChat(ChatPanel chatPanel,
              boolean setSelected)
Opens the specified ChatPanel and optionally brings it to the front.

Parameters:
chatPanel - the ChatPanel to be opened
setSelected - true if chatPanel (and respectively this ChatContainer) should be brought to the front; otherwise, false

getCurrentChat

ChatPanel getCurrentChat()
Returns the currently selected chat panel.

Returns:
the currently selected chat panel.

setCurrentChat

void setCurrentChat(ChatPanel chatPanel)
Selects the chat tab which corresponds to the given MetaContact.

Parameters:
chatPanel - The ChatPanel to select.

setChatTitle

void setChatTitle(ChatPanel chatPanel,
                  String title)
Sets the title of this chat container.

Parameters:
chatPanel - the chat, for which we set the title
title - the title to set

setChatIcon

void setChatIcon(ChatPanel chatPanel,
                 Icon icon)
Sets the icon for the given chat.

Parameters:
chatPanel - the chat, for which we want to set an icon
icon - the icon to set

setToolbarVisible

void setToolbarVisible(boolean b)
Shows or hides the Toolbar depending on the value of parameter b.

Parameters:
b - if true, makes the Toolbar visible, otherwise hides the Toolbar

getFrame

Frame getFrame()
Returns the frame to which this container belongs.

Returns:
the frame to which this container belongs

addChatChangeListener

void addChatChangeListener(ChatChangeListener listener)
Adds the given ChatChangeListener.

Parameters:
listener - the listener to add

removeChatChangeListener

void removeChatChangeListener(ChatChangeListener listener)
Removes the given ChatChangeListener.

Parameters:
listener - the listener to remove

updateHistoryButtonState

void updateHistoryButtonState(ChatPanel chatPanel)
Updates history buttons state.

Parameters:
chatPanel -

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.