コード例 #1
0
 @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);
 }
コード例 #2
0
 @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);
 }
コード例 #3
0
 @Override
 public void windowClosing(WindowEvent e) {
   CHAT_CLIENT.shutDown();
   ChatClientGUI.this.removeAll();
   ChatClientGUI.this.dispose();
 }