Memory work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@9243 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-10-01 06:32:30 +00:00
committed by derek
parent c522023b09
commit 62917d634d
4 changed files with 117 additions and 102 deletions

View File

@ -27,26 +27,6 @@ import org.jivesoftware.spark.util.log.Log;
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JSplitPane;
import javax.swing.KeyStroke;
import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
@ -68,6 +48,26 @@ import java.util.Date;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JSplitPane;
import javax.swing.KeyStroke;
import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
/**
* The base implementation of all ChatRoom conversations. You would implement this class to have most types of Chat.
*/
@ -492,7 +492,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
private void checkForEnter(KeyEvent e) {
final KeyStroke keyStroke = KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers());
if (!keyStroke.equals(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_DOWN_MASK)) &&
e.getKeyChar() == KeyEvent.VK_ENTER) {
e.getKeyChar() == KeyEvent.VK_ENTER) {
e.consume();
sendMessage();
getChatInputEditor().setText("");
@ -644,6 +644,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
packetIDList.clear();
messageListeners.clear();
fileDropListeners.clear();
getChatInputEditor().close();
}
/**