Redesigned handling of chat start message.

This commit is contained in:
LevelX2 2013-09-05 16:25:14 +02:00
parent a97d019ca5
commit 7f6eca171e
6 changed files with 72 additions and 14 deletions

View file

@ -102,6 +102,18 @@ public class ChatPanel extends javax.swing.JPanel {
NONE, GAME, CHAT
}
/**
* Controls the output start messages as the chat panel is created
*
*/
private ChatType chatType = ChatType.DEFAULT;
public enum ChatType {
DEFAULT, GAME, TABLES, TOURNAMENT
}
private boolean startMessageDone = false;
/**
* Maps message colors to {@link Color}.
*/
@ -143,6 +155,23 @@ public class ChatPanel extends javax.swing.JPanel {
}
}
public ChatType getChatType() {
return chatType;
}
public void setChatType(ChatType chatType) {
this.chatType = chatType;
}
public boolean isStartMessageDone() {
return startMessageDone;
}
public void setStartMessageDone(boolean startMessageDone) {
this.startMessageDone = startMessageDone;
}
public void connect(UUID chatId) {
session = MageFrame.getSession();
this.chatId = chatId;