src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
/**
     * Passes the message to the contained <code>ChatConversationPanel</code>
     * for processing and appends it at the end of the conversationPanel
     * document.
     *
     * @param chatMessage the chat message to add
     */
Passes the message to the contained ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document.

@param chatMessage the chat message to add
Passes the message to the contained ChatConversationPanel for processing and appends it at the end of the conversationPanel document . @param chatMessage the chat message to add
private void addChatMessage(final ChatMessage chatMessage)
    {
        if (!SwingUtilities.isEventDispatchThread())
        {
            SwingUtilities.invokeLater(new Runnable()
            {
                public void run()
                {
                    addChatMessage(chatMessage);
                }
            });
            return;
        }
        if (ConfigurationUtils.isHistoryShown() && !isHistoryLoaded)
        {
            synchronized (incomingEventBuffer)
            {
                incomingEventBuffer.add(chatMessage);
            }
        }
        else
        {
            displayChatMessage(chatMessage);
        }
        this.lastHistoryMsgTimestamp = chatMessage.getDate();
        if (chatMessage.getMessageType().equals(Chat.OUTGOING_MESSAGE))
        {
            this.lastSentMessageUID = chatMessage.getMessageUID();
        }
    }
private void addChatMessage ( final ChatMessage chatMessage ) { if ( ! SwingUtilities . isEventDispatchThread ( ) ) { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { addChatMessage ( chatMessage ) ; } } ) ; return ; } if ( ConfigurationUtils . isHistoryShown ( ) && ! isHistoryLoaded ) { synchronized ( incomingEventBuffer ) { incomingEventBuffer . add ( chatMessage ) ; } } else { displayChatMessage ( chatMessage ) ; } this . lastHistoryMsgTimestamp = chatMessage . getDate ( ) ; if ( chatMessage . getMessageType ( ) . equals ( Chat . OUTGOING_MESSAGE ) ) { this . lastSentMessageUID = chatMessage . getMessageUID ( ) ; } }
Passes the message to the contained <code>ChatConversationPanel</code>
 for processing and appends it at the end of the conversationPanel
 document.
Passes the message to the contained <code > ChatConversationPanel< / code > for processing and appends it at the end of the conversationPanel document .
// We need to be sure that chat messages are added in the event dispatch // thread. // change the last history message timestamp after we add one.