@Override public void mouseClicked(MouseEvent e) { CstmButton temp = (CstmButton) e.getSource(); if (temp == joinConvo && currentConvo != null) CHAT_CLIENT.joinConvo(currentConvo); else if (temp == startConvo) CHAT_CLIENT.startConvo(convoTitle.getText().trim()); else if (temp == leaveConvo) CHAT_CLIENT.leaveConvo(currentConvo); }
@Override public void sendClicked(String userInput) { EntryPanel peepList = peepLists.get(currentConvo); if (peepList != null) { List<String> selectedPeeps = peepList.getSelected(); if (selectedPeeps.size() > 0) { for (String peep : selectedPeeps) if (!peep.equals(USERNAME)) CHAT_CLIENT.sendChatMessage(peep, userInput); return; } } CHAT_CLIENT.sendChatMessage(currentConvo, userInput); }
@Override public void windowClosing(WindowEvent e) { CHAT_CLIENT.shutDown(); ChatClientGUI.this.removeAll(); ChatClientGUI.this.dispose(); }