Show user name in title bar of MAGE. Clear table chat after disconnect. Remove user from chat after disconnect. Some tweaking about the messages if a user disconnected/session expired.

This commit is contained in:
LevelX2 2013-04-29 17:18:43 +02:00
parent ae30e9a884
commit b6ddaabe44
12 changed files with 58 additions and 28 deletions

View file

@ -856,6 +856,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
if (session.isConnected()) {
if (JOptionPane.showConfirmDialog(this, "Are you sure you want to disconnect?", "Confirm disconnect", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
session.disconnect(false);
tablesPane.clearChat();
showMessage("You have disconnected");
}
} else {

View file

@ -275,8 +275,7 @@ class TableModel extends AbstractTableModel {
}
public void clear() {
this.txtConversation.selectAll();
this.txtConversation.replaceSelection("");
this.txtConversation.setText("");
}
/** This method is called from within the constructor to

View file

@ -71,6 +71,9 @@ public class TablesPane extends MagePane {
tablesPanel.hideTables();
}
public void clearChat() {
tablesPanel.getChatPanel().clear();
}
/** This method is called from within the constructor to
* initialize the form.

View file

@ -331,6 +331,11 @@ public class TablesPanel extends javax.swing.JPanel {
}
}
public ChatPanel getChatPanel() {
return this.chatPanel;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is