src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
/**
     * Loads history messages ignoring the message with the specified id.
     *
     * @param escapedMessageID the id of the message to be ignored;
     * <tt>null</tt> if no message is to be ignored
     */
Loads history messages ignoring the message with the specified id.
@param escapedMessageID the id of the message to be ignored;
null if no message is to be ignored
Loads history messages ignoring the message with the specified id . @param escapedMessageID the id of the message to be ignored ; null if no message is to be ignored
public void loadHistory(final String escapedMessageID)
    {
        if (!ConfigurationUtils.isHistoryShown())
        {
            isHistoryLoaded = true;
            return;
        }
        SwingWorker historyWorker = new SwingWorker()
        {
            private Collection<Object> historyList;
            @Override
            public Object construct() throws Exception
            {
                loadHistoryPeriod();
                historyList = chatSession.getHistory(
                    ConfigurationUtils.getChatHistorySize());
                return historyList;
            }
            /**
             * Called on the event dispatching thread (not on the worker thread)
             * after the <code>construct</code> method has returned.
             */
            @Override
            public void finished()
            {
                if(historyList != null && historyList.size() > 0)
                {
                    processHistory(historyList, escapedMessageID);
                }
                isHistoryLoaded = true;
                addIncomingEvents();
                chatContainer.updateHistoryButtonState(ChatPanel.this);
            }
        };
        historyWorker.start();
    }
public void loadHistory ( final String escapedMessageID ) { if ( ! ConfigurationUtils . isHistoryShown ( ) ) { isHistoryLoaded = true ; return ; } SwingWorker historyWorker = new SwingWorker ( ) { private Collection < Object > historyList ; @ Override public Object construct ( ) throws Exception { loadHistoryPeriod ( ) ; historyList = chatSession . getHistory ( ConfigurationUtils . getChatHistorySize ( ) ) ; return historyList ; } /**
             * Called on the event dispatching thread (not on the worker thread)
             * after the <code>construct</code> method has returned.
             */ @ Override public void finished ( ) { if ( historyList != null && historyList . size ( ) > 0 ) { processHistory ( historyList , escapedMessageID ) ; } isHistoryLoaded = true ; addIncomingEvents ( ) ; chatContainer . updateHistoryButtonState ( ChatPanel . this ) ; } } ; historyWorker . start ( ) ; }
Loads history messages ignoring the message with the specified id.
Loads history messages ignoring the message with the specified id .
// Load the history period, which initializes the // firstMessageTimestamp and the lastMessageTimeStamp variables. // Used to disable/enable history flash buttons in the chat // window tool bar. // Load the last N=CHAT_HISTORY_SIZE messages from history. // Add incoming events accumulated while the history was loading // at the end of the chat.