KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > MUCParticipantListener


1 import org.jivesoftware.smackx.muc.ParticipantStatusListener;
2 import org.jivesoftware.smack.util.StringUtils;
3
4 /** Listens for changes in participants status in Multi USer Chat.*/
5 final class MUCParticipantListener implements ParticipantStatusListener{
6     
7     private final MUCPanel mp;
8         
9     public MUCParticipantListener(MUCPanel mp){
10         this.mp=mp;
11     }
12
13     
14     public void adminGranted(String JavaDoc participant){
15         mp.threadAnnounce(null);
16     }
17
18     public void adminRevoked(String JavaDoc participant){
19         mp.threadAnnounce(null);
20     }
21
22     public void banned(String JavaDoc participant){
23         mp.threadAnnounce("<b>"+StringUtils.parseResource(participant)+"</b> "+Lang.gs("has been banned"));
24     }
25
26     public void kicked(String JavaDoc participant){
27         mp.threadAnnounce("<b>"+StringUtils.parseResource(participant)+"</b> "+Lang.gs("has been kicked"));
28     }
29
30     public void membershipGranted(String JavaDoc participant){
31         mp.threadAnnounce(null);
32     }
33
34     public void membershipRevoked(String JavaDoc participant){
35         mp.threadAnnounce(null);
36     }
37
38     public void moderatorGranted(String JavaDoc participant){
39         mp.threadAnnounce(null);
40     }
41
42     public void moderatorRevoked(String JavaDoc participant){
43         mp.threadAnnounce(null);
44     }
45
46     public void ownershipGranted(String JavaDoc participant){
47         mp.threadAnnounce(null);
48     }
49
50     public void ownershipRevoked(String JavaDoc participant){
51         mp.threadAnnounce(null);
52     }
53
54     public void voiceGranted(String JavaDoc participant){
55         mp.threadAnnounce(null);
56     }
57         
58     public void voiceRevoked(String JavaDoc participant){
59         mp.threadAnnounce(null);
60     }
61     
62     public void nicknameChanged(String JavaDoc nickname){
63         mp.threadAnnounce("<b>"+nickname+"</b> "+Lang.gs("has changed nick"));
64     }
65 }
Popular Tags