コード例 #1
0
 private void disconnect() {
   if (session != null && session.isConnected()) {
     session.disconnect();
   }
   jToggleButtonConnect.setSelected(false);
   jToggleButtonConnect.setText("Connect");
   jToggleButtonRegister.setSelected(false);
   onlineUsers.clear();
   jToggleButtonRegister.setText("Register");
 }
コード例 #2
0
 private void register() {
   if (session != null && session.isConnected()) {
     onlineUsers.clear();
     // get the current list
     Message msg = session.sendMessage("", "list", "");
     System.out.println("LIST: " + msg.getBody());
     StringTokenizer st = new StringTokenizer(msg.getBody(), "\n");
     while (st.hasMoreTokens()) {
       onlineUsers.addElement(new HostItem(st.nextToken()));
     }
     session.postMessage("", "register", "");
   }
 }
コード例 #3
0
 private void deregister() {
   onlineUsers.clear();
   if (session != null && session.isConnected()) {
     session.postMessage("", "deregister", "");
   }
 }
コード例 #4
0
 protected void reset() {
   fCounterPanel.reset();
   fProgressIndicator.reset();
   fFailureView.clear();
   fFailures.clear();
 }