Creates a new instance of ActiveContacts @param current
(Contact current)
| 46 | * @param current |
| 47 | */ |
| 48 | public ActiveContacts(Contact current) { |
| 49 | super(SR.MS_ACTIVE_CONTACTS, false); |
| 50 | |
| 51 | enableListWrapping(true); |
| 52 | for (Enumeration r = sd.roster.hContacts.elements(); r.hasMoreElements();) { |
| 53 | Contact c = (Contact) r.nextElement(); |
| 54 | if (c.active() || c.origin == Contact.ORIGIN_GROUPCHAT) { |
| 55 | itemsList.addElement(c); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | if (getItemCount() == 0) { |
| 60 | return; |
| 61 | } |
| 62 | |
| 63 | mainbar = new MainBar(2, String.valueOf(getItemCount()), " ", false); |
| 64 | mainbar.addElement(SR.MS_ACTIVE_CONTACTS); |
| 65 | show(); |
| 66 | focusToContact(sd.roster.activeContact); |
| 67 | } |
| 68 | |
| 69 | public void eventOk() { |
| 70 | if (getItemCount() > 0) { |
nothing calls this directly
no test coverage detected