()
| 1779 | } |
| 1780 | |
| 1781 | public void focusToNextUnreaded() { |
| 1782 | if (getItemCount() == 0) { |
| 1783 | return; |
| 1784 | } |
| 1785 | synchronized (hContacts) { |
| 1786 | int j = hContacts.size(); |
| 1787 | for (int i = 0; i < j; i++) { |
| 1788 | Contact c = (Contact) hContacts.elementAt(i); |
| 1789 | c.setIncoming(Contact.INC_NONE); |
| 1790 | } |
| 1791 | } |
| 1792 | |
| 1793 | redraw(); |
| 1794 | |
| 1795 | if (messageCount == 0) { |
| 1796 | return; |
| 1797 | } |
| 1798 | |
| 1799 | Object atcursor = getFocusedObject(); |
| 1800 | Contact c = (Contact) ((atcursor instanceof Contact) ? atcursor : hContacts.firstElement()); |
| 1801 | Enumeration i = hContacts.elements(); |
| 1802 | |
| 1803 | int pass = 0; // |
| 1804 | while (pass < 2) { |
| 1805 | if (!i.hasMoreElements()) { |
| 1806 | i = hContacts.elements(); |
| 1807 | } |
| 1808 | Contact p = (Contact) i.nextElement(); |
| 1809 | if (pass == 1) { |
| 1810 | if (p.getNewMsgsCount() > 0) { |
| 1811 | focusToContact(p, true); |
| 1812 | setRotator(); |
| 1813 | break; |
| 1814 | } |
| 1815 | } |
| 1816 | if (p == c) { |
| 1817 | pass++; |
| 1818 | } |
| 1819 | } |
| 1820 | } |
| 1821 | |
| 1822 | public void logoff(String mess) { |
| 1823 | if (isLoggedIn()) { |
no test coverage detected