public class ConsoleView extends java.lang.Object implements ClientView
Modifier and Type | Field and Description |
---|---|
private ClientController |
controller |
private ClientInputListener |
inputListener |
Constructor and Description |
---|
ConsoleView(ClientInputListener inputListener,
ClientController controller)
delivers inputListener and controller to the constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addGroup(Group groupInvitedTo) |
void |
addMessage(Group groupSendTo,
Message message) |
void |
close() |
void |
displayMessage(Message message)
this method shall send the delivered message to reactToStatus
|
void |
init()
sends the primary text to the console
|
void |
loadMessages(java.util.HashMap<Group,java.util.LinkedList<Message>> messageMap) |
void |
reactToMessage(Message message)
at this point the message from displayMessage will be forwarded to content
moreover the status and group will be displayed on the console through a StringBuilder
|
void |
updateProfileInfo(User user) |
private ClientInputListener inputListener
private ClientController controller
public ConsoleView(ClientInputListener inputListener, ClientController controller)
inputListener
- controller
- public void init()
init
in interface ClientView
public void displayMessage(Message message)
displayMessage
in interface ClientView
message
- public void reactToMessage(Message message)
reactToMessage
in interface ClientView
message
- public void close()
close
in interface ClientView
public void loadMessages(java.util.HashMap<Group,java.util.LinkedList<Message>> messageMap)
loadMessages
in interface ClientView
public void addGroup(Group groupInvitedTo)
addGroup
in interface ClientView
public void addMessage(Group groupSendTo, Message message)
addMessage
in interface ClientView
public void updateProfileInfo(User user)
updateProfileInfo
in interface ClientView